Skip to content

Instantly share code, notes, and snippets.

@socarrandinn
Created March 3, 2024 02:15
Show Gist options
  • Save socarrandinn/330be51c9d4709bb453c7d122f2f95b7 to your computer and use it in GitHub Desktop.
Save socarrandinn/330be51c9d4709bb453c7d122f2f95b7 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @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);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)
pragma solidity ^0.8.20;
interface IERC5267 {
/**
* @dev MAY be emitted to signal that the domain could have changed.
*/
event EIP712DomainChanged();
/**
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
* signature.
*/
function eip712Domain()
external
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of 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);
}
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol)
pragma solidity ^0.8.20;
import {ERC20} from "../ERC20.sol";
import {Context} from "../../../utils/Context.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);
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Pausable.sol)
pragma solidity ^0.8.20;
import {ERC20} from "../ERC20.sol";
import {Pausable} from "../../../utils/Pausable.sol";
/**
* @dev ERC20 token with pausable token transfers, minting and burning.
*
* Useful for scenarios such as preventing trades until the end of an evaluation
* period, or having an emergency switch for freezing all token transfers in the
* event of a large bug.
*
* IMPORTANT: This contract does not include public pause and unpause functions. In
* addition to inheriting this contract, you must define both functions, invoking the
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
* make the contract pause mechanism of the contract unreachable, and thus unusable.
*/
abstract contract ERC20Pausable is ERC20, Pausable {
/**
* @dev See {ERC20-_update}.
*
* Requirements:
*
* - the contract must not be paused.
*/
function _update(address from, address to, uint256 value) internal virtual override whenNotPaused {
super._update(from, to, value);
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)
pragma solidity ^0.8.20;
import {IERC20Permit} from "./IERC20Permit.sol";
import {ERC20} from "../ERC20.sol";
import {ECDSA} from "../../../utils/cryptography/ECDSA.sol";
import {EIP712} from "../../../utils/cryptography/EIP712.sol";
import {Nonces} from "../../../utils/Nonces.sol";
/**
* @dev Implementation 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.
*/
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces {
bytes32 private constant PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
/**
* @dev Permit deadline has expired.
*/
error ERC2612ExpiredSignature(uint256 deadline);
/**
* @dev Mismatched signature.
*/
error ERC2612InvalidSigner(address signer, address owner);
/**
* @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
*
* It's a good idea to use the same `name` that is defined as the ERC20 token name.
*/
constructor(string memory name) EIP712(name, "1") {}
/**
* @inheritdoc IERC20Permit
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
if (block.timestamp > deadline) {
revert ERC2612ExpiredSignature(deadline);
}
bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));
bytes32 hash = _hashTypedDataV4(structHash);
address signer = ECDSA.recover(hash, v, r, s);
if (signer != owner) {
revert ERC2612InvalidSigner(signer, owner);
}
_approve(owner, spender, value);
}
/**
* @inheritdoc IERC20Permit
*/
function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) {
return super.nonces(owner);
}
/**
* @inheritdoc IERC20Permit
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {
return _domainSeparatorV4();
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.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);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @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);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.20;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError, bytes32) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)
pragma solidity ^0.8.20;
import {MessageHashUtils} from "./MessageHashUtils.sol";
import {ShortStrings, ShortString} from "../ShortStrings.sol";
import {IERC5267} from "../../interfaces/IERC5267.sol";
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
*
* The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
* encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
* does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
* produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
*
* This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
* ({_hashTypedDataV4}).
*
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating
* the chain id to protect against replay attacks on an eventual fork of the chain.
*
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
*
* NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
* separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
* separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
*
* @custom:oz-upgrades-unsafe-allow state-variable-immutable
*/
abstract contract EIP712 is IERC5267 {
using ShortStrings for *;
bytes32 private constant TYPE_HASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _cachedDomainSeparator;
uint256 private immutable _cachedChainId;
address private immutable _cachedThis;
bytes32 private immutable _hashedName;
bytes32 private immutable _hashedVersion;
ShortString private immutable _name;
ShortString private immutable _version;
string private _nameFallback;
string private _versionFallback;
/**
* @dev Initializes the domain separator and parameter caches.
*
* The meaning of `name` and `version` is specified in
* https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
*
* - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
* - `version`: the current major version of the signing domain.
*
* NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
* contract upgrade].
*/
constructor(string memory name, string memory version) {
_name = name.toShortStringWithFallback(_nameFallback);
_version = version.toShortStringWithFallback(_versionFallback);
_hashedName = keccak256(bytes(name));
_hashedVersion = keccak256(bytes(version));
_cachedChainId = block.chainid;
_cachedDomainSeparator = _buildDomainSeparator();
_cachedThis = address(this);
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
return _cachedDomainSeparator;
} else {
return _buildDomainSeparator();
}
}
function _buildDomainSeparator() private view returns (bytes32) {
return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
}
/**
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
* function returns the hash of the fully encoded EIP712 message for this domain.
*
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
*
* ```solidity
* bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
* keccak256("Mail(address to,string contents)"),
* mailTo,
* keccak256(bytes(mailContents))
* )));
* address signer = ECDSA.recover(digest, signature);
* ```
*/
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);
}
/**
* @dev See {IERC-5267}.
*/
function eip712Domain()
public
view
virtual
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
)
{
return (
hex"0f", // 01111
_EIP712Name(),
_EIP712Version(),
block.chainid,
address(this),
bytes32(0),
new uint256[](0)
);
}
/**
* @dev The name parameter for the EIP712 domain.
*
* NOTE: By default this function reads _name which is an immutable value.
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
*/
// solhint-disable-next-line func-name-mixedcase
function _EIP712Name() internal view returns (string memory) {
return _name.toStringWithFallback(_nameFallback);
}
/**
* @dev The version parameter for the EIP712 domain.
*
* NOTE: By default this function reads _version which is an immutable value.
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
*/
// solhint-disable-next-line func-name-mixedcase
function _EIP712Version() internal view returns (string memory) {
return _version.toStringWithFallback(_versionFallback);
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)
pragma solidity ^0.8.20;
import {Strings} from "../Strings.sol";
/**
* @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
*
* The library provides methods for generating a hash of a message that conforms to the
* https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
* specifications.
*/
library MessageHashUtils {
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing a bytes32 `messageHash` with
* `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
* keccak256, although any bytes32 value can be safely used because the final digest will
* be re-hashed.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
}
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing an arbitrary `message` with
* `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
return
keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x00` (data with intended validator).
*
* The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
* `validator` address. Then hashing the result.
*
* See {ECDSA-recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(hex"19_00", validator, data));
}
/**
* @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
*
* The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
* `\x19\x01` and hashing the result. It corresponds to the hash signed by the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
*
* See {ECDSA-recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, hex"19_01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
digest := keccak256(ptr, 0x42)
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides tracking nonces for addresses. Nonces will only increment.
*/
abstract contract Nonces {
/**
* @dev The nonce used for an `account` is not the expected current nonce.
*/
error InvalidAccountNonce(address account, uint256 currentNonce);
mapping(address account => uint256) private _nonces;
/**
* @dev Returns the next unused nonce for an address.
*/
function nonces(address owner) public view virtual returns (uint256) {
return _nonces[owner];
}
/**
* @dev Consumes a nonce.
*
* Returns the current value and increments nonce.
*/
function _useNonce(address owner) internal virtual returns (uint256) {
// For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be
// decremented or reset. This guarantees that the nonce never overflows.
unchecked {
// It is important to do x++ and not ++x here.
return _nonces[owner]++;
}
}
/**
* @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
*/
function _useCheckedNonce(address owner, uint256 nonce) internal virtual {
uint256 current = _useNonce(owner);
if (nonce != current) {
revert InvalidAccountNonce(owner, current);
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
bool private _paused;
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)
pragma solidity ^0.8.20;
import {StorageSlot} from "./StorageSlot.sol";
// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
// | length | 0x BB |
type ShortString is bytes32;
/**
* @dev This library provides functions to convert short memory strings
* into a `ShortString` type that can be used as an immutable variable.
*
* Strings of arbitrary length can be optimized using this library if
* they are short enough (up to 31 bytes) by packing them with their
* length (1 byte) in a single EVM word (32 bytes). Additionally, a
* fallback mechanism can be used for every other case.
*
* Usage example:
*
* ```solidity
* contract Named {
* using ShortStrings for *;
*
* ShortString private immutable _name;
* string private _nameFallback;
*
* constructor(string memory contractName) {
* _name = contractName.toShortStringWithFallback(_nameFallback);
* }
*
* function name() external view returns (string memory) {
* return _name.toStringWithFallback(_nameFallback);
* }
* }
* ```
*/
library ShortStrings {
// Used as an identifier for strings longer than 31 bytes.
bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;
error StringTooLong(string str);
error InvalidShortString();
/**
* @dev Encode a string of at most 31 chars into a `ShortString`.
*
* This will trigger a `StringTooLong` error is the input string is too long.
*/
function toShortString(string memory str) internal pure returns (ShortString) {
bytes memory bstr = bytes(str);
if (bstr.length > 31) {
revert StringTooLong(str);
}
return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
}
/**
* @dev Decode a `ShortString` back to a "normal" string.
*/
function toString(ShortString sstr) internal pure returns (string memory) {
uint256 len = byteLength(sstr);
// using `new string(len)` would work locally but is not memory safe.
string memory str = new string(32);
/// @solidity memory-safe-assembly
assembly {
mstore(str, len)
mstore(add(str, 0x20), sstr)
}
return str;
}
/**
* @dev Return the length of a `ShortString`.
*/
function byteLength(ShortString sstr) internal pure returns (uint256) {
uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
if (result > 31) {
revert InvalidShortString();
}
return result;
}
/**
* @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
*/
function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
if (bytes(value).length < 32) {
return toShortString(value);
} else {
StorageSlot.getStringSlot(store).value = value;
return ShortString.wrap(FALLBACK_SENTINEL);
}
}
/**
* @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
*/
function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return toString(value);
} else {
return store;
}
}
/**
* @dev Return the length of a string that was encoded to `ShortString` or written to storage using
* {setWithFallback}.
*
* WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
* actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
*/
function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return byteLength(value);
} else {
return bytes(store).length;
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = HEX_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
* representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;
accounts[2] = 0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db;
accounts[3] = 0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB;
accounts[4] = 0x617F2E2fD72FD9D5503197092aC168c91465E7f2;
accounts[5] = 0x17F6AD8Ef982297579C203069C1DbfFE4348c372;
accounts[6] = 0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678;
accounts[7] = 0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7;
accounts[8] = 0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C;
accounts[9] = 0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC;
accounts[10] = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c;
accounts[11] = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C;
accounts[12] = 0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB;
accounts[13] = 0x583031D1113aD414F02576BD6afaBfb302140225;
accounts[14] = 0xdD870fA1b7C4700F2BD7f44238821C26f7392148;
return accounts[index];
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library Assert {
event AssertionEvent(
bool passed,
string message,
string methodName
);
event AssertionEventUint(
bool passed,
string message,
string methodName,
uint256 returned,
uint256 expected
);
event AssertionEventInt(
bool passed,
string message,
string methodName,
int256 returned,
int256 expected
);
event AssertionEventBool(
bool passed,
string message,
string methodName,
bool returned,
bool expected
);
event AssertionEventAddress(
bool passed,
string message,
string methodName,
address returned,
address expected
);
event AssertionEventBytes32(
bool passed,
string message,
string methodName,
bytes32 returned,
bytes32 expected
);
event AssertionEventString(
bool passed,
string message,
string methodName,
string returned,
string expected
);
event AssertionEventUintInt(
bool passed,
string message,
string methodName,
uint256 returned,
int256 expected
);
event AssertionEventIntUint(
bool passed,
string message,
string methodName,
int256 returned,
uint256 expected
);
function ok(bool a, string memory message) public returns (bool result) {
result = a;
emit AssertionEvent(result, message, "ok");
}
function equal(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventUint(result, message, "equal", a, b);
}
function equal(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventInt(result, message, "equal", a, b);
}
function equal(bool a, bool b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventBool(result, message, "equal", a, b);
}
// TODO: only for certain versions of solc
//function equal(fixed a, fixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function equal(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
function equal(address a, address b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventAddress(result, message, "equal", a, b);
}
function equal(bytes32 a, bytes32 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventBytes32(result, message, "equal", a, b);
}
function equal(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)));
emit AssertionEventString(result, message, "equal", a, b);
}
function notEqual(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventUint(result, message, "notEqual", a, b);
}
function notEqual(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventInt(result, message, "notEqual", a, b);
}
function notEqual(bool a, bool b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventBool(result, message, "notEqual", a, b);
}
// TODO: only for certain versions of solc
//function notEqual(fixed a, fixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function notEqual(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
function notEqual(address a, address b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventAddress(result, message, "notEqual", a, b);
}
function notEqual(bytes32 a, bytes32 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventBytes32(result, message, "notEqual", a, b);
}
function notEqual(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b)));
emit AssertionEventString(result, message, "notEqual", a, b);
}
/*----------------- Greater than --------------------*/
function greaterThan(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a > b);
emit AssertionEventUint(result, message, "greaterThan", a, b);
}
function greaterThan(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a > b);
emit AssertionEventInt(result, message, "greaterThan", a, b);
}
// TODO: safely compare between uint and int
function greaterThan(uint256 a, int256 b, string memory message) public returns (bool result) {
if(b < int(0)) {
// int is negative uint "a" always greater
result = true;
} else {
result = (a > uint(b));
}
emit AssertionEventUintInt(result, message, "greaterThan", a, b);
}
function greaterThan(int256 a, uint256 b, string memory message) public returns (bool result) {
if(a < int(0)) {
// int is negative uint "b" always greater
result = false;
} else {
result = (uint(a) > b);
}
emit AssertionEventIntUint(result, message, "greaterThan", a, b);
}
/*----------------- Lesser than --------------------*/
function lesserThan(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a < b);
emit AssertionEventUint(result, message, "lesserThan", a, b);
}
function lesserThan(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a < b);
emit AssertionEventInt(result, message, "lesserThan", a, b);
}
// TODO: safely compare between uint and int
function lesserThan(uint256 a, int256 b, string memory message) public returns (bool result) {
if(b < int(0)) {
// int is negative int "b" always lesser
result = false;
} else {
result = (a < uint(b));
}
emit AssertionEventUintInt(result, message, "lesserThan", a, b);
}
function lesserThan(int256 a, uint256 b, string memory message) public returns (bool result) {
if(a < int(0)) {
// int is negative int "a" always lesser
result = true;
} else {
result = (uint(a) < b);
}
emit AssertionEventIntUint(result, message, "lesserThan", a, b);
}
}
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
ref: refs/heads/main
DIRC e�� bZe�� bZ����-�k�����uw����,�&$.deps/remix-tests/remix_accounts.soleە �.�eە �.��������b 2�H"��(���,�Dz!.deps/remix-tests/remix_tests.soleە,Eeە,E�����o#q{K���Sc��X�W�n.prettierrc.jsoneە�eە���;���9|�>�Xߌy��˷'contracts/MyToken.soleە�Q@eە�Q@���cS?���5?,���7��'�|scripts/deploy_with_ethers.tseەe��eەe��������.��E�r���NH-��Wscripts/deploy_with_web3.tseە���eە������'S��Н��M�%5�s<��wscripts/ethers-lib.tseە�<eە�<��%�~P9���WrV���ߒ�~�scripts/web3-lib.tseە��eە��
��!K�*����8��w'���tests/MyToken_test.sol#YIK�C��:��@���9�
x��U]o�0�9�⪼�R��6�1�"4�شI�����Z8v�F���Q�ڴIg���ڷ��s�=%��g� ǁ��_'W���SH��+J��x{5�ٮe��#J0R��w���v�k���E�XH I"���&J+[ 68�A���.m���k��V��6?/J����( T�_�ѲPJ� �]���J-J�5���;:?��j'��ɬv��Ď�s>P�`I@ H�TS�@<p"�B,��2�Z��l��v�O9�*�XS�aIVB�c��ɒQ �YE��^�F��X�N�j�������a��V������Ȕ� ��XBT�ʅRDj��Lr��h �·�:�z! � �x3��y���R�&����� AB�i��Ja��;���E ��]�l���^�3P��0ݧ?D�A��הk�ם6.C��U�wU��ꈹ�c��J�(��<�u�S*ktYu��Ѳf��:�9�gֈ�.�;�/�a����;�i�( �fpO��^
��I��?O�I���߈���lR�wZ��:�Z�@"�V}�����.�R�1�{8z675��yc�K[�47zCd��L���� EWݝf`�ߛ�4�4߾oj�������?���,���B�`���\I{���y�\ı�� F����6�R���
�r�
ڼϖ��h������y������x�we�s� �:Һ�"z�z�Qݒ˔r�g!4
�_ �����P�����ٍqJ ��T-v ���X-a��N����#Sm��s�dY��T�
x�+)JMU0�`01000P(J�ͬ�-I-.)fh����v�ß��w"[Z��Z[~��:�
x�M�A
�0D]����FQWB��;w"4i�ZL�K)���b��j`x��:�جw��j�G�(�q�a��s�D�Z�ۥ+m"�4��sH��^�wc9�!�Sx���5e�\29v'~P�,p��Ύ���LQx
a�y���7= 71�C��;��IW��ш�AI��B�
x�+)JMU01a040031Q� ��N͋/I-.�+��a`R�~���_��ۯ����)����
x�]S]k�@��<$s�%�Ӧ)���kV�Z�T�{�8���}�J_�ݝ���K+�����_�ٺ�؃�d 8`-�F���,9;�� ?���Z2
���w*�i[�ސP�}P��8k+����u7:�y�8������$E@e����wAe���]3+K�ή6u�re��8�u9����� kY�k��c��֍8�����S�ɬ�� -X���e����ѻ�褜�$n��s������k��7ߌ\.���f3t�}Ŧ�E��3�����t��i>�+� -I;�!�(s�W?n�-mV��XH9?Y������$jה���_F���VmZs]~� �� BO�{�K<�ⷁ%CrlI�h��wO-��\ъ�k/��z��Nѐ��㶚�rR���V�! Ӗ�B���&�������79*X�����V-�ҝG[N?݋�9K�Z@=�ʧT��RZ1|��m��{9[8,;�o�4Z0&��t�|n
ևn:��i~��R���s�=f�/ƣ)�R�8Zd�O�S�|Φg��NVo~���a��sc��χ�& ˷yY�=�^ڎ�+��z�Ʃ�`��ں.;��Č�q{!�3>>��?}�V
x�+)JMU04�`01000P�KI-(fR� �Z���˿8�`��W�?G���(����d�%�e��1lZ��\X�=���Jp�����A�J��+)JL.)fx�qFp�� ����\K��>3�KDMqrQfAI1�_��Mr��T5?�ۯx��o��]%��%� J��鱟�8�lG[I�h-o�q�J�
x�+)JMU047c040031QHI-�ɯ�/�,ɈO-�H-*�+)fH���u����N��^��w�`�P��d R.�j�t���]o�<���C�m�x8T9�Lݜ�$�B���{.�}���`����b�gʡ
Af��� �\��-�(l��g��'u���I5
x�M��
�0���7I@�88� ��Dh���Ŵ)IDB黋������w�uv���i{�#��[�0��] �6k�am��3&tH���Ȏ}�0� ���Fd�O���&�)�ݝ:���*�����D���S,��@�͘��FGSC��;��I���hB�(�|��C�
x���9�0����ȎB�<c�l��d �z$h�)��j�$����tf��'��=9���HޭHau�9�H�"�E�C��ý��uI�������)凞�C���z�Z��*���N5I� �� �Kz�p�e���N�Vo-�H
x�+)JMU��d040031Q(J�ͬ�OLN�/�+)�+��a8xD�d��7��ͻ_Z��_�}�_j(�KR��Jw�Ɯ�`��C��Q�o�<?� w�*�
x���Oo�0�9�S�rJ�4Y�*���s�`Պ���̖����.K�8YZU��C���{�ql7�6�rq��E]����o�_H#<>m�����-�O7���S���d��I�\���:g�@��:�?��Z[���Z�O���������5��I>�-ȁ,���>zV��g�:W1<!Ji�!�g�g��HRP6y`���&����; O�S�%����
7���G-��m=��$��َ� �~ �"O켄|�����x�=����m6�����ep*,���Ɛ�f?����q�4��r? ��D̪�C:b���"�,_�����x�`�MI|Qװ��������� �<��F��E��B���t��{m^F�*��ӭ�] �}�L�Î zVf.L���35��U�8D����#����i���_��]�
x����
�0 �=�)B�2ă��[����n٬�f�� c�.+l0cB{J�� ��ɪ�����e)\}�{�Py���l���X<N�r�t���|X��E���RH��/����D\[<s�� �,NV�R�&�3�0<{�;U<������6^p��k���xH�����%�pυ._ݢ6��̢�
x�͖�N�@�{��re���j!A�!$T��Ro��8��즻k B�{�>��؉q��$�l�ߌg�?��m8�68���������=u�I�ܹ��(�s�}��|�� c&�xJ@r��T��r��t��߻� ��-��Õ�(|�"Sq�rv�/M��܇��v�JP6�)JIƘ����$S4���Ŀh��Q8�L N�@�
K$Q|�����
r��L�2?8��c��]�C��\W���)H�(�D��c�P~�#Q�tS�h!��0s}�8�N ���˴foMɥ����_/`�f>1û��2�yrO f��S'N,��WC���#�Mt# �5N��EgڋZ��'-K��\�?����5�{!4 �F`[����؄ �Zm d�R/��|W9y����pC�.��������9p�����P�($�L��A;��Ty}GWg�>�X��^/�6�E�I��`QM����K���u��J���.���
�=W_G���ZE�T1A�!���Il�E�p�3A�$��K�r¶������ J�ϸ�i�)��8EBV��9��N��%��q���9��K]UkE6�G��;��҄}ԩh�I�>]�Rf-��ˑ�#%�t��frT�L�xI�Fw�/�H
P/���םN縷ڽqt����F�貂���?���3����~�K����x�����6�7Dvsu�>���i�P�2���?�&�,T�1Q�#�i���\&P�MS"��c����E����lz-��&�t�w��^f�z&)�7{W�<��]� �F����m�]���֕{�y�ʊ�n\U�Te��/*+��i�V��a�c�.)�갊�Z���^�����q`=I�pv�
�p"&�:b�״O�/}��
x�]�M�7�\ݿBG��㒪��2�A-�B�C|0,{P��4��,�^�����c2���xT�xk~��BJ-�x�V��1~�����;��j۝���ß���p��|�_��8����^��w���R�/ظ l��q���">����Kٟw���6!D?��i��ėvZ�^���I,�ھ���C���q)��N���(^�Z�x|���s�G�R?����?���V��^�����N�W=���dY���t ������u�fn������l�b2T]0UN%�ْ��0׈(�E]fu��Ө�9 Y)�[��vͲ��'�]S*���5� f�(#�lf��r�dR�K�֓�%�y��t�FrR��U�.j (�S9Hc��d����m}�����N�Y�kvA�qAƹ���lA��f��bF�<v��4 ��j�k��]Ҡ�a{����Ie�Ķ�sp���Zr�� 3�(S�kl׶��Gʬ�#�6�L}��1�M�)\c�V���T3�М�<�0���Ҭ=�4�x����Q�\�Ԥ�4A�̀�55��&�3#��fL+��|��D� �RgO>u�b ��m��!�x-���A�Mu�'�\���PT�&'rM��(��s$I �f3F�{���$�R�F�1��2t/g�I��;�Bk� �tF�$��p���sz�k���f���}�v�=�
x�mT]k�@�~�<$GN� �iK!�|@�P
^Ik�R��ܭ�[���$�j�@�������*�L�˫ˏ�T�2V���+,��n8�
���_�K�L�_/�����S<�D�Ќ��Y���A0;; p�����R2
��H��"K5vN��E3��f��a�>����8��Z�^���4 [8T�I���Į316���u����2�ւ�㼥r�s�/����u=N��:e۠ ��Jժ3fY�Vc�w��Us>�? �����C0�������:�-O���#� w���6I�lM�_�Jn0��.Г�G�94o�4D��gk�T�vңL�qe�h�)T����X]�h���0�$�]s�U+�fΝq���Re%�C��- �]�c�W��V(ȊZR&qW��~3�ڎfA�>�s�· �|,?X��$%�X��l�١�� ���Wg��ض��r��_��Y�mH ,��O�QUE�RU�@�
��a��MUN�3�+�3��9����Yʸ`���(�3V����@t�S�N�hw<9������h@[+��G��LαI_9���-�5kq��hF��7�{�tƃ����]Ȟ�����~��ϋ_aA.�;�����E{u�@��'Hc���_��p
x�+)JMU0�d040031Q� ��N��+��a�}�ٲ��N�o����s/NoWnf
767622adf17b0d960fabfb6286b47d0a758806f0
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
},
{
"files": "*.yml",
"options": {}
},
{
"files": "*.yaml",
"options": {}
},
{
"files": "*.toml",
"options": {}
},
{
"files": "*.json",
"options": {}
},
{
"files": "*.js",
"options": {}
},
{
"files": "*.ts",
"options": {}
}
]
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220ea57f31cf6a2d0febe39c8b0eac923f22315c389e9266d23468ca10dd5e33a8564736f6c63430008160033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xEA JUMPI RETURN SHR 0xF6 LOG2 0xD0 INVALID 0xBE CODECOPY 0xC8 0xB0 0xEA 0xC9 0x23 CALLCODE 0x23 ISZERO 0xC3 DUP10 0xE9 0x26 PUSH14 0x23468CA10DD5E33A8564736F6C63 NUMBER STOP ADDMOD AND STOP CALLER ",
"sourceMap": "57:4112:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220ea57f31cf6a2d0febe39c8b0eac923f22315c389e9266d23468ca10dd5e33a8564736f6c63430008160033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xEA JUMPI RETURN SHR 0xF6 LOG2 0xD0 INVALID 0xBE CODECOPY 0xC8 0xB0 0xEA 0xC9 0x23 CALLCODE 0x23 ISZERO 0xC3 DUP10 0xE9 0x26 PUSH14 0x23468CA10DD5E33A8564736F6C63 NUMBER STOP ADDMOD AND STOP CALLER ",
"sourceMap": "57:4112:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"_revert(bytes memory,string memory)": "infinite",
"functionCall(address,bytes memory)": "infinite",
"functionCall(address,bytes memory,string memory)": "infinite",
"functionCallWithValue(address,bytes memory,uint256)": "infinite",
"functionCallWithValue(address,bytes memory,uint256,string memory)": "infinite",
"functionDelegateCall(address,bytes memory)": "infinite",
"functionDelegateCall(address,bytes memory,string memory)": "infinite",
"functionStaticCall(address,bytes memory)": "infinite",
"functionStaticCall(address,bytes memory,string memory)": "infinite",
"isContract(address)": "infinite",
"sendValue(address payable,uint256)": "infinite",
"verifyCallResult(bool,bytes memory,string memory)": "infinite",
"verifyCallResultFromTarget(address,bool,bytes memory,string memory)": "infinite"
}
},
"methodIdentifiers": {}
},
"abi": []
}
{
"compiler": {
"version": "0.8.22+commit.4fc1097e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/Coins/TokenSimple.sol": "Address"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/Coins/TokenSimple.sol": {
"keccak256": "0x405003fab443c9a7de48c08b57a549f6541ef1de65424e8d8e10dc3ae4873c33",
"license": "MIT",
"urls": [
"bzz-raw://4df667497df0056dc9df88bf578a72316913c4f67a785eec82917871fb10ed2f",
"dweb:/ipfs/Qmd4AwjTapLKNnTaX4xHLtJufzQNPQ9dxz6nuEPJ5aUrKW"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"gasEstimates": null,
"methodIdentifiers": {}
},
"abi": []
}
{
"compiler": {
"version": "0.8.22+commit.4fc1097e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/Coins/TokenSimple.sol": "Context"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/Coins/TokenSimple.sol": {
"keccak256": "0x405003fab443c9a7de48c08b57a549f6541ef1de65424e8d8e10dc3ae4873c33",
"license": "MIT",
"urls": [
"bzz-raw://4df667497df0056dc9df88bf578a72316913c4f67a785eec82917871fb10ed2f",
"dweb:/ipfs/Qmd4AwjTapLKNnTaX4xHLtJufzQNPQ9dxz6nuEPJ5aUrKW"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"gasEstimates": null,
"methodIdentifiers": {
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferFrom(address,address,uint256)": "23b872dd"
}
},
"abi": [
{
"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": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.22+commit.4fc1097e"
},
"language": "Solidity",
"output": {
"abi": [
{
"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": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/Coins/TokenSimple.sol": "IERC20"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/Coins/TokenSimple.sol": {
"keccak256": "0x405003fab443c9a7de48c08b57a549f6541ef1de65424e8d8e10dc3ae4873c33",
"license": "MIT",
"urls": [
"bzz-raw://4df667497df0056dc9df88bf578a72316913c4f67a785eec82917871fb10ed2f",
"dweb:/ipfs/Qmd4AwjTapLKNnTaX4xHLtJufzQNPQ9dxz6nuEPJ5aUrKW"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"gasEstimates": null,
"methodIdentifiers": {
"owner()": "8da5cb5b",
"renounceOwnership()": "715018a6",
"transferOwnership(address)": "f2fde38b"
}
},
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.22+commit.4fc1097e"
},
"language": "Solidity",
"output": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/Coins/TokenSimple.sol": "Ownable"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/Coins/TokenSimple.sol": {
"keccak256": "0x405003fab443c9a7de48c08b57a549f6541ef1de65424e8d8e10dc3ae4873c33",
"license": "MIT",
"urls": [
"bzz-raw://4df667497df0056dc9df88bf578a72316913c4f67a785eec82917871fb10ed2f",
"dweb:/ipfs/Qmd4AwjTapLKNnTaX4xHLtJufzQNPQ9dxz6nuEPJ5aUrKW"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea264697066735822122097e78957df5e388f6dc80ee69d0bef209af1fc015b3c2b1ba82b975de93970d264736f6c63430008160033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP8 0xE7 DUP10 JUMPI 0xDF 0x5E CODESIZE DUP16 PUSH14 0xC80EE69D0BEF209AF1FC015B3C2B SHL 0xA8 0x2B SWAP8 0x5D 0xE9 CODECOPY PUSH17 0xD264736F6C634300081600330000000000 ",
"sourceMap": "4171:2229:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea264697066735822122097e78957df5e388f6dc80ee69d0bef209af1fc015b3c2b1ba82b975de93970d264736f6c63430008160033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP8 0xE7 DUP10 JUMPI 0xDF 0x5E CODESIZE DUP16 PUSH14 0xC80EE69D0BEF209AF1FC015B3C2B SHL 0xA8 0x2B SWAP8 0x5D 0xE9 CODECOPY PUSH17 0xD264736F6C634300081600330000000000 ",
"sourceMap": "4171:2229:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"add(uint256,uint256)": "infinite",
"div(uint256,uint256)": "infinite",
"div(uint256,uint256,string memory)": "infinite",
"mod(uint256,uint256)": "infinite",
"mod(uint256,uint256,string memory)": "infinite",
"mul(uint256,uint256)": "infinite",
"sub(uint256,uint256)": "infinite",
"sub(uint256,uint256,string memory)": "infinite",
"tryAdd(uint256,uint256)": "infinite",
"tryDiv(uint256,uint256)": "infinite",
"tryMod(uint256,uint256)": "infinite",
"tryMul(uint256,uint256)": "infinite",
"trySub(uint256,uint256)": "infinite"
}
},
"methodIdentifiers": {}
},
"abi": []
}
{
"compiler": {
"version": "0.8.22+commit.4fc1097e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/Coins/TokenSimple.sol": "SafeMath"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/Coins/TokenSimple.sol": {
"keccak256": "0x405003fab443c9a7de48c08b57a549f6541ef1de65424e8d8e10dc3ae4873c33",
"license": "MIT",
"urls": [
"bzz-raw://4df667497df0056dc9df88bf578a72316913c4f67a785eec82917871fb10ed2f",
"dweb:/ipfs/Qmd4AwjTapLKNnTaX4xHLtJufzQNPQ9dxz6nuEPJ5aUrKW"
]
}
},
"version": 1
}
// SPDX-License-Identifier: MIN
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
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(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 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 (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 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 (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
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 (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to)
external
returns (uint256 amount0, uint256 amount1);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract CoinToken is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcluded;
address[] private _excluded;
address public _devWalletAddress; // TODO - team wallet here
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
string private _name;
string private _symbol;
uint256 private _decimals;
uint256 public _taxFee;
uint256 private _previousTaxFee;
uint256 public _devFee;
uint256 private _previousDevFee;
uint256 public _liquidityFee;
uint256 private _previousLiquidityFee;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
uint256 public _maxTxAmount;
uint256 public numTokensSellToAddToLiquidity;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
constructor(
string memory _NAME,
string memory _SYMBOL,
uint256 _DECIMALS,
uint256 _supply,
uint256 _txFee,
uint256 _lpFee,
uint256 _DexFee,
address routerAddress,
address feeaddress,
address tokenOwner,
address service
) payable {
_name = _NAME;
_symbol = _SYMBOL;
_decimals = _DECIMALS;
_tTotal = _supply * 10**_decimals;
_rTotal = (MAX - (MAX % _tTotal));
_taxFee = _txFee;
_liquidityFee = _lpFee;
_previousTaxFee = _txFee;
_devFee = _DexFee;
_previousDevFee = _devFee;
_previousLiquidityFee = _lpFee;
_maxTxAmount = ((_tTotal * 5) / 1000) * 10**_decimals;
numTokensSellToAddToLiquidity = ((_tTotal * 5) / 10000) * 10**_decimals;
_devWalletAddress = feeaddress;
_rOwned[tokenOwner] = _rTotal;
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(routerAddress);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;
//exclude owner and this contract from fee
_isExcludedFromFee[tokenOwner] = true;
_isExcludedFromFee[address(this)] = true;
_transferOwnership(tokenOwner);
payable(service).transfer(msg.value);
emit Transfer(address(0), tokenOwner, _tTotal);
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint256) {
return _decimals;
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
if (_isExcluded[account]) return _tOwned[account];
return tokenFromReflection(_rOwned[account]);
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()].sub(
amount,
"ERC20: transfer amount exceeds allowance"
)
);
return true;
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].add(addedValue)
);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].sub(
subtractedValue,
"ERC20: decreased allowance below zero"
)
);
return true;
}
function isExcludedFromReward(address account) public view returns (bool) {
return _isExcluded[account];
}
function totalFees() public view returns (uint256) {
return _tFeeTotal;
}
function deliver(uint256 tAmount) public {
address sender = _msgSender();
require(
!_isExcluded[sender],
"Excluded addresses cannot call this function"
);
(uint256 rAmount, , , , , , ) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
public
view
returns (uint256)
{
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
(uint256 rAmount, , , , , , ) = _getValues(tAmount);
return rAmount;
} else {
(, uint256 rTransferAmount, , , , , ) = _getValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount)
public
view
returns (uint256)
{
require(
rAmount <= _rTotal,
"Amount must be less than total reflections"
);
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
}
function excludeFromReward(address account) public onlyOwner {
require(!_isExcluded[account], "Account is already excluded");
if (_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
function includeInReward(address account) external onlyOwner {
require(_isExcluded[account], "Account is already included");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcluded[account] = false;
_excluded.pop();
break;
}
}
}
function _transferBothExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function excludeFromFee(address account) public onlyOwner {
_isExcludedFromFee[account] = true;
}
function includeInFee(address account) public onlyOwner {
_isExcludedFromFee[account] = false;
}
function setTaxFeePercent(uint256 taxFee) external onlyOwner {
_taxFee = taxFee;
}
function setDevFeePercent(uint256 devFee) external onlyOwner {
_devFee = devFee;
}
function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner {
_liquidityFee = liquidityFee;
}
function setMaxTxPercent(uint256 maxTxPercent) public onlyOwner {
_maxTxAmount = maxTxPercent * 10**_decimals;
}
function setDevWalletAddress(address _addr) public onlyOwner {
_devWalletAddress = _addr;
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
swapAndLiquifyEnabled = _enabled;
emit SwapAndLiquifyEnabledUpdated(_enabled);
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _reflectFee(uint256 rFee, uint256 tFee) private {
_rTotal = _rTotal.sub(rFee);
_tFeeTotal = _tFeeTotal.add(tFee);
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
(
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getTValues(tAmount);
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(
tAmount,
tFee,
tLiquidity,
tDev,
_getRate()
);
return (
rAmount,
rTransferAmount,
rFee,
tTransferAmount,
tFee,
tLiquidity,
tDev
);
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
uint256 tFee = calculateTaxFee(tAmount);
uint256 tLiquidity = calculateLiquidityFee(tAmount);
uint256 tDev = calculateDevFee(tAmount);
uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tDev);
return (tTransferAmount, tFee, tLiquidity, tDev);
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
uint256 rAmount = tAmount.mul(currentRate);
uint256 rFee = tFee.mul(currentRate);
uint256 rLiquidity = tLiquidity.mul(currentRate);
uint256 rDev = tDev.mul(currentRate);
uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity).sub(rDev);
return (rAmount, rTransferAmount, rFee);
}
function _getRate() private view returns (uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply.div(tSupply);
}
function _getCurrentSupply() private view returns (uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (
_rOwned[_excluded[i]] > rSupply ||
_tOwned[_excluded[i]] > tSupply
) return (_rTotal, _tTotal);
rSupply = rSupply.sub(_rOwned[_excluded[i]]);
tSupply = tSupply.sub(_tOwned[_excluded[i]]);
}
if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function _takeLiquidity(uint256 tLiquidity) private {
uint256 currentRate = _getRate();
uint256 rLiquidity = tLiquidity.mul(currentRate);
_rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
if (_isExcluded[address(this)])
_tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
}
function _takeDev(uint256 tDev) private {
uint256 currentRate = _getRate();
uint256 rDev = tDev.mul(currentRate);
_rOwned[_devWalletAddress] = _rOwned[_devWalletAddress].add(rDev);
if (_isExcluded[_devWalletAddress])
_tOwned[_devWalletAddress] = _tOwned[_devWalletAddress].add(tDev);
}
function calculateTaxFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_taxFee).div(10**2);
}
function calculateDevFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_devFee).div(10**2);
}
function calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
return _amount.mul(_liquidityFee).div(10**2);
}
function removeAllFee() private {
_previousTaxFee = _taxFee;
_previousDevFee = _devFee;
_previousLiquidityFee = _liquidityFee;
_taxFee = 0;
_devFee = 0;
_liquidityFee = 0;
}
function restoreAllFee() private {
_taxFee = _previousTaxFee;
_devFee = _previousDevFee;
_liquidityFee = _previousLiquidityFee;
}
function isExcludedFromFee(address account) public view returns (bool) {
return _isExcludedFromFee[account];
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && to != owner())
require(
amount <= _maxTxAmount,
"Transfer amount exceeds the maxTxAmount."
);
uint256 contractTokenBalance = balanceOf(address(this));
if (contractTokenBalance >= _maxTxAmount) {
contractTokenBalance = _maxTxAmount;
}
bool overMinTokenBalance = contractTokenBalance >=
numTokensSellToAddToLiquidity;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled
) {
contractTokenBalance = numTokensSellToAddToLiquidity;
swapAndLiquify(contractTokenBalance);
}
bool takeFee = true;
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
takeFee = false;
}
_tokenTransfer(from, to, amount, takeFee);
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
uint256 half = contractTokenBalance.div(2);
uint256 otherHalf = contractTokenBalance.sub(half);
uint256 initialBalance = address(this).balance;
swapTokensForEth(half);
uint256 newBalance = address(this).balance.sub(initialBalance);
addLiquidity(otherHalf, newBalance);
emit SwapAndLiquify(half, newBalance, otherHalf);
}
function swapTokensForEth(uint256 tokenAmount) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0, // slippage is unavoidable
0, // slippage is unavoidable
owner(),
block.timestamp
);
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
if (!takeFee) removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded[recipient]) {
_transferToExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
_transferStandard(sender, recipient, amount);
} else if (_isExcluded[sender] && _isExcluded[recipient]) {
_transferBothExcluded(sender, recipient, amount);
} else {
_transferStandard(sender, recipient, amount);
}
if (!takeFee) restoreAllFee();
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferToExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferFromExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function setRouterAddress(address newRouter) external onlyOwner {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(newRouter);
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
}
function setNumTokensSellToAddToLiquidity(uint256 amountToUpdate)
external
onlyOwner
{
numTokensSellToAddToLiquidity = amountToUpdate;
}
}
// SPDX-License-Identifier: MIN
pragma solidity ^0.8.18;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
}
}
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
contract CoinToken is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcluded;
address[] private _excluded;
string private _NAME;
string private _SYMBOL;
uint256 private _DECIMALS;
address public FeeAddress;
uint256 private _MAX = ~uint256(0);
uint256 private _DECIMALFACTOR;
uint256 private _GRANULARITY = 100;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
uint256 private _tBurnTotal;
uint256 private _tCharityTotal;
uint256 public _TAX_FEE;
uint256 public _BURN_FEE;
uint256 public _CHARITY_FEE;
// Track original fees to bypass fees for charity account
uint256 private ORIG_TAX_FEE;
uint256 private ORIG_BURN_FEE;
uint256 private ORIG_CHARITY_FEE;
constructor(
string memory _name,
string memory _symbol,
uint256 _decimals,
uint256 _supply,
uint256 _txFee,
uint256 _burnFee,
uint256 _charityFee,
address _FeeAddress,
address tokenOwner
) payable {
_NAME = _name;
_SYMBOL = _symbol;
_DECIMALS = _decimals;
_DECIMALFACTOR = 10**_DECIMALS;
_tTotal = _supply * _DECIMALFACTOR;
_rTotal = (_MAX - (_MAX % _tTotal));
_TAX_FEE = _txFee * 100;
_BURN_FEE = _burnFee * 100;
_CHARITY_FEE = _charityFee * 100;
ORIG_TAX_FEE = _TAX_FEE;
ORIG_BURN_FEE = _BURN_FEE;
ORIG_CHARITY_FEE = _CHARITY_FEE;
FeeAddress = _FeeAddress;
_transferOwnership(tokenOwner);
_rOwned[tokenOwner] = _rTotal;
emit Transfer(address(0), tokenOwner, _tTotal);
}
function name() public view returns (string memory) {
return _NAME;
}
function symbol() public view returns (string memory) {
return _SYMBOL;
}
function decimals() public view returns (uint8) {
return uint8(_DECIMALS);
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
if (_isExcluded[account]) return _tOwned[account];
return tokenFromReflection(_rOwned[account]);
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()].sub(
amount,
"TOKEN20: transfer amount exceeds allowance"
)
);
return true;
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].add(addedValue)
);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].sub(
subtractedValue,
"TOKEN20: decreased allowance below zero"
)
);
return true;
}
function isExcluded(address account) public view returns (bool) {
return _isExcluded[account];
}
function totalFees() public view returns (uint256) {
return _tFeeTotal;
}
function totalBurn() public view returns (uint256) {
return _tBurnTotal;
}
function totalCharity() public view returns (uint256) {
return _tCharityTotal;
}
function deliver(uint256 tAmount) public {
address sender = _msgSender();
require(
!_isExcluded[sender],
"Excluded addresses cannot call this function"
);
(uint256 rAmount, , , , , , ) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
public
view
returns (uint256)
{
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
(uint256 rAmount, , , , , , ) = _getValues(tAmount);
return rAmount;
} else {
(, uint256 rTransferAmount, , , , , ) = _getValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount)
public
view
returns (uint256)
{
require(
rAmount <= _rTotal,
"Amount must be less than total reflections"
);
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
}
function excludeAccount(address account) external onlyOwner {
require(!_isExcluded[account], "Account is already excluded");
if (_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
function includeAccount(address account) external onlyOwner {
require(_isExcluded[account], "Account is already included");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcluded[account] = false;
_excluded.pop();
break;
}
}
}
function setAsCharityAccount(address account) external onlyOwner {
FeeAddress = account;
}
function updateFee(
uint256 _txFee,
uint256 _burnFee,
uint256 _charityFee
) public onlyOwner {
require(_txFee < 100 && _burnFee < 100 && _charityFee < 100);
_TAX_FEE = _txFee * 100;
_BURN_FEE = _burnFee * 100;
_CHARITY_FEE = _charityFee * 100;
ORIG_TAX_FEE = _TAX_FEE;
ORIG_BURN_FEE = _BURN_FEE;
ORIG_CHARITY_FEE = _CHARITY_FEE;
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
require(owner != address(0), "TOKEN20: approve from the zero address");
require(spender != address(0), "TOKEN20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(
address sender,
address recipient,
uint256 amount
) private {
require(
sender != address(0),
"TOKEN20: transfer from the zero address"
);
require(
recipient != address(0),
"TOKEN20: transfer to the zero address"
);
require(amount > 0, "Transfer amount must be greater than zero");
// Remove fees for transfers to and from charity account or to excluded account
bool takeFee = true;
if (
FeeAddress == sender ||
FeeAddress == recipient ||
_isExcluded[recipient]
) {
takeFee = false;
}
if (!takeFee) removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded[recipient]) {
_transferToExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
_transferStandard(sender, recipient, amount);
} else if (_isExcluded[sender] && _isExcluded[recipient]) {
_transferBothExcluded(sender, recipient, amount);
} else {
_transferStandard(sender, recipient, amount);
}
if (!takeFee) restoreAllFee();
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
uint256 currentRate = _getRate();
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tBurn,
uint256 tCharity
) = _getValues(tAmount);
uint256 rBurn = tBurn.mul(currentRate);
_standardTransferContent(sender, recipient, rAmount, rTransferAmount);
_sendToCharity(tCharity, sender);
_reflectFee(rFee, rBurn, tFee, tBurn, tCharity);
emit Transfer(sender, recipient, tTransferAmount);
}
function _standardTransferContent(
address sender,
address recipient,
uint256 rAmount,
uint256 rTransferAmount
) private {
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
}
function _transferToExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
uint256 currentRate = _getRate();
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tBurn,
uint256 tCharity
) = _getValues(tAmount);
uint256 rBurn = tBurn.mul(currentRate);
_excludedFromTransferContent(
sender,
recipient,
tTransferAmount,
rAmount,
rTransferAmount
);
_sendToCharity(tCharity, sender);
_reflectFee(rFee, rBurn, tFee, tBurn, tCharity);
emit Transfer(sender, recipient, tTransferAmount);
}
function _excludedFromTransferContent(
address sender,
address recipient,
uint256 tTransferAmount,
uint256 rAmount,
uint256 rTransferAmount
) private {
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
}
function _transferFromExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
uint256 currentRate = _getRate();
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tBurn,
uint256 tCharity
) = _getValues(tAmount);
uint256 rBurn = tBurn.mul(currentRate);
_excludedToTransferContent(
sender,
recipient,
tAmount,
rAmount,
rTransferAmount
);
_sendToCharity(tCharity, sender);
_reflectFee(rFee, rBurn, tFee, tBurn, tCharity);
emit Transfer(sender, recipient, tTransferAmount);
}
function _excludedToTransferContent(
address sender,
address recipient,
uint256 tAmount,
uint256 rAmount,
uint256 rTransferAmount
) private {
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
}
function _transferBothExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
uint256 currentRate = _getRate();
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tBurn,
uint256 tCharity
) = _getValues(tAmount);
uint256 rBurn = tBurn.mul(currentRate);
_bothTransferContent(
sender,
recipient,
tAmount,
rAmount,
tTransferAmount,
rTransferAmount
);
_sendToCharity(tCharity, sender);
_reflectFee(rFee, rBurn, tFee, tBurn, tCharity);
emit Transfer(sender, recipient, tTransferAmount);
}
function _bothTransferContent(
address sender,
address recipient,
uint256 tAmount,
uint256 rAmount,
uint256 tTransferAmount,
uint256 rTransferAmount
) private {
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
}
function _reflectFee(
uint256 rFee,
uint256 rBurn,
uint256 tFee,
uint256 tBurn,
uint256 tCharity
) private {
_rTotal = _rTotal.sub(rFee).sub(rBurn);
_tFeeTotal = _tFeeTotal.add(tFee);
_tBurnTotal = _tBurnTotal.add(tBurn);
_tCharityTotal = _tCharityTotal.add(tCharity);
_tTotal = _tTotal.sub(tBurn);
emit Transfer(address(this), address(0), tBurn);
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
(uint256 tFee, uint256 tBurn, uint256 tCharity) = _getTBasics(
tAmount,
_TAX_FEE,
_BURN_FEE,
_CHARITY_FEE
);
uint256 tTransferAmount = getTTransferAmount(
tAmount,
tFee,
tBurn,
tCharity
);
uint256 currentRate = _getRate();
(uint256 rAmount, uint256 rFee) = _getRBasics(
tAmount,
tFee,
currentRate
);
uint256 rTransferAmount = _getRTransferAmount(
rAmount,
rFee,
tBurn,
tCharity,
currentRate
);
return (
rAmount,
rTransferAmount,
rFee,
tTransferAmount,
tFee,
tBurn,
tCharity
);
}
function _getTBasics(
uint256 tAmount,
uint256 taxFee,
uint256 burnFee,
uint256 charityFee
)
private
view
returns (
uint256,
uint256,
uint256
)
{
uint256 tFee = ((tAmount.mul(taxFee)).div(_GRANULARITY)).div(100);
uint256 tBurn = ((tAmount.mul(burnFee)).div(_GRANULARITY)).div(100);
uint256 tCharity = ((tAmount.mul(charityFee)).div(_GRANULARITY)).div(
100
);
return (tFee, tBurn, tCharity);
}
function getTTransferAmount(
uint256 tAmount,
uint256 tFee,
uint256 tBurn,
uint256 tCharity
) private pure returns (uint256) {
return tAmount.sub(tFee).sub(tBurn).sub(tCharity);
}
function _getRBasics(
uint256 tAmount,
uint256 tFee,
uint256 currentRate
) private pure returns (uint256, uint256) {
uint256 rAmount = tAmount.mul(currentRate);
uint256 rFee = tFee.mul(currentRate);
return (rAmount, rFee);
}
function _getRTransferAmount(
uint256 rAmount,
uint256 rFee,
uint256 tBurn,
uint256 tCharity,
uint256 currentRate
) private pure returns (uint256) {
uint256 rBurn = tBurn.mul(currentRate);
uint256 rCharity = tCharity.mul(currentRate);
uint256 rTransferAmount = rAmount.sub(rFee).sub(rBurn).sub(rCharity);
return rTransferAmount;
}
function _getRate() private view returns (uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply.div(tSupply);
}
function _getCurrentSupply() private view returns (uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (
_rOwned[_excluded[i]] > rSupply ||
_tOwned[_excluded[i]] > tSupply
) return (_rTotal, _tTotal);
rSupply = rSupply.sub(_rOwned[_excluded[i]]);
tSupply = tSupply.sub(_tOwned[_excluded[i]]);
}
if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function _sendToCharity(uint256 tCharity, address sender) private {
uint256 currentRate = _getRate();
uint256 rCharity = tCharity.mul(currentRate);
_rOwned[FeeAddress] = _rOwned[FeeAddress].add(rCharity);
_tOwned[FeeAddress] = _tOwned[FeeAddress].add(tCharity);
emit Transfer(sender, FeeAddress, tCharity);
}
function removeAllFee() private {
if (_TAX_FEE == 0 && _BURN_FEE == 0 && _CHARITY_FEE == 0) return;
ORIG_TAX_FEE = _TAX_FEE;
ORIG_BURN_FEE = _BURN_FEE;
ORIG_CHARITY_FEE = _CHARITY_FEE;
_TAX_FEE = 0;
_BURN_FEE = 0;
_CHARITY_FEE = 0;
}
function restoreAllFee() private {
_TAX_FEE = ORIG_TAX_FEE;
_BURN_FEE = ORIG_BURN_FEE;
_CHARITY_FEE = ORIG_CHARITY_FEE;
}
function _getTaxFee() private view returns (uint256) {
return _TAX_FEE;
}
}
/**
*Submitted for verification at BscScan.com on 2023-11-12
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by 'account'.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves 'amount' tokens from the caller's account to 'recipient'.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that 'spender' will be
* allowed to spend on behalf of 'owner' through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets 'amount' as the allowance of 'spender' over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves 'amount' tokens from 'sender' to 'recipient' using the
* allowance mechanism. 'amount' is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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 Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/*
* @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 Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning 'false' on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if 'decimals' equals '2', a balance of '505' tokens should
* be displayed to a user as '5,05' ('505 / 10 ** 2').
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - 'recipient' cannot be the zero address.
* - the caller must have a balance of at least 'amount'.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - 'sender' and 'recipient' cannot be the zero address.
* - 'sender' must have a balance of at least 'amount'.
* - the caller must have allowance for ''sender'''s tokens of at least
* 'amount'.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to 'spender' by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to 'spender' by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
* - 'spender' must have allowance for the caller of at least
* 'subtractedValue'.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves 'amount' of tokens from 'sender' to 'recipient'.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - 'sender' cannot be the zero address.
* - 'recipient' cannot be the zero address.
* - 'sender' must have a balance of at least 'amount'.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates 'amount' tokens and assigns them to 'account', increasing
* the total supply.
*
* Emits a {Transfer} event with 'from' set to the zero address.
*
* Requirements:
*
* - 'account' cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys 'amount' tokens from 'account', reducing the
* total supply.
*
* Emits a {Transfer} event with 'to' set to the zero address.
*
* Requirements:
*
* - 'account' cannot be the zero address.
* - 'account' must have at least 'amount' tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets 'amount' as the allowance of 'spender' over the 'owner' s tokens.
*
* This internal function is equivalent to 'approve', and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - 'owner' cannot be the zero address.
* - 'spender' cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when 'from' and 'to' are both non-zero, 'amount' of ''from'''s tokens
* will be transferred to 'to'.
* - when 'from' is zero, 'amount' tokens will be minted for 'to'.
* - when 'to' is zero, 'amount' of ''from'''s tokens will be burned.
* - 'from' and 'to' are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when 'from' and 'to' are both non-zero, 'amount' of ''from'''s tokens
* has been transferred to 'to'.
* - when 'from' is zero, 'amount' tokens have been minted for 'to'.
* - when 'to' is zero, 'amount' of ''from'''s tokens have been burned.
* - 'from' and 'to' are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* 'onlyOwner', which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* 'onlyOwner' functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account ('newOwner').
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) internal {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers 'whenNotPaused' and 'whenPaused', which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by 'account'.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by 'account'.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
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;
}
contract MY_CHIQUITO is ERC20, Ownable, Pausable {
// CONFIG START
uint256 private initialSupply;
uint256 private denominator = 100;
uint256 private swapThreshold = 0.0000005 ether; // The contract will only swap to ETH, once the fee tokens reach the specified threshold
uint256 private devTaxBuy;
uint256 private marketingTaxBuy;
uint256 private liquidityTaxBuy;
uint256 private charityTaxBuy;
uint256 private devTaxSell;
uint256 private marketingTaxSell;
uint256 private liquidityTaxSell;
uint256 private charityTaxSell;
address private devTaxWallet;
address private marketingTaxWallet;
address private liquidityTaxWallet;
address private charityTaxWallet;
// CONFIG END
uint256 public Optimization = 7312005167508960622596991100517067;
mapping (address => bool) private excludeList;
mapping (string => uint256) private buyTaxes;
mapping (string => uint256) private sellTaxes;
mapping (string => address) private taxWallets;
bool public taxStatus = true;
IUniswapV2Router02 private uniswapV2Router02;
IUniswapV2Factory private uniswapV2Factory;
IUniswapV2Pair private uniswapV2Pair;
constructor(string memory _tokenName,string memory _tokenSymbol,uint256 _supply,address[6] memory _addr,uint256[8] memory _value) ERC20(_tokenName, _tokenSymbol)
{
initialSupply =_supply * (10**18);
_setOwner(_addr[5]);
uniswapV2Router02 = IUniswapV2Router02(_addr[1]);
uniswapV2Factory = IUniswapV2Factory(uniswapV2Router02.factory());
uniswapV2Pair = IUniswapV2Pair(uniswapV2Factory.createPair(address(this), uniswapV2Router02.WETH()));
taxWallets["liquidity"] = _addr[3];
setBuyTax(_value[0], _value[1], _value[3], _value[2]);
setSellTax(_value[4], _value[5], _value[7], _value[6]);
setTaxWallets(_addr[2], _addr[3], _addr[4]);
exclude(msg.sender);
exclude(address(this));
_mint(msg.sender, initialSupply);
}
uint256 private marketingTokens;
uint256 private devTokens;
uint256 private liquidityTokens;
uint256 private charityTokens;
/**
* @dev Calculates the tax, transfer it to the contract. If the user is selling, and the swap threshold is met, it executes the tax.
*/
function handleTax(address from, address to, uint256 amount) private returns (uint256) {
address[] memory sellPath = new address[](2);
sellPath[0] = address(this);
sellPath[1] = uniswapV2Router02.WETH();
if(!isExcluded(from) && !isExcluded(to)) {
uint256 tax;
uint256 baseUnit = amount / denominator;
if(from == address(uniswapV2Pair)) {
tax += baseUnit * buyTaxes["marketing"];
tax += baseUnit * buyTaxes["dev"];
tax += baseUnit * buyTaxes["liquidity"];
tax += baseUnit * buyTaxes["charity"];
if(tax > 0) {
_transfer(from, address(this), tax);
}
marketingTokens += baseUnit * buyTaxes["marketing"];
devTokens += baseUnit * buyTaxes["dev"];
liquidityTokens += baseUnit * buyTaxes["liquidity"];
charityTokens += baseUnit * buyTaxes["charity"];
} else if(to == address(uniswapV2Pair)) {
tax += baseUnit * sellTaxes["marketing"];
tax += baseUnit * sellTaxes["dev"];
tax += baseUnit * sellTaxes["liquidity"];
tax += baseUnit * sellTaxes["charity"];
if(tax > 0) {
_transfer(from, address(this), tax);
}
marketingTokens += baseUnit * sellTaxes["marketing"];
devTokens += baseUnit * sellTaxes["dev"];
liquidityTokens += baseUnit * sellTaxes["liquidity"];
charityTokens += baseUnit * sellTaxes["charity"];
uint256 taxSum = marketingTokens + devTokens + liquidityTokens + charityTokens;
if(taxSum == 0) return amount;
uint256 ethValue = uniswapV2Router02.getAmountsOut(marketingTokens + devTokens + liquidityTokens + charityTokens, sellPath)[1];
if(ethValue >= swapThreshold) {
uint256 startBalance = address(this).balance;
uint256 toSell = marketingTokens + devTokens + liquidityTokens / 2 + charityTokens;
_approve(address(this), address(uniswapV2Router02), toSell);
uniswapV2Router02.swapExactTokensForETH(
toSell,
0,
sellPath,
address(this),
block.timestamp
);
uint256 ethGained = address(this).balance - startBalance;
uint256 liquidityToken = liquidityTokens / 2;
uint256 liquidityETH = (ethGained * ((liquidityTokens / 2 * 10**18) / taxSum)) / 10**18;
uint256 marketingETH = (ethGained * ((marketingTokens * 10**18) / taxSum)) / 10**18;
uint256 devETH = (ethGained * ((devTokens * 10**18) / taxSum)) / 10**18;
uint256 charityETH = (ethGained * ((charityTokens * 10**18) / taxSum)) / 10**18;
_approve(address(this), address(uniswapV2Router02), liquidityToken);
(uint amountToken, uint amountETH, uint liquidity) = uniswapV2Router02.addLiquidityETH{value: liquidityETH}(
address(this),
liquidityToken,
0,
0,
taxWallets["liquidity"],
block.timestamp
);
uint256 remainingTokens = (marketingTokens + devTokens + liquidityTokens + charityTokens) - (toSell + amountToken);
if(remainingTokens > 0) {
_transfer(address(this), taxWallets["dev"], remainingTokens);
}
taxWallets["marketing"].call{value: marketingETH}("");
taxWallets["dev"].call{value: devETH}("");
taxWallets["charity"].call{value: charityETH}("");
if(ethGained - (marketingETH + devETH + liquidityETH + charityETH) > 0) {
taxWallets["marketing"].call{value: ethGained - (marketingETH + devETH + liquidityETH + charityETH)}("");
}
marketingTokens = 0;
devTokens = 0;
liquidityTokens = 0;
charityTokens = 0;
}
}
amount -= tax;
}
return amount;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override virtual {
if(taxStatus) {
amount = handleTax(sender, recipient, amount);
}
super._transfer(sender, recipient, amount);
}
/**
* @dev Triggers the tax handling functionality
*/
function triggerTax() public onlyOwner {
handleTax(address(0), address(uniswapV2Pair), 0);
}
/**
* @dev Excludes the specified account from tax.
*/
function exclude(address account) public onlyOwner {
require(!isExcluded(account), "CoinToken: Account is already excluded");
excludeList[account] = true;
}
/**
* @dev Re-enables tax on the specified account.
*/
function removeExclude(address account) public onlyOwner {
require(isExcluded(account), "CoinToken: Account is not excluded");
excludeList[account] = false;
}
/**
* @dev Sets tax for buys.
*/
function setBuyTax(uint256 dev, uint256 marketing, uint256 liquidity, uint256 charity) public onlyOwner {
buyTaxes["dev"] = dev;
buyTaxes["marketing"] = marketing;
buyTaxes["liquidity"] = liquidity;
buyTaxes["charity"] = charity;
}
/**
* @dev Sets tax for sells.
*/
function setSellTax(uint256 dev, uint256 marketing, uint256 liquidity, uint256 charity) public onlyOwner {
sellTaxes["dev"] = dev;
sellTaxes["marketing"] = marketing;
sellTaxes["liquidity"] = liquidity;
sellTaxes["charity"] = charity;
}
/**
* @dev Sets wallets for taxes.
*/
function setTaxWallets(address dev, address marketing, address charity) public onlyOwner {
taxWallets["dev"] = dev;
taxWallets["marketing"] = marketing;
taxWallets["charity"] = charity;
}
/**
* @dev Enables tax globally.
*/
function enableTax() public onlyOwner {
require(!taxStatus, "CoinToken: Tax is already enabled");
taxStatus = true;
}
/**
* @dev Disables tax globally.
*/
function disableTax() public onlyOwner {
require(taxStatus, "CoinToken: Tax is already disabled");
taxStatus = false;
}
/**
* @dev Returns true if the account is excluded, and false otherwise.
*/
function isExcluded(address account) public view returns (bool) {
return excludeList[account];
}
receive() external payable {}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by 'account'.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves 'amount' tokens from the caller's account to 'recipient'.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount)
external
returns (bool);
/**
* @dev Returns the remaining number of tokens that 'spender' will be
* allowed to spend on behalf of 'owner' through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender)
external
view
returns (uint256);
/**
* @dev Sets 'amount' as the allowance of 'spender' over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves 'amount' tokens from 'sender' to 'recipient' using the
* allowance mechanism. 'amount' is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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 Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/*
* @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 Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning 'false' on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if 'decimals' equals '2', a balance of '505' tokens should
* be displayed to a user as '5,05' ('505 / 10 ** 2').
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - 'recipient' cannot be the zero address.
* - the caller must have a balance of at least 'amount'.
*/
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
*/
function approve(address spender, uint256 amount)
public
virtual
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - 'sender' and 'recipient' cannot be the zero address.
* - 'sender' must have a balance of at least 'amount'.
* - the caller must have allowance for ''sender'''s tokens of at least
* 'amount'.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(
currentAllowance >= amount,
"ERC20: transfer amount exceeds allowance"
);
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to 'spender' by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender] + addedValue
);
return true;
}
/**
* @dev Atomically decreases the allowance granted to 'spender' by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
* - 'spender' must have allowance for the caller of at least
* 'subtractedValue'.
*/
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves 'amount' of tokens from 'sender' to 'recipient'.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - 'sender' cannot be the zero address.
* - 'recipient' cannot be the zero address.
* - 'sender' must have a balance of at least 'amount'.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(
senderBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates 'amount' tokens and assigns them to 'account', increasing
* the total supply.
*
* Emits a {Transfer} event with 'from' set to the zero address.
*
* Requirements:
*
* - 'account' cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys 'amount' tokens from 'account', reducing the
* total supply.
*
* Emits a {Transfer} event with 'to' set to the zero address.
*
* Requirements:
*
* - 'account' cannot be the zero address.
* - 'account' must have at least 'amount' tokens.
*/
/* function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
} */
/**
* @dev Sets 'amount' as the allowance of 'spender' over the 'owner' s tokens.
*
* This internal function is equivalent to 'approve', and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - 'owner' cannot be the zero address.
* - 'spender' cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when 'from' and 'to' are both non-zero, 'amount' of ''from'''s tokens
* will be transferred to 'to'.
* - when 'from' is zero, 'amount' tokens will be minted for 'to'.
* - when 'to' is zero, 'amount' of ''from'''s tokens will be burned.
* - 'from' and 'to' are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when 'from' and 'to' are both non-zero, 'amount' of ''from'''s tokens
* has been transferred to 'to'.
* - when 'from' is zero, 'amount' tokens have been minted for 'to'.
* - when 'to' is zero, 'amount' of ''from'''s tokens have been burned.
* - 'from' and 'to' are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* 'onlyOwner', which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* 'onlyOwner' functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account ('newOwner').
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_setOwner(newOwner);
}
function _setOwner(address newOwner) internal {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 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 (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 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 (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
/* event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
); */
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
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 (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
/* function burn(address to)
external
returns (uint256 amount0, uint256 amount1); */
function swap(
uint256 amount0Out,
uint256 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,
uint256
);
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(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
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,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract TokenAdvanced is ERC20, Ownable {
// CONFIG START
uint256 private initialSupply;
uint256 private denominator = 100;
uint256 private swapThreshold = 0.0000005 ether; // The contract will only swap to ETH, once the fee tokens reach the specified threshold
uint256 private devTaxBuy;
uint256 private marketingTaxBuy;
uint256 private liquidityTaxBuy;
uint256 private charityTaxBuy;
uint256 private devTaxSell;
uint256 private marketingTaxSell;
uint256 private liquidityTaxSell;
uint256 private charityTaxSell;
address private devTaxWallet;
address private marketingTaxWallet;
address private liquidityTaxWallet;
address private charityTaxWallet;
// CONFIG END
mapping(address => bool) private excludeList;
mapping(string => uint256) private buyTaxes;
mapping(string => uint256) private sellTaxes;
mapping(string => address) private taxWallets;
bool public taxStatus = true;
IUniswapV2Router02 private uniswapV2Router02;
IUniswapV2Factory private uniswapV2Factory;
IUniswapV2Pair private uniswapV2Pair;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _supply,
address[5] memory _addr,
uint256[8] memory _value
) payable ERC20(_tokenName, _tokenSymbol) {
initialSupply = _supply * (10**18);
_setOwner(_addr[4]);
uniswapV2Router02 = IUniswapV2Router02(_addr[0]);
uniswapV2Factory = IUniswapV2Factory(uniswapV2Router02.factory());
uniswapV2Pair = IUniswapV2Pair(
uniswapV2Factory.createPair(address(this), uniswapV2Router02.WETH())
);
taxWallets["liquidity"] = _addr[2];
setBuyTax(_value[0], _value[1], _value[3], _value[2]);
setSellTax(_value[4], _value[5], _value[7], _value[6]);
setTaxWallets(_addr[1], _addr[2], _addr[3]);
payable(_addr[4]).transfer(msg.value);
_mint(msg.sender, initialSupply);
}
uint256 private marketingTokens;
uint256 private devTokens;
uint256 private liquidityTokens;
uint256 private charityTokens;
/**
* @dev Calculates the tax, transfer it to the contract. If the user is selling, and the swap threshold is met, it executes the tax.
*/
function handleTax(address from, address to, uint256 amount) private returns (uint256) {
address[] memory sellPath = new address[](2);
sellPath[0] = address(this);
sellPath[1] = uniswapV2Router02.WETH();
if(!isExcluded(from) && !isExcluded(to)) {
uint256 tax;
uint256 baseUnit = amount / denominator;
if(from == address(uniswapV2Pair)) {
tax += baseUnit * buyTaxes["marketing"];
tax += baseUnit * buyTaxes["dev"];
tax += baseUnit * buyTaxes["liquidity"];
tax += baseUnit * buyTaxes["charity"];
if(tax > 0) {
_transfer(from, address(this), tax);
}
} else if(to == address(uniswapV2Pair)) {
tax += baseUnit * sellTaxes["marketing"];
tax += baseUnit * sellTaxes["dev"];
tax += baseUnit * sellTaxes["liquidity"];
tax += baseUnit * sellTaxes["charity"];
if(tax > 0) {
_transfer(from, address(this), tax);
}
marketingTokens += baseUnit * sellTaxes["marketing"];
devTokens += baseUnit * sellTaxes["dev"];
liquidityTokens += baseUnit * sellTaxes["liquidity"];
charityTokens += baseUnit * sellTaxes["charity"];
uint256 taxSum = marketingTokens + devTokens + liquidityTokens + charityTokens;
if(taxSum == 0) return amount;
uint256 ethValue = uniswapV2Router02.getAmountsOut(taxSum, sellPath)[1];
if(ethValue >= swapThreshold) {
uint256 startBalance = address(this).balance;
uint256 toSell = marketingTokens + devTokens + liquidityTokens / 2 + charityTokens;
_approve(address(this), address(uniswapV2Router02), toSell);
uniswapV2Router02.swapExactTokensForETH(
toSell,
0,
sellPath,
address(this),
block.timestamp
);
uint256 ethGained = address(this).balance - startBalance;
uint256 liquidityToken = liquidityTokens / 2;
uint256 liquidityETH = (ethGained * ((liquidityTokens / 2 * 10**18) / taxSum)) / 10**18;
_approve(address(this), address(uniswapV2Router02), liquidityToken);
(uint amountToken, ,) = uniswapV2Router02.addLiquidityETH{value: liquidityETH}(
address(this),
liquidityToken,
0,
0,
taxWallets["liquidity"],
block.timestamp
);
uint256 remainingTokens = (marketingTokens + devTokens + liquidityTokens + charityTokens) - (toSell + amountToken);
if(remainingTokens > 0) {
_transfer(address(this), taxWallets["dev"], remainingTokens);
}
if (marketingTokens > 0){
_transfer(address(this), taxWallets["marketing"], marketingTokens);
}
if (devTokens > 0){
_transfer(address(this), taxWallets["dev"], devTokens);
}
if(charityTokens > 0){
_transfer(address(this), taxWallets["charity"], charityTokens);
}
marketingTokens = 0;
devTokens = 0;
liquidityTokens = 0;
charityTokens = 0;
}
}
amount -= tax;
}
return amount;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual override {
if (taxStatus) {
amount = handleTax(sender, recipient, amount);
}
super._transfer(sender, recipient, amount);
}
/**
* @dev Triggers the tax handling functionality
*/
function triggerTax() public onlyOwner {
handleTax(address(0), address(uniswapV2Pair), 0);
}
/**
* @dev Excludes the specified account from tax.
*/
function exclude(address account) public onlyOwner {
require(!isExcluded(account), "CoinToken: Account is already excluded");
excludeList[account] = true;
}
/**
* @dev Re-enables tax on the specified account.
*/
function removeExclude(address account) public onlyOwner {
require(isExcluded(account), "CoinToken: Account is not excluded");
excludeList[account] = false;
}
/**
* @dev Sets tax for buys.
*/
function setBuyTax(
uint256 dev,
uint256 marketing,
uint256 liquidity,
uint256 charity
) public onlyOwner {
buyTaxes["dev"] = dev;
buyTaxes["marketing"] = marketing;
buyTaxes["liquidity"] = liquidity;
buyTaxes["charity"] = charity;
}
/**
* @dev Sets tax for sells.
*/
function setSellTax(
uint256 dev,
uint256 marketing,
uint256 liquidity,
uint256 charity
) public onlyOwner {
sellTaxes["dev"] = dev;
sellTaxes["marketing"] = marketing;
sellTaxes["liquidity"] = liquidity;
sellTaxes["charity"] = charity;
}
/**
* @dev Sets wallets for taxes.
*/
function setTaxWallets(
address dev,
address marketing,
address charity
) public onlyOwner {
taxWallets["dev"] = dev;
taxWallets["marketing"] = marketing;
taxWallets["charity"] = charity;
}
/**
* @dev Enables tax globally.
*/
function enableTax() public onlyOwner {
require(!taxStatus, "CoinToken: Tax is already enabled");
taxStatus = true;
}
/**
* @dev Disables tax globally.
*/
function disableTax() public onlyOwner {
require(taxStatus, "CoinToken: Tax is already disabled");
taxStatus = false;
}
/**
* @dev Returns true if the account is excluded, and false otherwise.
*/
function isExcluded(address account) public view returns (bool) {
return excludeList[account];
}
}
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.18;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
abstract contract Ownable is Context {
address public _owner;
address private _previousOwner;
uint256 public _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
_owner = _msgSender();
emit OwnershipTransferred(address(0), _owner);
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
//Locks the contract for owner for the amount of time provided
function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = time;
emit OwnershipTransferred(_owner, address(0));
}
//Unlocks the contract for owner when _lockTime is exceeds
function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock.");
require(block.timestamp > _lockTime , "Contract is locked.");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
}
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 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 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;
}
contract CoinToken is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
address public _devWalletAddress; // TODO - team wallet here
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
string private _name;
string private _symbol;
uint256 private _decimals;
uint256 public _taxFee;
uint256 private _previousTaxFee;
uint256 public _devFee;
uint256 private _previousDevFee;
uint256 public _liquidityFee;
uint256 private _previousLiquidityFee;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
uint256 public _maxTxAmount;
uint256 public numTokensSellToAddToLiquidity;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
constructor (string memory _NAME, string memory _SYMBOL, uint256 _DECIMALS, uint256 _supply, uint256 _txFee,uint256 _lpFee,uint256 _DexFee,address routerAddress,address feeaddress,address tokenOwner) {
_name = _NAME;
_symbol = _SYMBOL;
_decimals = _DECIMALS;
_tTotal = _supply * 10 ** _decimals;
_rTotal = (MAX - (MAX % _tTotal));
_taxFee = _txFee;
_liquidityFee = _lpFee;
_previousTaxFee = _txFee;
_devFee = _DexFee;
_previousDevFee = _devFee;
_previousLiquidityFee = _lpFee;
_maxTxAmount = (_tTotal * 5 / 1000) * 10 ** _decimals;
numTokensSellToAddToLiquidity = (_tTotal * 5 / 10000) * 10 ** _decimals;
_devWalletAddress = feeaddress;
_rOwned[tokenOwner] = _rTotal;
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(routerAddress);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;
//exclude owner and this contract from fee
_isExcludedFromFee[tokenOwner] = true;
_isExcludedFromFee[address(this)] = true;
_owner = tokenOwner;
emit Transfer(address(0), tokenOwner, _tTotal);
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint256) {
return _decimals;
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
if (_isExcluded[account]) return _tOwned[account];
return tokenFromReflection(_rOwned[account]);
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
function isExcludedFromReward(address account) public view returns (bool) {
return _isExcluded[account];
}
function totalFees() public view returns (uint256) {
return _tFeeTotal;
}
function deliver(uint256 tAmount) public {
address sender = _msgSender();
require(!_isExcluded[sender], "Excluded addresses cannot call this function");
(uint256 rAmount,,,,,,) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
(uint256 rAmount,,,,,,) = _getValues(tAmount);
return rAmount;
} else {
(,uint256 rTransferAmount,,,,,) = _getValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= _rTotal, "Amount must be less than total reflections");
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
}
function excludeFromReward(address account) public onlyOwner() {
require(!_isExcluded[account], "Account is already excluded");
if(_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
function includeInReward(address account) external onlyOwner() {
require(_isExcluded[account], "Account is already included");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcluded[account] = false;
_excluded.pop();
break;
}
}
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function excludeFromFee(address account) public onlyOwner {
_isExcludedFromFee[account] = true;
}
function includeInFee(address account) public onlyOwner {
_isExcludedFromFee[account] = false;
}
function setTaxFeePercent(uint256 taxFee) external onlyOwner() {
_taxFee = taxFee;
}
function setDevFeePercent(uint256 devFee) external onlyOwner() {
_devFee = devFee;
}
function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() {
_liquidityFee = liquidityFee;
}
function setMaxTxPercent(uint256 maxTxPercent) public onlyOwner {
_maxTxAmount = maxTxPercent * 10 ** _decimals;
}
function setDevWalletAddress(address _addr) public onlyOwner {
_devWalletAddress = _addr;
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
swapAndLiquifyEnabled = _enabled;
emit SwapAndLiquifyEnabledUpdated(_enabled);
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _reflectFee(uint256 rFee, uint256 tFee) private {
_rTotal = _rTotal.sub(rFee);
_tFeeTotal = _tFeeTotal.add(tFee);
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256) {
(uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getTValues(tAmount);
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, tDev, _getRate());
return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity, tDev);
}
function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) {
uint256 tFee = calculateTaxFee(tAmount);
uint256 tLiquidity = calculateLiquidityFee(tAmount);
uint256 tDev = calculateDevFee(tAmount);
uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tDev);
return (tTransferAmount, tFee, tLiquidity, tDev);
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
uint256 rAmount = tAmount.mul(currentRate);
uint256 rFee = tFee.mul(currentRate);
uint256 rLiquidity = tLiquidity.mul(currentRate);
uint256 rDev = tDev.mul(currentRate);
uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity).sub(rDev);
return (rAmount, rTransferAmount, rFee);
}
function _getRate() private view returns(uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply.div(tSupply);
}
function _getCurrentSupply() private view returns(uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
rSupply = rSupply.sub(_rOwned[_excluded[i]]);
tSupply = tSupply.sub(_tOwned[_excluded[i]]);
}
if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function _takeLiquidity(uint256 tLiquidity) private {
uint256 currentRate = _getRate();
uint256 rLiquidity = tLiquidity.mul(currentRate);
_rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
if(_isExcluded[address(this)])
_tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
}
function _takeDev(uint256 tDev) private {
uint256 currentRate = _getRate();
uint256 rDev = tDev.mul(currentRate);
_rOwned[_devWalletAddress] = _rOwned[_devWalletAddress].add(rDev);
if(_isExcluded[_devWalletAddress])
_tOwned[_devWalletAddress] = _tOwned[_devWalletAddress].add(tDev);
}
function calculateTaxFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_taxFee).div(
10**2
);
}
function calculateDevFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_devFee).div(
10**2
);
}
function calculateLiquidityFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_liquidityFee).div(
10**2
);
}
function removeAllFee() private {
_previousTaxFee = _taxFee;
_previousDevFee = _devFee;
_previousLiquidityFee = _liquidityFee;
_taxFee = 0;
_devFee = 0;
_liquidityFee = 0;
}
function restoreAllFee() private {
_taxFee = _previousTaxFee;
_devFee = _previousDevFee;
_liquidityFee = _previousLiquidityFee;
}
function isExcludedFromFee(address account) public view returns(bool) {
return _isExcludedFromFee[account];
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if(from != owner() && to != owner())
require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
uint256 contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance >= _maxTxAmount)
{
contractTokenBalance = _maxTxAmount;
}
bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled
) {
contractTokenBalance = numTokensSellToAddToLiquidity;
swapAndLiquify(contractTokenBalance);
}
bool takeFee = true;
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
takeFee = false;
}
_tokenTransfer(from,to,amount,takeFee);
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
uint256 half = contractTokenBalance.div(2);
uint256 otherHalf = contractTokenBalance.sub(half);
uint256 initialBalance = address(this).balance;
swapTokensForEth(half);
uint256 newBalance = address(this).balance.sub(initialBalance);
addLiquidity(otherHalf, newBalance);
emit SwapAndLiquify(half, newBalance, otherHalf);
}
function swapTokensForEth(uint256 tokenAmount) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0, // slippage is unavoidable
0, // slippage is unavoidable
owner(),
block.timestamp
);
}
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
if(!takeFee)
removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded[recipient]) {
_transferToExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
_transferStandard(sender, recipient, amount);
} else if (_isExcluded[sender] && _isExcluded[recipient]) {
_transferBothExcluded(sender, recipient, amount);
} else {
_transferStandard(sender, recipient, amount);
}
if(!takeFee)
restoreAllFee();
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function setRouterAddress(address newRouter) external onlyOwner {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(newRouter);
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
}
function setNumTokensSellToAddToLiquidity(uint256 amountToUpdate) external onlyOwner {
numTokensSellToAddToLiquidity = amountToUpdate;
}
}
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.18;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
abstract contract Ownable is Context {
address public _owner;
address private _previousOwner;
uint256 public _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
_owner = _msgSender();
emit OwnershipTransferred(address(0), _owner);
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
//Locks the contract for owner for the amount of time provided
function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = time;
emit OwnershipTransferred(_owner, address(0));
}
//Unlocks the contract for owner when _lockTime is exceeds
function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock.");
require(block.timestamp > _lockTime , "Contract is locked.");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
}
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 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 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;
}
contract CoinToken is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
address public _devWalletAddress;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
string private _name;
string private _symbol;
uint256 private _decimals;
uint256 public _taxFee;
uint256 private _previousTaxFee;
uint256 public _devFee;
uint256 private _previousDevFee;
uint256 public _liquidityFee;
uint256 private _previousLiquidityFee;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
uint256 public _maxTxAmount;
uint256 public numTokensSellToAddToLiquidity;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
constructor (string memory _NAME, string memory _SYMBOL, uint256 _DECIMALS, uint256 _supply, uint256 _txFee,uint256 _lpFee,uint256 _DexFee,address routerAddress,address feeaddress,address tokenOwner) {
_name = _NAME;
_symbol = _SYMBOL;
_decimals = _DECIMALS;
_tTotal = _supply * 10 ** _decimals;
_rTotal = (MAX - (MAX % _tTotal));
_taxFee = _txFee;
_liquidityFee = _lpFee;
_previousTaxFee = _txFee;
_devFee = _DexFee;
_previousDevFee = _devFee;
_previousLiquidityFee = _lpFee;
_maxTxAmount = (_tTotal * 5 / 1000) * 10 ** _decimals;
numTokensSellToAddToLiquidity = (_tTotal * 5 / 10000) * 10 ** _decimals;
_devWalletAddress = feeaddress;
_rOwned[tokenOwner] = _rTotal;
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(routerAddress);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;
//exclude owner and this contract from fee
_isExcludedFromFee[tokenOwner] = true;
_isExcludedFromFee[address(this)] = true;
_owner = tokenOwner;
emit Transfer(address(0), tokenOwner, _tTotal);
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint256) {
return _decimals;
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
if (_isExcluded[account]) return _tOwned[account];
return tokenFromReflection(_rOwned[account]);
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
function isExcludedFromReward(address account) public view returns (bool) {
return _isExcluded[account];
}
function totalFees() public view returns (uint256) {
return _tFeeTotal;
}
function deliver(uint256 tAmount) public {
address sender = _msgSender();
require(!_isExcluded[sender], "Excluded addresses cannot call this function");
(uint256 rAmount,,,,,,) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
(uint256 rAmount,,,,,,) = _getValues(tAmount);
return rAmount;
} else {
(,uint256 rTransferAmount,,,,,) = _getValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= _rTotal, "Amount must be less than total reflections");
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
}
function excludeFromReward(address account) public onlyOwner() {
require(!_isExcluded[account], "Account is already excluded");
if(_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
function includeInReward(address account) external onlyOwner() {
require(_isExcluded[account], "Account is already included");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcluded[account] = false;
_excluded.pop();
break;
}
}
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function excludeFromFee(address account) public onlyOwner {
_isExcludedFromFee[account] = true;
}
function includeInFee(address account) public onlyOwner {
_isExcludedFromFee[account] = false;
}
function setTaxFeePercent(uint256 taxFee) external onlyOwner() {
_taxFee = taxFee;
}
function setDevFeePercent(uint256 devFee) external onlyOwner() {
_devFee = devFee;
}
function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() {
_liquidityFee = liquidityFee;
}
function setMaxTxPercent(uint256 maxTxPercent) public onlyOwner {
_maxTxAmount = maxTxPercent * 10 ** _decimals;
}
function setDevWalletAddress(address _addr) public onlyOwner {
_devWalletAddress = _addr;
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
swapAndLiquifyEnabled = _enabled;
emit SwapAndLiquifyEnabledUpdated(_enabled);
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _reflectFee(uint256 rFee, uint256 tFee) private {
_rTotal = _rTotal.sub(rFee);
_tFeeTotal = _tFeeTotal.add(tFee);
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256) {
(uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getTValues(tAmount);
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, tDev, _getRate());
return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity, tDev);
}
function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) {
uint256 tFee = calculateTaxFee(tAmount);
uint256 tLiquidity = calculateLiquidityFee(tAmount);
uint256 tDev = calculateDevFee(tAmount);
uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tDev);
return (tTransferAmount, tFee, tLiquidity, tDev);
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
uint256 rAmount = tAmount.mul(currentRate);
uint256 rFee = tFee.mul(currentRate);
uint256 rLiquidity = tLiquidity.mul(currentRate);
uint256 rDev = tDev.mul(currentRate);
uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity).sub(rDev);
return (rAmount, rTransferAmount, rFee);
}
function _getRate() private view returns(uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply.div(tSupply);
}
function _getCurrentSupply() private view returns(uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
rSupply = rSupply.sub(_rOwned[_excluded[i]]);
tSupply = tSupply.sub(_tOwned[_excluded[i]]);
}
if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function _takeLiquidity(uint256 tLiquidity) private {
uint256 currentRate = _getRate();
uint256 rLiquidity = tLiquidity.mul(currentRate);
_rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
if(_isExcluded[address(this)])
_tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
}
function _takeDev(uint256 tDev) private {
uint256 currentRate = _getRate();
uint256 rDev = tDev.mul(currentRate);
_rOwned[_devWalletAddress] = _rOwned[_devWalletAddress].add(rDev);
if(_isExcluded[_devWalletAddress])
_tOwned[_devWalletAddress] = _tOwned[_devWalletAddress].add(tDev);
}
function calculateTaxFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_taxFee).div(
10**2
);
}
function calculateDevFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_devFee).div(
10**2
);
}
function calculateLiquidityFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_liquidityFee).div(
10**2
);
}
function removeAllFee() private {
_previousTaxFee = _taxFee;
_previousDevFee = _devFee;
_previousLiquidityFee = _liquidityFee;
_taxFee = 0;
_devFee = 0;
_liquidityFee = 0;
}
function restoreAllFee() private {
_taxFee = _previousTaxFee;
_devFee = _previousDevFee;
_liquidityFee = _previousLiquidityFee;
}
function isExcludedFromFee(address account) public view returns(bool) {
return _isExcludedFromFee[account];
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if(from != owner() && to != owner())
require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
uint256 contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance >= _maxTxAmount)
{
contractTokenBalance = _maxTxAmount;
}
bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled
) {
contractTokenBalance = numTokensSellToAddToLiquidity;
swapAndLiquify(contractTokenBalance);
}
bool takeFee = true;
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
takeFee = false;
}
_tokenTransfer(from,to,amount,takeFee);
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
uint256 half = contractTokenBalance.div(2);
uint256 otherHalf = contractTokenBalance.sub(half);
uint256 initialBalance = address(this).balance;
swapTokensForEth(half);
uint256 newBalance = address(this).balance.sub(initialBalance);
addLiquidity(otherHalf, newBalance);
emit SwapAndLiquify(half, newBalance, otherHalf);
}
function swapTokensForEth(uint256 tokenAmount) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
address(this),
block.timestamp
);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0,
0,
owner(),
block.timestamp
);
}
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
if(!takeFee)
removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded[recipient]) {
_transferToExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
_transferStandard(sender, recipient, amount);
} else if (_isExcluded[sender] && _isExcluded[recipient]) {
_transferBothExcluded(sender, recipient, amount);
} else {
_transferStandard(sender, recipient, amount);
}
if(!takeFee)
restoreAllFee();
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function setRouterAddress(address newRouter) external onlyOwner {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(newRouter);
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
}
function setNumTokensSellToAddToLiquidity(uint256 amountToUpdate) external onlyOwner {
numTokensSellToAddToLiquidity = amountToUpdate;
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by 'account'.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves 'amount' tokens from the caller's account to 'recipient'.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount)
external
returns (bool);
/**
* @dev Returns the remaining number of tokens that 'spender' will be
* allowed to spend on behalf of 'owner' through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender)
external
view
returns (uint256);
/**
* @dev Sets 'amount' as the allowance of 'spender' over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves 'amount' tokens from 'sender' to 'recipient' using the
* allowance mechanism. 'amount' is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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 Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/*
* @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 Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning 'false' on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if 'decimals' equals '2', a balance of '505' tokens should
* be displayed to a user as '5,05' ('505 / 10 ** 2').
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - 'recipient' cannot be the zero address.
* - the caller must have a balance of at least 'amount'.
*/
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
*/
function approve(address spender, uint256 amount)
public
virtual
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - 'sender' and 'recipient' cannot be the zero address.
* - 'sender' must have a balance of at least 'amount'.
* - the caller must have allowance for ''sender'''s tokens of at least
* 'amount'.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(
currentAllowance >= amount,
"ERC20: transfer amount exceeds allowance"
);
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to 'spender' by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender] + addedValue
);
return true;
}
/**
* @dev Atomically decreases the allowance granted to 'spender' by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - 'spender' cannot be the zero address.
* - 'spender' must have allowance for the caller of at least
* 'subtractedValue'.
*/
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves 'amount' of tokens from 'sender' to 'recipient'.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - 'sender' cannot be the zero address.
* - 'recipient' cannot be the zero address.
* - 'sender' must have a balance of at least 'amount'.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(
senderBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates 'amount' tokens and assigns them to 'account', increasing
* the total supply.
*
* Emits a {Transfer} event with 'from' set to the zero address.
*
* Requirements:
*
* - 'account' cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys 'amount' tokens from 'account', reducing the
* total supply.
*
* Emits a {Transfer} event with 'to' set to the zero address.
*
* Requirements:
*
* - 'account' cannot be the zero address.
* - 'account' must have at least 'amount' tokens.
*/
/* function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
} */
/**
* @dev Sets 'amount' as the allowance of 'spender' over the 'owner' s tokens.
*
* This internal function is equivalent to 'approve', and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - 'owner' cannot be the zero address.
* - 'spender' cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when 'from' and 'to' are both non-zero, 'amount' of ''from'''s tokens
* will be transferred to 'to'.
* - when 'from' is zero, 'amount' tokens will be minted for 'to'.
* - when 'to' is zero, 'amount' of ''from'''s tokens will be burned.
* - 'from' and 'to' are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when 'from' and 'to' are both non-zero, 'amount' of ''from'''s tokens
* has been transferred to 'to'.
* - when 'from' is zero, 'amount' tokens have been minted for 'to'.
* - when 'to' is zero, 'amount' of ''from'''s tokens have been burned.
* - 'from' and 'to' are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* 'onlyOwner', which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* 'onlyOwner' functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account ('newOwner').
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_setOwner(newOwner);
}
function _setOwner(address newOwner) internal {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 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 (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 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 (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
/* event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
); */
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
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 (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
/* function burn(address to)
external
returns (uint256 amount0, uint256 amount1); */
function swap(
uint256 amount0Out,
uint256 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,
uint256
);
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(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
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,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract TokenAdvanced is ERC20, Ownable {
// CONFIG START
uint256 private initialSupply;
uint256 private denominator = 100;
uint256 private swapThreshold = 0.0000005 ether; // The contract will only swap to ETH, once the fee tokens reach the specified threshold
uint256 private devTaxBuy;
uint256 private marketingTaxBuy;
uint256 private liquidityTaxBuy;
uint256 private charityTaxBuy;
uint256 private devTaxSell;
uint256 private marketingTaxSell;
uint256 private liquidityTaxSell;
uint256 private charityTaxSell;
address private devTaxWallet;
address private marketingTaxWallet;
address private liquidityTaxWallet;
address private charityTaxWallet;
// CONFIG END
mapping(address => bool) private excludeList;
mapping(string => uint256) private buyTaxes;
mapping(string => uint256) private sellTaxes;
mapping(string => address) private taxWallets;
bool public taxStatus = true;
IUniswapV2Router02 private uniswapV2Router02;
IUniswapV2Factory private uniswapV2Factory;
IUniswapV2Pair private uniswapV2Pair;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _supply,
address[5] memory _addr,
uint256[8] memory _value
) ERC20(_tokenName, _tokenSymbol) {
initialSupply = _supply * (10**18);
_setOwner(_addr[4]);
uniswapV2Router02 = IUniswapV2Router02(_addr[0]);
uniswapV2Factory = IUniswapV2Factory(uniswapV2Router02.factory());
uniswapV2Pair = IUniswapV2Pair(
uniswapV2Factory.createPair(address(this), uniswapV2Router02.WETH())
);
taxWallets["liquidity"] = _addr[2];
setBuyTax(_value[0], _value[1], _value[3], _value[2]);
setSellTax(_value[4], _value[5], _value[7], _value[6]);
setTaxWallets(_addr[1], _addr[2], _addr[3]);
_mint(msg.sender, initialSupply);
}
uint256 private marketingTokens;
uint256 private devTokens;
uint256 private liquidityTokens;
uint256 private charityTokens;
/**
* @dev Calculates the tax, transfer it to the contract. If the user is selling, and the swap threshold is met, it executes the tax.
*/
function handleTax(address from, address to, uint256 amount) private returns (uint256) {
address[] memory sellPath = new address[](2);
sellPath[0] = address(this);
sellPath[1] = uniswapV2Router02.WETH();
if(!isExcluded(from) && !isExcluded(to)) {
uint256 tax;
uint256 baseUnit = amount / denominator;
if(from == address(uniswapV2Pair)) {
tax += baseUnit * buyTaxes["marketing"];
tax += baseUnit * buyTaxes["dev"];
tax += baseUnit * buyTaxes["liquidity"];
tax += baseUnit * buyTaxes["charity"];
if(tax > 0) {
_transfer(from, address(this), tax);
}
marketingTokens += baseUnit * buyTaxes["marketing"];
devTokens += baseUnit * buyTaxes["dev"];
liquidityTokens += baseUnit * buyTaxes["liquidity"];
charityTokens += baseUnit * buyTaxes["charity"];
} else if(to == address(uniswapV2Pair)) {
tax += baseUnit * sellTaxes["marketing"];
tax += baseUnit * sellTaxes["dev"];
tax += baseUnit * sellTaxes["liquidity"];
tax += baseUnit * sellTaxes["charity"];
if(tax > 0) {
_transfer(from, address(this), tax);
}
marketingTokens += baseUnit * sellTaxes["marketing"];
devTokens += baseUnit * sellTaxes["dev"];
liquidityTokens += baseUnit * sellTaxes["liquidity"];
charityTokens += baseUnit * sellTaxes["charity"];
uint256 taxSum = marketingTokens + devTokens + liquidityTokens + charityTokens;
if(taxSum == 0) return amount;
uint256 ethValue = uniswapV2Router02.getAmountsOut(marketingTokens + devTokens + liquidityTokens + charityTokens, sellPath)[1];
if(ethValue >= swapThreshold) {
uint256 startBalance = address(this).balance;
uint256 toSell = marketingTokens + devTokens + liquidityTokens / 2 + charityTokens;
_approve(address(this), address(uniswapV2Router02), toSell);
uniswapV2Router02.swapExactTokensForETH(
toSell,
0,
sellPath,
address(this),
block.timestamp
);
uint256 ethGained = address(this).balance - startBalance;
uint256 liquidityToken = liquidityTokens / 2;
uint256 liquidityETH = (ethGained * ((liquidityTokens / 2 * 10**18) / taxSum)) / 10**18;
uint256 marketingETH = (ethGained * ((marketingTokens * 10**18) / taxSum)) / 10**18;
uint256 devETH = (ethGained * ((devTokens * 10**18) / taxSum)) / 10**18;
uint256 charityETH = (ethGained * ((charityTokens * 10**18) / taxSum)) / 10**18;
_approve(address(this), address(uniswapV2Router02), liquidityToken);
(uint amountToken, ,) = uniswapV2Router02.addLiquidityETH{value: liquidityETH}(
address(this),
liquidityToken,
0,
0,
taxWallets["liquidity"],
block.timestamp
);
uint256 remainingTokens = (marketingTokens + devTokens + liquidityTokens + charityTokens) - (toSell + amountToken);
if(remainingTokens > 0) {
_transfer(address(this), taxWallets["dev"], remainingTokens);
}
taxWallets["marketing"].call{value: marketingETH}("");
taxWallets["dev"].call{value: devETH}("");
taxWallets["charity"].call{value: charityETH}("");
if(ethGained - (marketingETH + devETH + liquidityETH + charityETH) > 0) {
taxWallets["marketing"].call{value: ethGained - (marketingETH + devETH + liquidityETH + charityETH)}("");
}
marketingTokens = 0;
devTokens = 0;
liquidityTokens = 0;
charityTokens = 0;
}
}
amount -= tax;
}
return amount;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual override {
if (taxStatus) {
amount = handleTax(sender, recipient, amount);
}
super._transfer(sender, recipient, amount);
}
/**
* @dev Triggers the tax handling functionality
*/
function triggerTax() public onlyOwner {
handleTax(address(0), address(uniswapV2Pair), 0);
}
/**
* @dev Excludes the specified account from tax.
*/
function exclude(address account) public onlyOwner {
require(!isExcluded(account), "CoinToken: Account is already excluded");
excludeList[account] = true;
}
/**
* @dev Re-enables tax on the specified account.
*/
function removeExclude(address account) public onlyOwner {
require(isExcluded(account), "CoinToken: Account is not excluded");
excludeList[account] = false;
}
/**
* @dev Sets tax for buys.
*/
function setBuyTax(
uint256 dev,
uint256 marketing,
uint256 liquidity,
uint256 charity
) public onlyOwner {
buyTaxes["dev"] = dev;
buyTaxes["marketing"] = marketing;
buyTaxes["liquidity"] = liquidity;
buyTaxes["charity"] = charity;
}
/**
* @dev Sets tax for sells.
*/
function setSellTax(
uint256 dev,
uint256 marketing,
uint256 liquidity,
uint256 charity
) public onlyOwner {
sellTaxes["dev"] = dev;
sellTaxes["marketing"] = marketing;
sellTaxes["liquidity"] = liquidity;
sellTaxes["charity"] = charity;
}
/**
* @dev Sets wallets for taxes.
*/
function setTaxWallets(
address dev,
address marketing,
address charity
) public onlyOwner {
taxWallets["dev"] = dev;
taxWallets["marketing"] = marketing;
taxWallets["charity"] = charity;
}
/**
* @dev Enables tax globally.
*/
function enableTax() public onlyOwner {
require(!taxStatus, "CoinToken: Tax is already enabled");
taxStatus = true;
}
/**
* @dev Disables tax globally.
*/
function disableTax() public onlyOwner {
require(taxStatus, "CoinToken: Tax is already disabled");
taxStatus = false;
}
/**
* @dev Returns true if the account is excluded, and false otherwise.
*/
function isExcluded(address account) public view returns (bool) {
return excludeList[account];
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
}
}
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
contract TokenSimple is Context, IERC20, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 public totalSupply;
string public name;
string public symbol;
uint8 public decimals;
constructor (string memory _name, string memory _symbol, uint8 _decimals, address _owner, uint _initialMint) {
_transferOwnership(_owner);
name = _name;
symbol = _symbol;
decimals = _decimals;
if (_initialMint!=0) {
_mint(_owner, _initialMint * 10 ** _decimals);
}
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
function allowance(address account, address spender) public view returns (uint256) {
return _allowances[account][spender];
}
function approve(address spender, uint256 amount) public returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
require(_allowances[sender][msg.sender] >= amount, 'ERC20: transfer amount exceeds allowance');
_approve(sender, msg.sender, _allowances[sender][msg.sender] - amount);
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
uint c = _allowances[msg.sender][spender] + addedValue;
require(c >= addedValue, "SafeMath: addition overflow");
_approve(msg.sender, spender, c);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
require(_allowances[msg.sender][msg.sender] >= subtractedValue, 'ERC20: decreased allowance below zero');
_approve(msg.sender, spender, _allowances[msg.sender][msg.sender] - subtractedValue);
return true;
}
function mint(uint256 amount) public onlyOwner returns (bool) {
_mint(msg.sender, amount);
return true;
}
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), 'ERC20: transfer from the zero address');
require(recipient != address(0), 'ERC20: transfer to the zero address');
require(_balances[sender] >= amount, 'ERC20: transfer amount exceeds balance');
_balances[sender] -= amount;
uint c = _balances[recipient] + amount;
require(c >= amount, "SafeMath: addition overflow");
_balances[recipient] = c;
emit Transfer(sender, recipient, amount);
}
function _mint(address account, uint256 amount) internal {
require(account != address(0), 'ERC20: mint to the zero address');
uint c = totalSupply + amount;
require(c >= amount, "SafeMath: addition overflow");
totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
function _burn(address account, uint256 amount) internal {
require(account != address(0), 'ERC20: burn from the zero address');
require(_balances[account] >= amount, 'ERC20: burn amount exceeds balance');
_balances[account] -= amount;
totalSupply -= amount;
emit Transfer(account, address(0), amount);
}
function _approve(address account, address spender, uint256 amount) internal {
require(account != address(0), 'ERC20: approve from the zero address');
require(spender != address(0), 'ERC20: approve to the zero address');
_allowances[account][spender] = amount;
emit Approval(account, spender, amount);
}
function mintTo(address account, uint256 amount) external onlyOwner {
_mint(account, amount);
}
function burnFrom(address account, uint256 amount) external onlyOwner {
_burn(account, amount);
}
}
// SPDX-License-Identifier: MIN
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
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(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 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 (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 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 (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
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 (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to)
external
returns (uint256 amount0, uint256 amount1);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract CoinToken is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcluded;
address[] private _excluded;
address public _devWalletAddress; // TODO - team wallet here
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
string private _name;
string private _symbol;
uint256 private _decimals;
uint256 public _taxFee;
uint256 private _previousTaxFee;
uint256 public _devFee;
uint256 private _previousDevFee;
uint256 public _liquidityFee;
uint256 private _previousLiquidityFee;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
uint256 public _maxTxAmount;
uint256 public numTokensSellToAddToLiquidity;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
constructor(
string memory _NAME,
string memory _SYMBOL,
uint256 _DECIMALS,
uint256 _supply,
uint256 _txFee,
uint256 _lpFee,
uint256 _DexFee,
address routerAddress,
address feeaddress,
address tokenOwner,
address service
) payable {
_name = _NAME;
_symbol = _SYMBOL;
_decimals = _DECIMALS;
_tTotal = _supply * 10**_decimals;
_rTotal = (MAX - (MAX % _tTotal));
_taxFee = _txFee;
_liquidityFee = _lpFee;
_previousTaxFee = _txFee;
_devFee = _DexFee;
_previousDevFee = _devFee;
_previousLiquidityFee = _lpFee;
_maxTxAmount = ((_tTotal * 5) / 1000) * 10**_decimals;
numTokensSellToAddToLiquidity = ((_tTotal * 5) / 10000) * 10**_decimals;
_devWalletAddress = feeaddress;
_rOwned[tokenOwner] = _rTotal;
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(routerAddress);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;
//exclude owner and this contract from fee
_isExcludedFromFee[tokenOwner] = true;
_isExcludedFromFee[address(this)] = true;
_transferOwnership(tokenOwner);
payable(service).transfer(msg.value);
emit Transfer(address(0), tokenOwner, _tTotal);
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint256) {
return _decimals;
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
if (_isExcluded[account]) return _tOwned[account];
return tokenFromReflection(_rOwned[account]);
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()].sub(
amount,
"ERC20: transfer amount exceeds allowance"
)
);
return true;
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].add(addedValue)
);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].sub(
subtractedValue,
"ERC20: decreased allowance below zero"
)
);
return true;
}
function isExcludedFromReward(address account) public view returns (bool) {
return _isExcluded[account];
}
function totalFees() public view returns (uint256) {
return _tFeeTotal;
}
function deliver(uint256 tAmount) public {
address sender = _msgSender();
require(
!_isExcluded[sender],
"Excluded addresses cannot call this function"
);
(uint256 rAmount, , , , , , ) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
public
view
returns (uint256)
{
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
(uint256 rAmount, , , , , , ) = _getValues(tAmount);
return rAmount;
} else {
(, uint256 rTransferAmount, , , , , ) = _getValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount)
public
view
returns (uint256)
{
require(
rAmount <= _rTotal,
"Amount must be less than total reflections"
);
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
}
function excludeFromReward(address account) public onlyOwner {
require(!_isExcluded[account], "Account is already excluded");
if (_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
function includeInReward(address account) external onlyOwner {
require(_isExcluded[account], "Account is already included");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcluded[account] = false;
_excluded.pop();
break;
}
}
}
function _transferBothExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function excludeFromFee(address account) public onlyOwner {
_isExcludedFromFee[account] = true;
}
function includeInFee(address account) public onlyOwner {
_isExcludedFromFee[account] = false;
}
function setTaxFeePercent(uint256 taxFee) external onlyOwner {
_taxFee = taxFee;
}
function setDevFeePercent(uint256 devFee) external onlyOwner {
_devFee = devFee;
}
function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner {
_liquidityFee = liquidityFee;
}
function setMaxTxPercent(uint256 maxTxPercent) public onlyOwner {
_maxTxAmount = maxTxPercent * 10**_decimals;
}
function setDevWalletAddress(address _addr) public onlyOwner {
_devWalletAddress = _addr;
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
swapAndLiquifyEnabled = _enabled;
emit SwapAndLiquifyEnabledUpdated(_enabled);
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _reflectFee(uint256 rFee, uint256 tFee) private {
_rTotal = _rTotal.sub(rFee);
_tFeeTotal = _tFeeTotal.add(tFee);
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
(
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getTValues(tAmount);
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(
tAmount,
tFee,
tLiquidity,
tDev,
_getRate()
);
return (
rAmount,
rTransferAmount,
rFee,
tTransferAmount,
tFee,
tLiquidity,
tDev
);
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
uint256 tFee = calculateTaxFee(tAmount);
uint256 tLiquidity = calculateLiquidityFee(tAmount);
uint256 tDev = calculateDevFee(tAmount);
uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tDev);
return (tTransferAmount, tFee, tLiquidity, tDev);
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
uint256 rAmount = tAmount.mul(currentRate);
uint256 rFee = tFee.mul(currentRate);
uint256 rLiquidity = tLiquidity.mul(currentRate);
uint256 rDev = tDev.mul(currentRate);
uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity).sub(rDev);
return (rAmount, rTransferAmount, rFee);
}
function _getRate() private view returns (uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply.div(tSupply);
}
function _getCurrentSupply() private view returns (uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (
_rOwned[_excluded[i]] > rSupply ||
_tOwned[_excluded[i]] > tSupply
) return (_rTotal, _tTotal);
rSupply = rSupply.sub(_rOwned[_excluded[i]]);
tSupply = tSupply.sub(_tOwned[_excluded[i]]);
}
if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function _takeLiquidity(uint256 tLiquidity) private {
uint256 currentRate = _getRate();
uint256 rLiquidity = tLiquidity.mul(currentRate);
_rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
if (_isExcluded[address(this)])
_tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
}
function _takeDev(uint256 tDev) private {
uint256 currentRate = _getRate();
uint256 rDev = tDev.mul(currentRate);
_rOwned[_devWalletAddress] = _rOwned[_devWalletAddress].add(rDev);
if (_isExcluded[_devWalletAddress])
_tOwned[_devWalletAddress] = _tOwned[_devWalletAddress].add(tDev);
}
function calculateTaxFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_taxFee).div(10**2);
}
function calculateDevFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_devFee).div(10**2);
}
function calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
return _amount.mul(_liquidityFee).div(10**2);
}
function removeAllFee() private {
_previousTaxFee = _taxFee;
_previousDevFee = _devFee;
_previousLiquidityFee = _liquidityFee;
_taxFee = 0;
_devFee = 0;
_liquidityFee = 0;
}
function restoreAllFee() private {
_taxFee = _previousTaxFee;
_devFee = _previousDevFee;
_liquidityFee = _previousLiquidityFee;
}
function isExcludedFromFee(address account) public view returns (bool) {
return _isExcludedFromFee[account];
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && to != owner())
require(
amount <= _maxTxAmount,
"Transfer amount exceeds the maxTxAmount."
);
uint256 contractTokenBalance = balanceOf(address(this));
if (contractTokenBalance >= _maxTxAmount) {
contractTokenBalance = _maxTxAmount;
}
bool overMinTokenBalance = contractTokenBalance >=
numTokensSellToAddToLiquidity;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled
) {
contractTokenBalance = numTokensSellToAddToLiquidity;
swapAndLiquify(contractTokenBalance);
}
bool takeFee = true;
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
takeFee = false;
}
_tokenTransfer(from, to, amount, takeFee);
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
uint256 half = contractTokenBalance.div(2);
uint256 otherHalf = contractTokenBalance.sub(half);
uint256 initialBalance = address(this).balance;
swapTokensForEth(half);
uint256 newBalance = address(this).balance.sub(initialBalance);
addLiquidity(otherHalf, newBalance);
emit SwapAndLiquify(half, newBalance, otherHalf);
}
function swapTokensForEth(uint256 tokenAmount) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0, // slippage is unavoidable
0, // slippage is unavoidable
owner(),
block.timestamp
);
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
if (!takeFee) removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded[recipient]) {
_transferToExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
_transferStandard(sender, recipient, amount);
} else if (_isExcluded[sender] && _isExcluded[recipient]) {
_transferBothExcluded(sender, recipient, amount);
} else {
_transferStandard(sender, recipient, amount);
}
if (!takeFee) restoreAllFee();
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferToExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferFromExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 rFee,
uint256 tTransferAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tDev
) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_takeDev(tDev);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function setRouterAddress(address newRouter) external onlyOwner {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(newRouter);
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
}
function setNumTokensSellToAddToLiquidity(uint256 amountToUpdate)
external
onlyOwner
{
numTokensSellToAddToLiquidity = amountToUpdate;
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
}
}
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
}
}
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
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);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
return _balances[account];
}
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount)
public
virtual
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(
currentAllowance >= amount,
"ERC20: transfer amount exceeds allowance"
);
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender] + addedValue
);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(
senderBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* 'onlyOwner' functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account ('newOwner').
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_setOwner(newOwner);
}
function _setOwner(address newOwner) internal {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by 'account'.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by 'account'.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 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 (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 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 (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
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 (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to)
external
returns (uint256 amount0, uint256 amount1);
function swap(
uint256 amount0Out,
uint256 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,
uint256
);
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(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
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,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

This file has been truncated, but you can view the full file.
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {
"@_717": {
"entryPoint": null,
"id": 717,
"parameterSlots": 0,
"returnSlots": 0
},
"@_868": {
"entryPoint": null,
"id": 868,
"parameterSlots": 5,
"returnSlots": 0
},
"@_mint_1197": {
"entryPoint": 430,
"id": 1197,
"parameterSlots": 2,
"returnSlots": 0
},
"@_msgSender_688": {
"entryPoint": 230,
"id": 688,
"parameterSlots": 0,
"returnSlots": 1
},
"@_transferOwnership_799": {
"entryPoint": 237,
"id": 799,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_available_length_t_string_memory_ptr_fromMemory": {
"entryPoint": 1116,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"abi_decode_t_address_fromMemory": {
"entryPoint": 1374,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_string_memory_ptr_fromMemory": {
"entryPoint": 1190,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_uint256_fromMemory": {
"entryPoint": 1430,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_uint8_fromMemory": {
"entryPoint": 1277,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_string_memory_ptrt_string_memory_ptrt_uint8t_addresst_uint256_fromMemory": {
"entryPoint": 1452,
"id": null,
"parameterSlots": 2,
"returnSlots": 5
},
"abi_encode_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a_to_t_string_memory_ptr_fromStack": {
"entryPoint": 3191,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack": {
"entryPoint": 3023,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 3261,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 3229,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 3061,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 3278,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_memory": {
"entryPoint": 991,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": 851,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"array_allocation_size_t_string_memory_ptr": {
"entryPoint": 1021,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_dataslot_t_string_storage": {
"entryPoint": 1753,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_length_t_string_memory_ptr": {
"entryPoint": 1646,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
"entryPoint": 2967,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"checked_add_t_uint256": {
"entryPoint": 3093,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"checked_exp_helper": {
"entryPoint": 2489,
"id": null,
"parameterSlots": 4,
"returnSlots": 2
},
"checked_exp_t_uint256_t_uint8": {
"entryPoint": 2813,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"checked_exp_unsigned": {
"entryPoint": 2579,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"checked_mul_t_uint256": {
"entryPoint": 2893,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"clean_up_bytearray_end_slots_t_string_storage": {
"entryPoint": 2053,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"cleanup_t_address": {
"entryPoint": 1330,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 1299,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 1396,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint8": {
"entryPoint": 1240,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"clear_storage_range_t_bytes1": {
"entryPoint": 2015,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"convert_t_uint256_to_t_uint256": {
"entryPoint": 1892,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage": {
"entryPoint": 2204,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"copy_memory_to_memory_with_cleanup": {
"entryPoint": 1074,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"divide_by_32_ceil": {
"entryPoint": 1771,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"extract_byte_array_length": {
"entryPoint": 1701,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"extract_used_part_and_set_length_of_short_byte_array": {
"entryPoint": 2175,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"finalize_allocation": {
"entryPoint": 937,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"identity": {
"entryPoint": 1883,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"mask_bytes_dynamic": {
"entryPoint": 2145,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"panic_error_0x11": {
"entryPoint": 2432,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x22": {
"entryPoint": 1656,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x41": {
"entryPoint": 892,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"prepare_store_t_uint256": {
"entryPoint": 1931,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d": {
"entryPoint": 868,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae": {
"entryPoint": 872,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": 864,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 860,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"round_up_to_mul_of_32": {
"entryPoint": 876,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"shift_left_dynamic": {
"entryPoint": 1786,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"shift_right_1_unsigned": {
"entryPoint": 2477,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"shift_right_unsigned_dynamic": {
"entryPoint": 2133,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"storage_set_to_zero_t_uint256": {
"entryPoint": 1987,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"store_literal_in_memory_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a": {
"entryPoint": 3151,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e": {
"entryPoint": 2983,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"update_byte_slice_dynamic32": {
"entryPoint": 1798,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"update_storage_value_t_uint256_to_t_uint256": {
"entryPoint": 1940,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"validator_revert_t_address": {
"entryPoint": 1349,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 1405,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"validator_revert_t_uint8": {
"entryPoint": 1252,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"zero_value_for_split_t_uint256": {
"entryPoint": 1983,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nativeSrc": "0:15807:1",
"nodeType": "YulBlock",
"src": "0:15807:1",
"statements": [
{
"body": {
"nativeSrc": "47:35:1",
"nodeType": "YulBlock",
"src": "47:35:1",
"statements": [
{
"nativeSrc": "57:19:1",
"nodeType": "YulAssignment",
"src": "57:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "73:2:1",
"nodeType": "YulLiteral",
"src": "73:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "67:5:1",
"nodeType": "YulIdentifier",
"src": "67:5:1"
},
"nativeSrc": "67:9:1",
"nodeType": "YulFunctionCall",
"src": "67:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nativeSrc": "57:6:1",
"nodeType": "YulIdentifier",
"src": "57:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "7:75:1",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nativeSrc": "40:6:1",
"nodeType": "YulTypedName",
"src": "40:6:1",
"type": ""
}
],
"src": "7:75:1"
},
{
"body": {
"nativeSrc": "177:28:1",
"nodeType": "YulBlock",
"src": "177:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "194:1:1",
"nodeType": "YulLiteral",
"src": "194:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "197:1:1",
"nodeType": "YulLiteral",
"src": "197:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "187:6:1",
"nodeType": "YulIdentifier",
"src": "187:6:1"
},
"nativeSrc": "187:12:1",
"nodeType": "YulFunctionCall",
"src": "187:12:1"
},
"nativeSrc": "187:12:1",
"nodeType": "YulExpressionStatement",
"src": "187:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "88:117:1",
"nodeType": "YulFunctionDefinition",
"src": "88:117:1"
},
{
"body": {
"nativeSrc": "300:28:1",
"nodeType": "YulBlock",
"src": "300:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "317:1:1",
"nodeType": "YulLiteral",
"src": "317:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "320:1:1",
"nodeType": "YulLiteral",
"src": "320:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "310:6:1",
"nodeType": "YulIdentifier",
"src": "310:6:1"
},
"nativeSrc": "310:12:1",
"nodeType": "YulFunctionCall",
"src": "310:12:1"
},
"nativeSrc": "310:12:1",
"nodeType": "YulExpressionStatement",
"src": "310:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "211:117:1",
"nodeType": "YulFunctionDefinition",
"src": "211:117:1"
},
{
"body": {
"nativeSrc": "423:28:1",
"nodeType": "YulBlock",
"src": "423:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "440:1:1",
"nodeType": "YulLiteral",
"src": "440:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "443:1:1",
"nodeType": "YulLiteral",
"src": "443:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "433:6:1",
"nodeType": "YulIdentifier",
"src": "433:6:1"
},
"nativeSrc": "433:12:1",
"nodeType": "YulFunctionCall",
"src": "433:12:1"
},
"nativeSrc": "433:12:1",
"nodeType": "YulExpressionStatement",
"src": "433:12:1"
}
]
},
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nativeSrc": "334:117:1",
"nodeType": "YulFunctionDefinition",
"src": "334:117:1"
},
{
"body": {
"nativeSrc": "546:28:1",
"nodeType": "YulBlock",
"src": "546:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "563:1:1",
"nodeType": "YulLiteral",
"src": "563:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "566:1:1",
"nodeType": "YulLiteral",
"src": "566:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "556:6:1",
"nodeType": "YulIdentifier",
"src": "556:6:1"
},
"nativeSrc": "556:12:1",
"nodeType": "YulFunctionCall",
"src": "556:12:1"
},
"nativeSrc": "556:12:1",
"nodeType": "YulExpressionStatement",
"src": "556:12:1"
}
]
},
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae",
"nativeSrc": "457:117:1",
"nodeType": "YulFunctionDefinition",
"src": "457:117:1"
},
{
"body": {
"nativeSrc": "628:54:1",
"nodeType": "YulBlock",
"src": "628:54:1",
"statements": [
{
"nativeSrc": "638:38:1",
"nodeType": "YulAssignment",
"src": "638:38:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "656:5:1",
"nodeType": "YulIdentifier",
"src": "656:5:1"
},
{
"kind": "number",
"nativeSrc": "663:2:1",
"nodeType": "YulLiteral",
"src": "663:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nativeSrc": "652:3:1",
"nodeType": "YulIdentifier",
"src": "652:3:1"
},
"nativeSrc": "652:14:1",
"nodeType": "YulFunctionCall",
"src": "652:14:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "672:2:1",
"nodeType": "YulLiteral",
"src": "672:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nativeSrc": "668:3:1",
"nodeType": "YulIdentifier",
"src": "668:3:1"
},
"nativeSrc": "668:7:1",
"nodeType": "YulFunctionCall",
"src": "668:7:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "648:3:1",
"nodeType": "YulIdentifier",
"src": "648:3:1"
},
"nativeSrc": "648:28:1",
"nodeType": "YulFunctionCall",
"src": "648:28:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "638:6:1",
"nodeType": "YulIdentifier",
"src": "638:6:1"
}
]
}
]
},
"name": "round_up_to_mul_of_32",
"nativeSrc": "580:102:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "611:5:1",
"nodeType": "YulTypedName",
"src": "611:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "621:6:1",
"nodeType": "YulTypedName",
"src": "621:6:1",
"type": ""
}
],
"src": "580:102:1"
},
{
"body": {
"nativeSrc": "716:152:1",
"nodeType": "YulBlock",
"src": "716:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "733:1:1",
"nodeType": "YulLiteral",
"src": "733:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "736:77:1",
"nodeType": "YulLiteral",
"src": "736:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "726:6:1",
"nodeType": "YulIdentifier",
"src": "726:6:1"
},
"nativeSrc": "726:88:1",
"nodeType": "YulFunctionCall",
"src": "726:88:1"
},
"nativeSrc": "726:88:1",
"nodeType": "YulExpressionStatement",
"src": "726:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "830:1:1",
"nodeType": "YulLiteral",
"src": "830:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nativeSrc": "833:4:1",
"nodeType": "YulLiteral",
"src": "833:4:1",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "823:6:1",
"nodeType": "YulIdentifier",
"src": "823:6:1"
},
"nativeSrc": "823:15:1",
"nodeType": "YulFunctionCall",
"src": "823:15:1"
},
"nativeSrc": "823:15:1",
"nodeType": "YulExpressionStatement",
"src": "823:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "854:1:1",
"nodeType": "YulLiteral",
"src": "854:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "857:4:1",
"nodeType": "YulLiteral",
"src": "857:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "847:6:1",
"nodeType": "YulIdentifier",
"src": "847:6:1"
},
"nativeSrc": "847:15:1",
"nodeType": "YulFunctionCall",
"src": "847:15:1"
},
"nativeSrc": "847:15:1",
"nodeType": "YulExpressionStatement",
"src": "847:15:1"
}
]
},
"name": "panic_error_0x41",
"nativeSrc": "688:180:1",
"nodeType": "YulFunctionDefinition",
"src": "688:180:1"
},
{
"body": {
"nativeSrc": "917:238:1",
"nodeType": "YulBlock",
"src": "917:238:1",
"statements": [
{
"nativeSrc": "927:58:1",
"nodeType": "YulVariableDeclaration",
"src": "927:58:1",
"value": {
"arguments": [
{
"name": "memPtr",
"nativeSrc": "949:6:1",
"nodeType": "YulIdentifier",
"src": "949:6:1"
},
{
"arguments": [
{
"name": "size",
"nativeSrc": "979:4:1",
"nodeType": "YulIdentifier",
"src": "979:4:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nativeSrc": "957:21:1",
"nodeType": "YulIdentifier",
"src": "957:21:1"
},
"nativeSrc": "957:27:1",
"nodeType": "YulFunctionCall",
"src": "957:27:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "945:3:1",
"nodeType": "YulIdentifier",
"src": "945:3:1"
},
"nativeSrc": "945:40:1",
"nodeType": "YulFunctionCall",
"src": "945:40:1"
},
"variables": [
{
"name": "newFreePtr",
"nativeSrc": "931:10:1",
"nodeType": "YulTypedName",
"src": "931:10:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "1096:22:1",
"nodeType": "YulBlock",
"src": "1096:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nativeSrc": "1098:16:1",
"nodeType": "YulIdentifier",
"src": "1098:16:1"
},
"nativeSrc": "1098:18:1",
"nodeType": "YulFunctionCall",
"src": "1098:18:1"
},
"nativeSrc": "1098:18:1",
"nodeType": "YulExpressionStatement",
"src": "1098:18:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "newFreePtr",
"nativeSrc": "1039:10:1",
"nodeType": "YulIdentifier",
"src": "1039:10:1"
},
{
"kind": "number",
"nativeSrc": "1051:18:1",
"nodeType": "YulLiteral",
"src": "1051:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "1036:2:1",
"nodeType": "YulIdentifier",
"src": "1036:2:1"
},
"nativeSrc": "1036:34:1",
"nodeType": "YulFunctionCall",
"src": "1036:34:1"
},
{
"arguments": [
{
"name": "newFreePtr",
"nativeSrc": "1075:10:1",
"nodeType": "YulIdentifier",
"src": "1075:10:1"
},
{
"name": "memPtr",
"nativeSrc": "1087:6:1",
"nodeType": "YulIdentifier",
"src": "1087:6:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "1072:2:1",
"nodeType": "YulIdentifier",
"src": "1072:2:1"
},
"nativeSrc": "1072:22:1",
"nodeType": "YulFunctionCall",
"src": "1072:22:1"
}
],
"functionName": {
"name": "or",
"nativeSrc": "1033:2:1",
"nodeType": "YulIdentifier",
"src": "1033:2:1"
},
"nativeSrc": "1033:62:1",
"nodeType": "YulFunctionCall",
"src": "1033:62:1"
},
"nativeSrc": "1030:88:1",
"nodeType": "YulIf",
"src": "1030:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1134:2:1",
"nodeType": "YulLiteral",
"src": "1134:2:1",
"type": "",
"value": "64"
},
{
"name": "newFreePtr",
"nativeSrc": "1138:10:1",
"nodeType": "YulIdentifier",
"src": "1138:10:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1127:6:1",
"nodeType": "YulIdentifier",
"src": "1127:6:1"
},
"nativeSrc": "1127:22:1",
"nodeType": "YulFunctionCall",
"src": "1127:22:1"
},
"nativeSrc": "1127:22:1",
"nodeType": "YulExpressionStatement",
"src": "1127:22:1"
}
]
},
"name": "finalize_allocation",
"nativeSrc": "874:281:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nativeSrc": "903:6:1",
"nodeType": "YulTypedName",
"src": "903:6:1",
"type": ""
},
{
"name": "size",
"nativeSrc": "911:4:1",
"nodeType": "YulTypedName",
"src": "911:4:1",
"type": ""
}
],
"src": "874:281:1"
},
{
"body": {
"nativeSrc": "1202:88:1",
"nodeType": "YulBlock",
"src": "1202:88:1",
"statements": [
{
"nativeSrc": "1212:30:1",
"nodeType": "YulAssignment",
"src": "1212:30:1",
"value": {
"arguments": [],
"functionName": {
"name": "allocate_unbounded",
"nativeSrc": "1222:18:1",
"nodeType": "YulIdentifier",
"src": "1222:18:1"
},
"nativeSrc": "1222:20:1",
"nodeType": "YulFunctionCall",
"src": "1222:20:1"
},
"variableNames": [
{
"name": "memPtr",
"nativeSrc": "1212:6:1",
"nodeType": "YulIdentifier",
"src": "1212:6:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "memPtr",
"nativeSrc": "1271:6:1",
"nodeType": "YulIdentifier",
"src": "1271:6:1"
},
{
"name": "size",
"nativeSrc": "1279:4:1",
"nodeType": "YulIdentifier",
"src": "1279:4:1"
}
],
"functionName": {
"name": "finalize_allocation",
"nativeSrc": "1251:19:1",
"nodeType": "YulIdentifier",
"src": "1251:19:1"
},
"nativeSrc": "1251:33:1",
"nodeType": "YulFunctionCall",
"src": "1251:33:1"
},
"nativeSrc": "1251:33:1",
"nodeType": "YulExpressionStatement",
"src": "1251:33:1"
}
]
},
"name": "allocate_memory",
"nativeSrc": "1161:129:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "size",
"nativeSrc": "1186:4:1",
"nodeType": "YulTypedName",
"src": "1186:4:1",
"type": ""
}
],
"returnVariables": [
{
"name": "memPtr",
"nativeSrc": "1195:6:1",
"nodeType": "YulTypedName",
"src": "1195:6:1",
"type": ""
}
],
"src": "1161:129:1"
},
{
"body": {
"nativeSrc": "1363:241:1",
"nodeType": "YulBlock",
"src": "1363:241:1",
"statements": [
{
"body": {
"nativeSrc": "1468:22:1",
"nodeType": "YulBlock",
"src": "1468:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nativeSrc": "1470:16:1",
"nodeType": "YulIdentifier",
"src": "1470:16:1"
},
"nativeSrc": "1470:18:1",
"nodeType": "YulFunctionCall",
"src": "1470:18:1"
},
"nativeSrc": "1470:18:1",
"nodeType": "YulExpressionStatement",
"src": "1470:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "length",
"nativeSrc": "1440:6:1",
"nodeType": "YulIdentifier",
"src": "1440:6:1"
},
{
"kind": "number",
"nativeSrc": "1448:18:1",
"nodeType": "YulLiteral",
"src": "1448:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "1437:2:1",
"nodeType": "YulIdentifier",
"src": "1437:2:1"
},
"nativeSrc": "1437:30:1",
"nodeType": "YulFunctionCall",
"src": "1437:30:1"
},
"nativeSrc": "1434:56:1",
"nodeType": "YulIf",
"src": "1434:56:1"
},
{
"nativeSrc": "1500:37:1",
"nodeType": "YulAssignment",
"src": "1500:37:1",
"value": {
"arguments": [
{
"name": "length",
"nativeSrc": "1530:6:1",
"nodeType": "YulIdentifier",
"src": "1530:6:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nativeSrc": "1508:21:1",
"nodeType": "YulIdentifier",
"src": "1508:21:1"
},
"nativeSrc": "1508:29:1",
"nodeType": "YulFunctionCall",
"src": "1508:29:1"
},
"variableNames": [
{
"name": "size",
"nativeSrc": "1500:4:1",
"nodeType": "YulIdentifier",
"src": "1500:4:1"
}
]
},
{
"nativeSrc": "1574:23:1",
"nodeType": "YulAssignment",
"src": "1574:23:1",
"value": {
"arguments": [
{
"name": "size",
"nativeSrc": "1586:4:1",
"nodeType": "YulIdentifier",
"src": "1586:4:1"
},
{
"kind": "number",
"nativeSrc": "1592:4:1",
"nodeType": "YulLiteral",
"src": "1592:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1582:3:1",
"nodeType": "YulIdentifier",
"src": "1582:3:1"
},
"nativeSrc": "1582:15:1",
"nodeType": "YulFunctionCall",
"src": "1582:15:1"
},
"variableNames": [
{
"name": "size",
"nativeSrc": "1574:4:1",
"nodeType": "YulIdentifier",
"src": "1574:4:1"
}
]
}
]
},
"name": "array_allocation_size_t_string_memory_ptr",
"nativeSrc": "1296:308:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "length",
"nativeSrc": "1347:6:1",
"nodeType": "YulTypedName",
"src": "1347:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "size",
"nativeSrc": "1358:4:1",
"nodeType": "YulTypedName",
"src": "1358:4:1",
"type": ""
}
],
"src": "1296:308:1"
},
{
"body": {
"nativeSrc": "1672:184:1",
"nodeType": "YulBlock",
"src": "1672:184:1",
"statements": [
{
"nativeSrc": "1682:10:1",
"nodeType": "YulVariableDeclaration",
"src": "1682:10:1",
"value": {
"kind": "number",
"nativeSrc": "1691:1:1",
"nodeType": "YulLiteral",
"src": "1691:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nativeSrc": "1686:1:1",
"nodeType": "YulTypedName",
"src": "1686:1:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "1751:63:1",
"nodeType": "YulBlock",
"src": "1751:63:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nativeSrc": "1776:3:1",
"nodeType": "YulIdentifier",
"src": "1776:3:1"
},
{
"name": "i",
"nativeSrc": "1781:1:1",
"nodeType": "YulIdentifier",
"src": "1781:1:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1772:3:1",
"nodeType": "YulIdentifier",
"src": "1772:3:1"
},
"nativeSrc": "1772:11:1",
"nodeType": "YulFunctionCall",
"src": "1772:11:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "1795:3:1",
"nodeType": "YulIdentifier",
"src": "1795:3:1"
},
{
"name": "i",
"nativeSrc": "1800:1:1",
"nodeType": "YulIdentifier",
"src": "1800:1:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1791:3:1",
"nodeType": "YulIdentifier",
"src": "1791:3:1"
},
"nativeSrc": "1791:11:1",
"nodeType": "YulFunctionCall",
"src": "1791:11:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "1785:5:1",
"nodeType": "YulIdentifier",
"src": "1785:5:1"
},
"nativeSrc": "1785:18:1",
"nodeType": "YulFunctionCall",
"src": "1785:18:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1765:6:1",
"nodeType": "YulIdentifier",
"src": "1765:6:1"
},
"nativeSrc": "1765:39:1",
"nodeType": "YulFunctionCall",
"src": "1765:39:1"
},
"nativeSrc": "1765:39:1",
"nodeType": "YulExpressionStatement",
"src": "1765:39:1"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nativeSrc": "1712:1:1",
"nodeType": "YulIdentifier",
"src": "1712:1:1"
},
{
"name": "length",
"nativeSrc": "1715:6:1",
"nodeType": "YulIdentifier",
"src": "1715:6:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "1709:2:1",
"nodeType": "YulIdentifier",
"src": "1709:2:1"
},
"nativeSrc": "1709:13:1",
"nodeType": "YulFunctionCall",
"src": "1709:13:1"
},
"nativeSrc": "1701:113:1",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "1723:19:1",
"nodeType": "YulBlock",
"src": "1723:19:1",
"statements": [
{
"nativeSrc": "1725:15:1",
"nodeType": "YulAssignment",
"src": "1725:15:1",
"value": {
"arguments": [
{
"name": "i",
"nativeSrc": "1734:1:1",
"nodeType": "YulIdentifier",
"src": "1734:1:1"
},
{
"kind": "number",
"nativeSrc": "1737:2:1",
"nodeType": "YulLiteral",
"src": "1737:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1730:3:1",
"nodeType": "YulIdentifier",
"src": "1730:3:1"
},
"nativeSrc": "1730:10:1",
"nodeType": "YulFunctionCall",
"src": "1730:10:1"
},
"variableNames": [
{
"name": "i",
"nativeSrc": "1725:1:1",
"nodeType": "YulIdentifier",
"src": "1725:1:1"
}
]
}
]
},
"pre": {
"nativeSrc": "1705:3:1",
"nodeType": "YulBlock",
"src": "1705:3:1",
"statements": []
},
"src": "1701:113:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nativeSrc": "1834:3:1",
"nodeType": "YulIdentifier",
"src": "1834:3:1"
},
{
"name": "length",
"nativeSrc": "1839:6:1",
"nodeType": "YulIdentifier",
"src": "1839:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1830:3:1",
"nodeType": "YulIdentifier",
"src": "1830:3:1"
},
"nativeSrc": "1830:16:1",
"nodeType": "YulFunctionCall",
"src": "1830:16:1"
},
{
"kind": "number",
"nativeSrc": "1848:1:1",
"nodeType": "YulLiteral",
"src": "1848:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1823:6:1",
"nodeType": "YulIdentifier",
"src": "1823:6:1"
},
"nativeSrc": "1823:27:1",
"nodeType": "YulFunctionCall",
"src": "1823:27:1"
},
"nativeSrc": "1823:27:1",
"nodeType": "YulExpressionStatement",
"src": "1823:27:1"
}
]
},
"name": "copy_memory_to_memory_with_cleanup",
"nativeSrc": "1610:246:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nativeSrc": "1654:3:1",
"nodeType": "YulTypedName",
"src": "1654:3:1",
"type": ""
},
{
"name": "dst",
"nativeSrc": "1659:3:1",
"nodeType": "YulTypedName",
"src": "1659:3:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "1664:6:1",
"nodeType": "YulTypedName",
"src": "1664:6:1",
"type": ""
}
],
"src": "1610:246:1"
},
{
"body": {
"nativeSrc": "1957:339:1",
"nodeType": "YulBlock",
"src": "1957:339:1",
"statements": [
{
"nativeSrc": "1967:75:1",
"nodeType": "YulAssignment",
"src": "1967:75:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "length",
"nativeSrc": "2034:6:1",
"nodeType": "YulIdentifier",
"src": "2034:6:1"
}
],
"functionName": {
"name": "array_allocation_size_t_string_memory_ptr",
"nativeSrc": "1992:41:1",
"nodeType": "YulIdentifier",
"src": "1992:41:1"
},
"nativeSrc": "1992:49:1",
"nodeType": "YulFunctionCall",
"src": "1992:49:1"
}
],
"functionName": {
"name": "allocate_memory",
"nativeSrc": "1976:15:1",
"nodeType": "YulIdentifier",
"src": "1976:15:1"
},
"nativeSrc": "1976:66:1",
"nodeType": "YulFunctionCall",
"src": "1976:66:1"
},
"variableNames": [
{
"name": "array",
"nativeSrc": "1967:5:1",
"nodeType": "YulIdentifier",
"src": "1967:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "array",
"nativeSrc": "2058:5:1",
"nodeType": "YulIdentifier",
"src": "2058:5:1"
},
{
"name": "length",
"nativeSrc": "2065:6:1",
"nodeType": "YulIdentifier",
"src": "2065:6:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "2051:6:1",
"nodeType": "YulIdentifier",
"src": "2051:6:1"
},
"nativeSrc": "2051:21:1",
"nodeType": "YulFunctionCall",
"src": "2051:21:1"
},
"nativeSrc": "2051:21:1",
"nodeType": "YulExpressionStatement",
"src": "2051:21:1"
},
{
"nativeSrc": "2081:27:1",
"nodeType": "YulVariableDeclaration",
"src": "2081:27:1",
"value": {
"arguments": [
{
"name": "array",
"nativeSrc": "2096:5:1",
"nodeType": "YulIdentifier",
"src": "2096:5:1"
},
{
"kind": "number",
"nativeSrc": "2103:4:1",
"nodeType": "YulLiteral",
"src": "2103:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2092:3:1",
"nodeType": "YulIdentifier",
"src": "2092:3:1"
},
"nativeSrc": "2092:16:1",
"nodeType": "YulFunctionCall",
"src": "2092:16:1"
},
"variables": [
{
"name": "dst",
"nativeSrc": "2085:3:1",
"nodeType": "YulTypedName",
"src": "2085:3:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "2146:83:1",
"nodeType": "YulBlock",
"src": "2146:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae",
"nativeSrc": "2148:77:1",
"nodeType": "YulIdentifier",
"src": "2148:77:1"
},
"nativeSrc": "2148:79:1",
"nodeType": "YulFunctionCall",
"src": "2148:79:1"
},
"nativeSrc": "2148:79:1",
"nodeType": "YulExpressionStatement",
"src": "2148:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "2127:3:1",
"nodeType": "YulIdentifier",
"src": "2127:3:1"
},
{
"name": "length",
"nativeSrc": "2132:6:1",
"nodeType": "YulIdentifier",
"src": "2132:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2123:3:1",
"nodeType": "YulIdentifier",
"src": "2123:3:1"
},
"nativeSrc": "2123:16:1",
"nodeType": "YulFunctionCall",
"src": "2123:16:1"
},
{
"name": "end",
"nativeSrc": "2141:3:1",
"nodeType": "YulIdentifier",
"src": "2141:3:1"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "2120:2:1",
"nodeType": "YulIdentifier",
"src": "2120:2:1"
},
"nativeSrc": "2120:25:1",
"nodeType": "YulFunctionCall",
"src": "2120:25:1"
},
"nativeSrc": "2117:112:1",
"nodeType": "YulIf",
"src": "2117:112:1"
},
{
"expression": {
"arguments": [
{
"name": "src",
"nativeSrc": "2273:3:1",
"nodeType": "YulIdentifier",
"src": "2273:3:1"
},
{
"name": "dst",
"nativeSrc": "2278:3:1",
"nodeType": "YulIdentifier",
"src": "2278:3:1"
},
{
"name": "length",
"nativeSrc": "2283:6:1",
"nodeType": "YulIdentifier",
"src": "2283:6:1"
}
],
"functionName": {
"name": "copy_memory_to_memory_with_cleanup",
"nativeSrc": "2238:34:1",
"nodeType": "YulIdentifier",
"src": "2238:34:1"
},
"nativeSrc": "2238:52:1",
"nodeType": "YulFunctionCall",
"src": "2238:52:1"
},
"nativeSrc": "2238:52:1",
"nodeType": "YulExpressionStatement",
"src": "2238:52:1"
}
]
},
"name": "abi_decode_available_length_t_string_memory_ptr_fromMemory",
"nativeSrc": "1862:434:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nativeSrc": "1930:3:1",
"nodeType": "YulTypedName",
"src": "1930:3:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "1935:6:1",
"nodeType": "YulTypedName",
"src": "1935:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "1943:3:1",
"nodeType": "YulTypedName",
"src": "1943:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "array",
"nativeSrc": "1951:5:1",
"nodeType": "YulTypedName",
"src": "1951:5:1",
"type": ""
}
],
"src": "1862:434:1"
},
{
"body": {
"nativeSrc": "2389:282:1",
"nodeType": "YulBlock",
"src": "2389:282:1",
"statements": [
{
"body": {
"nativeSrc": "2438:83:1",
"nodeType": "YulBlock",
"src": "2438:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nativeSrc": "2440:77:1",
"nodeType": "YulIdentifier",
"src": "2440:77:1"
},
"nativeSrc": "2440:79:1",
"nodeType": "YulFunctionCall",
"src": "2440:79:1"
},
"nativeSrc": "2440:79:1",
"nodeType": "YulExpressionStatement",
"src": "2440:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "offset",
"nativeSrc": "2417:6:1",
"nodeType": "YulIdentifier",
"src": "2417:6:1"
},
{
"kind": "number",
"nativeSrc": "2425:4:1",
"nodeType": "YulLiteral",
"src": "2425:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2413:3:1",
"nodeType": "YulIdentifier",
"src": "2413:3:1"
},
"nativeSrc": "2413:17:1",
"nodeType": "YulFunctionCall",
"src": "2413:17:1"
},
{
"name": "end",
"nativeSrc": "2432:3:1",
"nodeType": "YulIdentifier",
"src": "2432:3:1"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "2409:3:1",
"nodeType": "YulIdentifier",
"src": "2409:3:1"
},
"nativeSrc": "2409:27:1",
"nodeType": "YulFunctionCall",
"src": "2409:27:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "2402:6:1",
"nodeType": "YulIdentifier",
"src": "2402:6:1"
},
"nativeSrc": "2402:35:1",
"nodeType": "YulFunctionCall",
"src": "2402:35:1"
},
"nativeSrc": "2399:122:1",
"nodeType": "YulIf",
"src": "2399:122:1"
},
{
"nativeSrc": "2530:27:1",
"nodeType": "YulVariableDeclaration",
"src": "2530:27:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "2550:6:1",
"nodeType": "YulIdentifier",
"src": "2550:6:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "2544:5:1",
"nodeType": "YulIdentifier",
"src": "2544:5:1"
},
"nativeSrc": "2544:13:1",
"nodeType": "YulFunctionCall",
"src": "2544:13:1"
},
"variables": [
{
"name": "length",
"nativeSrc": "2534:6:1",
"nodeType": "YulTypedName",
"src": "2534:6:1",
"type": ""
}
]
},
{
"nativeSrc": "2566:99:1",
"nodeType": "YulAssignment",
"src": "2566:99:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "offset",
"nativeSrc": "2638:6:1",
"nodeType": "YulIdentifier",
"src": "2638:6:1"
},
{
"kind": "number",
"nativeSrc": "2646:4:1",
"nodeType": "YulLiteral",
"src": "2646:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2634:3:1",
"nodeType": "YulIdentifier",
"src": "2634:3:1"
},
"nativeSrc": "2634:17:1",
"nodeType": "YulFunctionCall",
"src": "2634:17:1"
},
{
"name": "length",
"nativeSrc": "2653:6:1",
"nodeType": "YulIdentifier",
"src": "2653:6:1"
},
{
"name": "end",
"nativeSrc": "2661:3:1",
"nodeType": "YulIdentifier",
"src": "2661:3:1"
}
],
"functionName": {
"name": "abi_decode_available_length_t_string_memory_ptr_fromMemory",
"nativeSrc": "2575:58:1",
"nodeType": "YulIdentifier",
"src": "2575:58:1"
},
"nativeSrc": "2575:90:1",
"nodeType": "YulFunctionCall",
"src": "2575:90:1"
},
"variableNames": [
{
"name": "array",
"nativeSrc": "2566:5:1",
"nodeType": "YulIdentifier",
"src": "2566:5:1"
}
]
}
]
},
"name": "abi_decode_t_string_memory_ptr_fromMemory",
"nativeSrc": "2316:355:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "2367:6:1",
"nodeType": "YulTypedName",
"src": "2367:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "2375:3:1",
"nodeType": "YulTypedName",
"src": "2375:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "array",
"nativeSrc": "2383:5:1",
"nodeType": "YulTypedName",
"src": "2383:5:1",
"type": ""
}
],
"src": "2316:355:1"
},
{
"body": {
"nativeSrc": "2720:43:1",
"nodeType": "YulBlock",
"src": "2720:43:1",
"statements": [
{
"nativeSrc": "2730:27:1",
"nodeType": "YulAssignment",
"src": "2730:27:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "2745:5:1",
"nodeType": "YulIdentifier",
"src": "2745:5:1"
},
{
"kind": "number",
"nativeSrc": "2752:4:1",
"nodeType": "YulLiteral",
"src": "2752:4:1",
"type": "",
"value": "0xff"
}
],
"functionName": {
"name": "and",
"nativeSrc": "2741:3:1",
"nodeType": "YulIdentifier",
"src": "2741:3:1"
},
"nativeSrc": "2741:16:1",
"nodeType": "YulFunctionCall",
"src": "2741:16:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "2730:7:1",
"nodeType": "YulIdentifier",
"src": "2730:7:1"
}
]
}
]
},
"name": "cleanup_t_uint8",
"nativeSrc": "2677:86:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "2702:5:1",
"nodeType": "YulTypedName",
"src": "2702:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "2712:7:1",
"nodeType": "YulTypedName",
"src": "2712:7:1",
"type": ""
}
],
"src": "2677:86:1"
},
{
"body": {
"nativeSrc": "2810:77:1",
"nodeType": "YulBlock",
"src": "2810:77:1",
"statements": [
{
"body": {
"nativeSrc": "2865:16:1",
"nodeType": "YulBlock",
"src": "2865:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "2874:1:1",
"nodeType": "YulLiteral",
"src": "2874:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "2877:1:1",
"nodeType": "YulLiteral",
"src": "2877:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "2867:6:1",
"nodeType": "YulIdentifier",
"src": "2867:6:1"
},
"nativeSrc": "2867:12:1",
"nodeType": "YulFunctionCall",
"src": "2867:12:1"
},
"nativeSrc": "2867:12:1",
"nodeType": "YulExpressionStatement",
"src": "2867:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "2833:5:1",
"nodeType": "YulIdentifier",
"src": "2833:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "2856:5:1",
"nodeType": "YulIdentifier",
"src": "2856:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint8",
"nativeSrc": "2840:15:1",
"nodeType": "YulIdentifier",
"src": "2840:15:1"
},
"nativeSrc": "2840:22:1",
"nodeType": "YulFunctionCall",
"src": "2840:22:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "2830:2:1",
"nodeType": "YulIdentifier",
"src": "2830:2:1"
},
"nativeSrc": "2830:33:1",
"nodeType": "YulFunctionCall",
"src": "2830:33:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "2823:6:1",
"nodeType": "YulIdentifier",
"src": "2823:6:1"
},
"nativeSrc": "2823:41:1",
"nodeType": "YulFunctionCall",
"src": "2823:41:1"
},
"nativeSrc": "2820:61:1",
"nodeType": "YulIf",
"src": "2820:61:1"
}
]
},
"name": "validator_revert_t_uint8",
"nativeSrc": "2769:118:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "2803:5:1",
"nodeType": "YulTypedName",
"src": "2803:5:1",
"type": ""
}
],
"src": "2769:118:1"
},
{
"body": {
"nativeSrc": "2954:78:1",
"nodeType": "YulBlock",
"src": "2954:78:1",
"statements": [
{
"nativeSrc": "2964:22:1",
"nodeType": "YulAssignment",
"src": "2964:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "2979:6:1",
"nodeType": "YulIdentifier",
"src": "2979:6:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "2973:5:1",
"nodeType": "YulIdentifier",
"src": "2973:5:1"
},
"nativeSrc": "2973:13:1",
"nodeType": "YulFunctionCall",
"src": "2973:13:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "2964:5:1",
"nodeType": "YulIdentifier",
"src": "2964:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "3020:5:1",
"nodeType": "YulIdentifier",
"src": "3020:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint8",
"nativeSrc": "2995:24:1",
"nodeType": "YulIdentifier",
"src": "2995:24:1"
},
"nativeSrc": "2995:31:1",
"nodeType": "YulFunctionCall",
"src": "2995:31:1"
},
"nativeSrc": "2995:31:1",
"nodeType": "YulExpressionStatement",
"src": "2995:31:1"
}
]
},
"name": "abi_decode_t_uint8_fromMemory",
"nativeSrc": "2893:139:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "2932:6:1",
"nodeType": "YulTypedName",
"src": "2932:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "2940:3:1",
"nodeType": "YulTypedName",
"src": "2940:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "2948:5:1",
"nodeType": "YulTypedName",
"src": "2948:5:1",
"type": ""
}
],
"src": "2893:139:1"
},
{
"body": {
"nativeSrc": "3083:81:1",
"nodeType": "YulBlock",
"src": "3083:81:1",
"statements": [
{
"nativeSrc": "3093:65:1",
"nodeType": "YulAssignment",
"src": "3093:65:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "3108:5:1",
"nodeType": "YulIdentifier",
"src": "3108:5:1"
},
{
"kind": "number",
"nativeSrc": "3115:42:1",
"nodeType": "YulLiteral",
"src": "3115:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nativeSrc": "3104:3:1",
"nodeType": "YulIdentifier",
"src": "3104:3:1"
},
"nativeSrc": "3104:54:1",
"nodeType": "YulFunctionCall",
"src": "3104:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "3093:7:1",
"nodeType": "YulIdentifier",
"src": "3093:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nativeSrc": "3038:126:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3065:5:1",
"nodeType": "YulTypedName",
"src": "3065:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "3075:7:1",
"nodeType": "YulTypedName",
"src": "3075:7:1",
"type": ""
}
],
"src": "3038:126:1"
},
{
"body": {
"nativeSrc": "3215:51:1",
"nodeType": "YulBlock",
"src": "3215:51:1",
"statements": [
{
"nativeSrc": "3225:35:1",
"nodeType": "YulAssignment",
"src": "3225:35:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "3254:5:1",
"nodeType": "YulIdentifier",
"src": "3254:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nativeSrc": "3236:17:1",
"nodeType": "YulIdentifier",
"src": "3236:17:1"
},
"nativeSrc": "3236:24:1",
"nodeType": "YulFunctionCall",
"src": "3236:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "3225:7:1",
"nodeType": "YulIdentifier",
"src": "3225:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nativeSrc": "3170:96:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3197:5:1",
"nodeType": "YulTypedName",
"src": "3197:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "3207:7:1",
"nodeType": "YulTypedName",
"src": "3207:7:1",
"type": ""
}
],
"src": "3170:96:1"
},
{
"body": {
"nativeSrc": "3315:79:1",
"nodeType": "YulBlock",
"src": "3315:79:1",
"statements": [
{
"body": {
"nativeSrc": "3372:16:1",
"nodeType": "YulBlock",
"src": "3372:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "3381:1:1",
"nodeType": "YulLiteral",
"src": "3381:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "3384:1:1",
"nodeType": "YulLiteral",
"src": "3384:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "3374:6:1",
"nodeType": "YulIdentifier",
"src": "3374:6:1"
},
"nativeSrc": "3374:12:1",
"nodeType": "YulFunctionCall",
"src": "3374:12:1"
},
"nativeSrc": "3374:12:1",
"nodeType": "YulExpressionStatement",
"src": "3374:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "3338:5:1",
"nodeType": "YulIdentifier",
"src": "3338:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "3363:5:1",
"nodeType": "YulIdentifier",
"src": "3363:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nativeSrc": "3345:17:1",
"nodeType": "YulIdentifier",
"src": "3345:17:1"
},
"nativeSrc": "3345:24:1",
"nodeType": "YulFunctionCall",
"src": "3345:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "3335:2:1",
"nodeType": "YulIdentifier",
"src": "3335:2:1"
},
"nativeSrc": "3335:35:1",
"nodeType": "YulFunctionCall",
"src": "3335:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "3328:6:1",
"nodeType": "YulIdentifier",
"src": "3328:6:1"
},
"nativeSrc": "3328:43:1",
"nodeType": "YulFunctionCall",
"src": "3328:43:1"
},
"nativeSrc": "3325:63:1",
"nodeType": "YulIf",
"src": "3325:63:1"
}
]
},
"name": "validator_revert_t_address",
"nativeSrc": "3272:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3308:5:1",
"nodeType": "YulTypedName",
"src": "3308:5:1",
"type": ""
}
],
"src": "3272:122:1"
},
{
"body": {
"nativeSrc": "3463:80:1",
"nodeType": "YulBlock",
"src": "3463:80:1",
"statements": [
{
"nativeSrc": "3473:22:1",
"nodeType": "YulAssignment",
"src": "3473:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "3488:6:1",
"nodeType": "YulIdentifier",
"src": "3488:6:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "3482:5:1",
"nodeType": "YulIdentifier",
"src": "3482:5:1"
},
"nativeSrc": "3482:13:1",
"nodeType": "YulFunctionCall",
"src": "3482:13:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "3473:5:1",
"nodeType": "YulIdentifier",
"src": "3473:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "3531:5:1",
"nodeType": "YulIdentifier",
"src": "3531:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nativeSrc": "3504:26:1",
"nodeType": "YulIdentifier",
"src": "3504:26:1"
},
"nativeSrc": "3504:33:1",
"nodeType": "YulFunctionCall",
"src": "3504:33:1"
},
"nativeSrc": "3504:33:1",
"nodeType": "YulExpressionStatement",
"src": "3504:33:1"
}
]
},
"name": "abi_decode_t_address_fromMemory",
"nativeSrc": "3400:143:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "3441:6:1",
"nodeType": "YulTypedName",
"src": "3441:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "3449:3:1",
"nodeType": "YulTypedName",
"src": "3449:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "3457:5:1",
"nodeType": "YulTypedName",
"src": "3457:5:1",
"type": ""
}
],
"src": "3400:143:1"
},
{
"body": {
"nativeSrc": "3594:32:1",
"nodeType": "YulBlock",
"src": "3594:32:1",
"statements": [
{
"nativeSrc": "3604:16:1",
"nodeType": "YulAssignment",
"src": "3604:16:1",
"value": {
"name": "value",
"nativeSrc": "3615:5:1",
"nodeType": "YulIdentifier",
"src": "3615:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "3604:7:1",
"nodeType": "YulIdentifier",
"src": "3604:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nativeSrc": "3549:77:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3576:5:1",
"nodeType": "YulTypedName",
"src": "3576:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "3586:7:1",
"nodeType": "YulTypedName",
"src": "3586:7:1",
"type": ""
}
],
"src": "3549:77:1"
},
{
"body": {
"nativeSrc": "3675:79:1",
"nodeType": "YulBlock",
"src": "3675:79:1",
"statements": [
{
"body": {
"nativeSrc": "3732:16:1",
"nodeType": "YulBlock",
"src": "3732:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "3741:1:1",
"nodeType": "YulLiteral",
"src": "3741:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "3744:1:1",
"nodeType": "YulLiteral",
"src": "3744:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "3734:6:1",
"nodeType": "YulIdentifier",
"src": "3734:6:1"
},
"nativeSrc": "3734:12:1",
"nodeType": "YulFunctionCall",
"src": "3734:12:1"
},
"nativeSrc": "3734:12:1",
"nodeType": "YulExpressionStatement",
"src": "3734:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "3698:5:1",
"nodeType": "YulIdentifier",
"src": "3698:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "3723:5:1",
"nodeType": "YulIdentifier",
"src": "3723:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "3705:17:1",
"nodeType": "YulIdentifier",
"src": "3705:17:1"
},
"nativeSrc": "3705:24:1",
"nodeType": "YulFunctionCall",
"src": "3705:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "3695:2:1",
"nodeType": "YulIdentifier",
"src": "3695:2:1"
},
"nativeSrc": "3695:35:1",
"nodeType": "YulFunctionCall",
"src": "3695:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "3688:6:1",
"nodeType": "YulIdentifier",
"src": "3688:6:1"
},
"nativeSrc": "3688:43:1",
"nodeType": "YulFunctionCall",
"src": "3688:43:1"
},
"nativeSrc": "3685:63:1",
"nodeType": "YulIf",
"src": "3685:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nativeSrc": "3632:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3668:5:1",
"nodeType": "YulTypedName",
"src": "3668:5:1",
"type": ""
}
],
"src": "3632:122:1"
},
{
"body": {
"nativeSrc": "3823:80:1",
"nodeType": "YulBlock",
"src": "3823:80:1",
"statements": [
{
"nativeSrc": "3833:22:1",
"nodeType": "YulAssignment",
"src": "3833:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "3848:6:1",
"nodeType": "YulIdentifier",
"src": "3848:6:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "3842:5:1",
"nodeType": "YulIdentifier",
"src": "3842:5:1"
},
"nativeSrc": "3842:13:1",
"nodeType": "YulFunctionCall",
"src": "3842:13:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "3833:5:1",
"nodeType": "YulIdentifier",
"src": "3833:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "3891:5:1",
"nodeType": "YulIdentifier",
"src": "3891:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nativeSrc": "3864:26:1",
"nodeType": "YulIdentifier",
"src": "3864:26:1"
},
"nativeSrc": "3864:33:1",
"nodeType": "YulFunctionCall",
"src": "3864:33:1"
},
"nativeSrc": "3864:33:1",
"nodeType": "YulExpressionStatement",
"src": "3864:33:1"
}
]
},
"name": "abi_decode_t_uint256_fromMemory",
"nativeSrc": "3760:143:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "3801:6:1",
"nodeType": "YulTypedName",
"src": "3801:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "3809:3:1",
"nodeType": "YulTypedName",
"src": "3809:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "3817:5:1",
"nodeType": "YulTypedName",
"src": "3817:5:1",
"type": ""
}
],
"src": "3760:143:1"
},
{
"body": {
"nativeSrc": "4072:1156:1",
"nodeType": "YulBlock",
"src": "4072:1156:1",
"statements": [
{
"body": {
"nativeSrc": "4119:83:1",
"nodeType": "YulBlock",
"src": "4119:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "4121:77:1",
"nodeType": "YulIdentifier",
"src": "4121:77:1"
},
"nativeSrc": "4121:79:1",
"nodeType": "YulFunctionCall",
"src": "4121:79:1"
},
"nativeSrc": "4121:79:1",
"nodeType": "YulExpressionStatement",
"src": "4121:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "4093:7:1",
"nodeType": "YulIdentifier",
"src": "4093:7:1"
},
{
"name": "headStart",
"nativeSrc": "4102:9:1",
"nodeType": "YulIdentifier",
"src": "4102:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "4089:3:1",
"nodeType": "YulIdentifier",
"src": "4089:3:1"
},
"nativeSrc": "4089:23:1",
"nodeType": "YulFunctionCall",
"src": "4089:23:1"
},
{
"kind": "number",
"nativeSrc": "4114:3:1",
"nodeType": "YulLiteral",
"src": "4114:3:1",
"type": "",
"value": "160"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "4085:3:1",
"nodeType": "YulIdentifier",
"src": "4085:3:1"
},
"nativeSrc": "4085:33:1",
"nodeType": "YulFunctionCall",
"src": "4085:33:1"
},
"nativeSrc": "4082:120:1",
"nodeType": "YulIf",
"src": "4082:120:1"
},
{
"nativeSrc": "4212:291:1",
"nodeType": "YulBlock",
"src": "4212:291:1",
"statements": [
{
"nativeSrc": "4227:38:1",
"nodeType": "YulVariableDeclaration",
"src": "4227:38:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "4251:9:1",
"nodeType": "YulIdentifier",
"src": "4251:9:1"
},
{
"kind": "number",
"nativeSrc": "4262:1:1",
"nodeType": "YulLiteral",
"src": "4262:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4247:3:1",
"nodeType": "YulIdentifier",
"src": "4247:3:1"
},
"nativeSrc": "4247:17:1",
"nodeType": "YulFunctionCall",
"src": "4247:17:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "4241:5:1",
"nodeType": "YulIdentifier",
"src": "4241:5:1"
},
"nativeSrc": "4241:24:1",
"nodeType": "YulFunctionCall",
"src": "4241:24:1"
},
"variables": [
{
"name": "offset",
"nativeSrc": "4231:6:1",
"nodeType": "YulTypedName",
"src": "4231:6:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "4312:83:1",
"nodeType": "YulBlock",
"src": "4312:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "4314:77:1",
"nodeType": "YulIdentifier",
"src": "4314:77:1"
},
"nativeSrc": "4314:79:1",
"nodeType": "YulFunctionCall",
"src": "4314:79:1"
},
"nativeSrc": "4314:79:1",
"nodeType": "YulExpressionStatement",
"src": "4314:79:1"
}
]
},
"condition": {
"arguments": [
{
"name": "offset",
"nativeSrc": "4284:6:1",
"nodeType": "YulIdentifier",
"src": "4284:6:1"
},
{
"kind": "number",
"nativeSrc": "4292:18:1",
"nodeType": "YulLiteral",
"src": "4292:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "4281:2:1",
"nodeType": "YulIdentifier",
"src": "4281:2:1"
},
"nativeSrc": "4281:30:1",
"nodeType": "YulFunctionCall",
"src": "4281:30:1"
},
"nativeSrc": "4278:117:1",
"nodeType": "YulIf",
"src": "4278:117:1"
},
{
"nativeSrc": "4409:84:1",
"nodeType": "YulAssignment",
"src": "4409:84:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "4465:9:1",
"nodeType": "YulIdentifier",
"src": "4465:9:1"
},
{
"name": "offset",
"nativeSrc": "4476:6:1",
"nodeType": "YulIdentifier",
"src": "4476:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4461:3:1",
"nodeType": "YulIdentifier",
"src": "4461:3:1"
},
"nativeSrc": "4461:22:1",
"nodeType": "YulFunctionCall",
"src": "4461:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "4485:7:1",
"nodeType": "YulIdentifier",
"src": "4485:7:1"
}
],
"functionName": {
"name": "abi_decode_t_string_memory_ptr_fromMemory",
"nativeSrc": "4419:41:1",
"nodeType": "YulIdentifier",
"src": "4419:41:1"
},
"nativeSrc": "4419:74:1",
"nodeType": "YulFunctionCall",
"src": "4419:74:1"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "4409:6:1",
"nodeType": "YulIdentifier",
"src": "4409:6:1"
}
]
}
]
},
{
"nativeSrc": "4513:292:1",
"nodeType": "YulBlock",
"src": "4513:292:1",
"statements": [
{
"nativeSrc": "4528:39:1",
"nodeType": "YulVariableDeclaration",
"src": "4528:39:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "4552:9:1",
"nodeType": "YulIdentifier",
"src": "4552:9:1"
},
{
"kind": "number",
"nativeSrc": "4563:2:1",
"nodeType": "YulLiteral",
"src": "4563:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4548:3:1",
"nodeType": "YulIdentifier",
"src": "4548:3:1"
},
"nativeSrc": "4548:18:1",
"nodeType": "YulFunctionCall",
"src": "4548:18:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "4542:5:1",
"nodeType": "YulIdentifier",
"src": "4542:5:1"
},
"nativeSrc": "4542:25:1",
"nodeType": "YulFunctionCall",
"src": "4542:25:1"
},
"variables": [
{
"name": "offset",
"nativeSrc": "4532:6:1",
"nodeType": "YulTypedName",
"src": "4532:6:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "4614:83:1",
"nodeType": "YulBlock",
"src": "4614:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "4616:77:1",
"nodeType": "YulIdentifier",
"src": "4616:77:1"
},
"nativeSrc": "4616:79:1",
"nodeType": "YulFunctionCall",
"src": "4616:79:1"
},
"nativeSrc": "4616:79:1",
"nodeType": "YulExpressionStatement",
"src": "4616:79:1"
}
]
},
"condition": {
"arguments": [
{
"name": "offset",
"nativeSrc": "4586:6:1",
"nodeType": "YulIdentifier",
"src": "4586:6:1"
},
{
"kind": "number",
"nativeSrc": "4594:18:1",
"nodeType": "YulLiteral",
"src": "4594:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "4583:2:1",
"nodeType": "YulIdentifier",
"src": "4583:2:1"
},
"nativeSrc": "4583:30:1",
"nodeType": "YulFunctionCall",
"src": "4583:30:1"
},
"nativeSrc": "4580:117:1",
"nodeType": "YulIf",
"src": "4580:117:1"
},
{
"nativeSrc": "4711:84:1",
"nodeType": "YulAssignment",
"src": "4711:84:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "4767:9:1",
"nodeType": "YulIdentifier",
"src": "4767:9:1"
},
{
"name": "offset",
"nativeSrc": "4778:6:1",
"nodeType": "YulIdentifier",
"src": "4778:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4763:3:1",
"nodeType": "YulIdentifier",
"src": "4763:3:1"
},
"nativeSrc": "4763:22:1",
"nodeType": "YulFunctionCall",
"src": "4763:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "4787:7:1",
"nodeType": "YulIdentifier",
"src": "4787:7:1"
}
],
"functionName": {
"name": "abi_decode_t_string_memory_ptr_fromMemory",
"nativeSrc": "4721:41:1",
"nodeType": "YulIdentifier",
"src": "4721:41:1"
},
"nativeSrc": "4721:74:1",
"nodeType": "YulFunctionCall",
"src": "4721:74:1"
},
"variableNames": [
{
"name": "value1",
"nativeSrc": "4711:6:1",
"nodeType": "YulIdentifier",
"src": "4711:6:1"
}
]
}
]
},
{
"nativeSrc": "4815:127:1",
"nodeType": "YulBlock",
"src": "4815:127:1",
"statements": [
{
"nativeSrc": "4830:16:1",
"nodeType": "YulVariableDeclaration",
"src": "4830:16:1",
"value": {
"kind": "number",
"nativeSrc": "4844:2:1",
"nodeType": "YulLiteral",
"src": "4844:2:1",
"type": "",
"value": "64"
},
"variables": [
{
"name": "offset",
"nativeSrc": "4834:6:1",
"nodeType": "YulTypedName",
"src": "4834:6:1",
"type": ""
}
]
},
{
"nativeSrc": "4860:72:1",
"nodeType": "YulAssignment",
"src": "4860:72:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "4904:9:1",
"nodeType": "YulIdentifier",
"src": "4904:9:1"
},
{
"name": "offset",
"nativeSrc": "4915:6:1",
"nodeType": "YulIdentifier",
"src": "4915:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4900:3:1",
"nodeType": "YulIdentifier",
"src": "4900:3:1"
},
"nativeSrc": "4900:22:1",
"nodeType": "YulFunctionCall",
"src": "4900:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "4924:7:1",
"nodeType": "YulIdentifier",
"src": "4924:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint8_fromMemory",
"nativeSrc": "4870:29:1",
"nodeType": "YulIdentifier",
"src": "4870:29:1"
},
"nativeSrc": "4870:62:1",
"nodeType": "YulFunctionCall",
"src": "4870:62:1"
},
"variableNames": [
{
"name": "value2",
"nativeSrc": "4860:6:1",
"nodeType": "YulIdentifier",
"src": "4860:6:1"
}
]
}
]
},
{
"nativeSrc": "4952:129:1",
"nodeType": "YulBlock",
"src": "4952:129:1",
"statements": [
{
"nativeSrc": "4967:16:1",
"nodeType": "YulVariableDeclaration",
"src": "4967:16:1",
"value": {
"kind": "number",
"nativeSrc": "4981:2:1",
"nodeType": "YulLiteral",
"src": "4981:2:1",
"type": "",
"value": "96"
},
"variables": [
{
"name": "offset",
"nativeSrc": "4971:6:1",
"nodeType": "YulTypedName",
"src": "4971:6:1",
"type": ""
}
]
},
{
"nativeSrc": "4997:74:1",
"nodeType": "YulAssignment",
"src": "4997:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "5043:9:1",
"nodeType": "YulIdentifier",
"src": "5043:9:1"
},
{
"name": "offset",
"nativeSrc": "5054:6:1",
"nodeType": "YulIdentifier",
"src": "5054:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "5039:3:1",
"nodeType": "YulIdentifier",
"src": "5039:3:1"
},
"nativeSrc": "5039:22:1",
"nodeType": "YulFunctionCall",
"src": "5039:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "5063:7:1",
"nodeType": "YulIdentifier",
"src": "5063:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nativeSrc": "5007:31:1",
"nodeType": "YulIdentifier",
"src": "5007:31:1"
},
"nativeSrc": "5007:64:1",
"nodeType": "YulFunctionCall",
"src": "5007:64:1"
},
"variableNames": [
{
"name": "value3",
"nativeSrc": "4997:6:1",
"nodeType": "YulIdentifier",
"src": "4997:6:1"
}
]
}
]
},
{
"nativeSrc": "5091:130:1",
"nodeType": "YulBlock",
"src": "5091:130:1",
"statements": [
{
"nativeSrc": "5106:17:1",
"nodeType": "YulVariableDeclaration",
"src": "5106:17:1",
"value": {
"kind": "number",
"nativeSrc": "5120:3:1",
"nodeType": "YulLiteral",
"src": "5120:3:1",
"type": "",
"value": "128"
},
"variables": [
{
"name": "offset",
"nativeSrc": "5110:6:1",
"nodeType": "YulTypedName",
"src": "5110:6:1",
"type": ""
}
]
},
{
"nativeSrc": "5137:74:1",
"nodeType": "YulAssignment",
"src": "5137:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "5183:9:1",
"nodeType": "YulIdentifier",
"src": "5183:9:1"
},
{
"name": "offset",
"nativeSrc": "5194:6:1",
"nodeType": "YulIdentifier",
"src": "5194:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "5179:3:1",
"nodeType": "YulIdentifier",
"src": "5179:3:1"
},
"nativeSrc": "5179:22:1",
"nodeType": "YulFunctionCall",
"src": "5179:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "5203:7:1",
"nodeType": "YulIdentifier",
"src": "5203:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256_fromMemory",
"nativeSrc": "5147:31:1",
"nodeType": "YulIdentifier",
"src": "5147:31:1"
},
"nativeSrc": "5147:64:1",
"nodeType": "YulFunctionCall",
"src": "5147:64:1"
},
"variableNames": [
{
"name": "value4",
"nativeSrc": "5137:6:1",
"nodeType": "YulIdentifier",
"src": "5137:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_string_memory_ptrt_string_memory_ptrt_uint8t_addresst_uint256_fromMemory",
"nativeSrc": "3909:1319:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "4010:9:1",
"nodeType": "YulTypedName",
"src": "4010:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "4021:7:1",
"nodeType": "YulTypedName",
"src": "4021:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "4033:6:1",
"nodeType": "YulTypedName",
"src": "4033:6:1",
"type": ""
},
{
"name": "value1",
"nativeSrc": "4041:6:1",
"nodeType": "YulTypedName",
"src": "4041:6:1",
"type": ""
},
{
"name": "value2",
"nativeSrc": "4049:6:1",
"nodeType": "YulTypedName",
"src": "4049:6:1",
"type": ""
},
{
"name": "value3",
"nativeSrc": "4057:6:1",
"nodeType": "YulTypedName",
"src": "4057:6:1",
"type": ""
},
{
"name": "value4",
"nativeSrc": "4065:6:1",
"nodeType": "YulTypedName",
"src": "4065:6:1",
"type": ""
}
],
"src": "3909:1319:1"
},
{
"body": {
"nativeSrc": "5293:40:1",
"nodeType": "YulBlock",
"src": "5293:40:1",
"statements": [
{
"nativeSrc": "5304:22:1",
"nodeType": "YulAssignment",
"src": "5304:22:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "5320:5:1",
"nodeType": "YulIdentifier",
"src": "5320:5:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "5314:5:1",
"nodeType": "YulIdentifier",
"src": "5314:5:1"
},
"nativeSrc": "5314:12:1",
"nodeType": "YulFunctionCall",
"src": "5314:12:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "5304:6:1",
"nodeType": "YulIdentifier",
"src": "5304:6:1"
}
]
}
]
},
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "5234:99:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "5276:5:1",
"nodeType": "YulTypedName",
"src": "5276:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "5286:6:1",
"nodeType": "YulTypedName",
"src": "5286:6:1",
"type": ""
}
],
"src": "5234:99:1"
},
{
"body": {
"nativeSrc": "5367:152:1",
"nodeType": "YulBlock",
"src": "5367:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "5384:1:1",
"nodeType": "YulLiteral",
"src": "5384:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "5387:77:1",
"nodeType": "YulLiteral",
"src": "5387:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "5377:6:1",
"nodeType": "YulIdentifier",
"src": "5377:6:1"
},
"nativeSrc": "5377:88:1",
"nodeType": "YulFunctionCall",
"src": "5377:88:1"
},
"nativeSrc": "5377:88:1",
"nodeType": "YulExpressionStatement",
"src": "5377:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "5481:1:1",
"nodeType": "YulLiteral",
"src": "5481:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nativeSrc": "5484:4:1",
"nodeType": "YulLiteral",
"src": "5484:4:1",
"type": "",
"value": "0x22"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "5474:6:1",
"nodeType": "YulIdentifier",
"src": "5474:6:1"
},
"nativeSrc": "5474:15:1",
"nodeType": "YulFunctionCall",
"src": "5474:15:1"
},
"nativeSrc": "5474:15:1",
"nodeType": "YulExpressionStatement",
"src": "5474:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "5505:1:1",
"nodeType": "YulLiteral",
"src": "5505:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "5508:4:1",
"nodeType": "YulLiteral",
"src": "5508:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "5498:6:1",
"nodeType": "YulIdentifier",
"src": "5498:6:1"
},
"nativeSrc": "5498:15:1",
"nodeType": "YulFunctionCall",
"src": "5498:15:1"
},
"nativeSrc": "5498:15:1",
"nodeType": "YulExpressionStatement",
"src": "5498:15:1"
}
]
},
"name": "panic_error_0x22",
"nativeSrc": "5339:180:1",
"nodeType": "YulFunctionDefinition",
"src": "5339:180:1"
},
{
"body": {
"nativeSrc": "5576:269:1",
"nodeType": "YulBlock",
"src": "5576:269:1",
"statements": [
{
"nativeSrc": "5586:22:1",
"nodeType": "YulAssignment",
"src": "5586:22:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "5600:4:1",
"nodeType": "YulIdentifier",
"src": "5600:4:1"
},
{
"kind": "number",
"nativeSrc": "5606:1:1",
"nodeType": "YulLiteral",
"src": "5606:1:1",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "div",
"nativeSrc": "5596:3:1",
"nodeType": "YulIdentifier",
"src": "5596:3:1"
},
"nativeSrc": "5596:12:1",
"nodeType": "YulFunctionCall",
"src": "5596:12:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "5586:6:1",
"nodeType": "YulIdentifier",
"src": "5586:6:1"
}
]
},
{
"nativeSrc": "5617:38:1",
"nodeType": "YulVariableDeclaration",
"src": "5617:38:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "5647:4:1",
"nodeType": "YulIdentifier",
"src": "5647:4:1"
},
{
"kind": "number",
"nativeSrc": "5653:1:1",
"nodeType": "YulLiteral",
"src": "5653:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "5643:3:1",
"nodeType": "YulIdentifier",
"src": "5643:3:1"
},
"nativeSrc": "5643:12:1",
"nodeType": "YulFunctionCall",
"src": "5643:12:1"
},
"variables": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "5621:18:1",
"nodeType": "YulTypedName",
"src": "5621:18:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "5694:51:1",
"nodeType": "YulBlock",
"src": "5694:51:1",
"statements": [
{
"nativeSrc": "5708:27:1",
"nodeType": "YulAssignment",
"src": "5708:27:1",
"value": {
"arguments": [
{
"name": "length",
"nativeSrc": "5722:6:1",
"nodeType": "YulIdentifier",
"src": "5722:6:1"
},
{
"kind": "number",
"nativeSrc": "5730:4:1",
"nodeType": "YulLiteral",
"src": "5730:4:1",
"type": "",
"value": "0x7f"
}
],
"functionName": {
"name": "and",
"nativeSrc": "5718:3:1",
"nodeType": "YulIdentifier",
"src": "5718:3:1"
},
"nativeSrc": "5718:17:1",
"nodeType": "YulFunctionCall",
"src": "5718:17:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "5708:6:1",
"nodeType": "YulIdentifier",
"src": "5708:6:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "5674:18:1",
"nodeType": "YulIdentifier",
"src": "5674:18:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "5667:6:1",
"nodeType": "YulIdentifier",
"src": "5667:6:1"
},
"nativeSrc": "5667:26:1",
"nodeType": "YulFunctionCall",
"src": "5667:26:1"
},
"nativeSrc": "5664:81:1",
"nodeType": "YulIf",
"src": "5664:81:1"
},
{
"body": {
"nativeSrc": "5797:42:1",
"nodeType": "YulBlock",
"src": "5797:42:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x22",
"nativeSrc": "5811:16:1",
"nodeType": "YulIdentifier",
"src": "5811:16:1"
},
"nativeSrc": "5811:18:1",
"nodeType": "YulFunctionCall",
"src": "5811:18:1"
},
"nativeSrc": "5811:18:1",
"nodeType": "YulExpressionStatement",
"src": "5811:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "5761:18:1",
"nodeType": "YulIdentifier",
"src": "5761:18:1"
},
{
"arguments": [
{
"name": "length",
"nativeSrc": "5784:6:1",
"nodeType": "YulIdentifier",
"src": "5784:6:1"
},
{
"kind": "number",
"nativeSrc": "5792:2:1",
"nodeType": "YulLiteral",
"src": "5792:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "5781:2:1",
"nodeType": "YulIdentifier",
"src": "5781:2:1"
},
"nativeSrc": "5781:14:1",
"nodeType": "YulFunctionCall",
"src": "5781:14:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "5758:2:1",
"nodeType": "YulIdentifier",
"src": "5758:2:1"
},
"nativeSrc": "5758:38:1",
"nodeType": "YulFunctionCall",
"src": "5758:38:1"
},
"nativeSrc": "5755:84:1",
"nodeType": "YulIf",
"src": "5755:84:1"
}
]
},
"name": "extract_byte_array_length",
"nativeSrc": "5525:320:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "5560:4:1",
"nodeType": "YulTypedName",
"src": "5560:4:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "5569:6:1",
"nodeType": "YulTypedName",
"src": "5569:6:1",
"type": ""
}
],
"src": "5525:320:1"
},
{
"body": {
"nativeSrc": "5905:87:1",
"nodeType": "YulBlock",
"src": "5905:87:1",
"statements": [
{
"nativeSrc": "5915:11:1",
"nodeType": "YulAssignment",
"src": "5915:11:1",
"value": {
"name": "ptr",
"nativeSrc": "5923:3:1",
"nodeType": "YulIdentifier",
"src": "5923:3:1"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "5915:4:1",
"nodeType": "YulIdentifier",
"src": "5915:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "5943:1:1",
"nodeType": "YulLiteral",
"src": "5943:1:1",
"type": "",
"value": "0"
},
{
"name": "ptr",
"nativeSrc": "5946:3:1",
"nodeType": "YulIdentifier",
"src": "5946:3:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "5936:6:1",
"nodeType": "YulIdentifier",
"src": "5936:6:1"
},
"nativeSrc": "5936:14:1",
"nodeType": "YulFunctionCall",
"src": "5936:14:1"
},
"nativeSrc": "5936:14:1",
"nodeType": "YulExpressionStatement",
"src": "5936:14:1"
},
{
"nativeSrc": "5959:26:1",
"nodeType": "YulAssignment",
"src": "5959:26:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "5977:1:1",
"nodeType": "YulLiteral",
"src": "5977:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "5980:4:1",
"nodeType": "YulLiteral",
"src": "5980:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "keccak256",
"nativeSrc": "5967:9:1",
"nodeType": "YulIdentifier",
"src": "5967:9:1"
},
"nativeSrc": "5967:18:1",
"nodeType": "YulFunctionCall",
"src": "5967:18:1"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "5959:4:1",
"nodeType": "YulIdentifier",
"src": "5959:4:1"
}
]
}
]
},
"name": "array_dataslot_t_string_storage",
"nativeSrc": "5851:141:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "ptr",
"nativeSrc": "5892:3:1",
"nodeType": "YulTypedName",
"src": "5892:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "data",
"nativeSrc": "5900:4:1",
"nodeType": "YulTypedName",
"src": "5900:4:1",
"type": ""
}
],
"src": "5851:141:1"
},
{
"body": {
"nativeSrc": "6042:49:1",
"nodeType": "YulBlock",
"src": "6042:49:1",
"statements": [
{
"nativeSrc": "6052:33:1",
"nodeType": "YulAssignment",
"src": "6052:33:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "6070:5:1",
"nodeType": "YulIdentifier",
"src": "6070:5:1"
},
{
"kind": "number",
"nativeSrc": "6077:2:1",
"nodeType": "YulLiteral",
"src": "6077:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6066:3:1",
"nodeType": "YulIdentifier",
"src": "6066:3:1"
},
"nativeSrc": "6066:14:1",
"nodeType": "YulFunctionCall",
"src": "6066:14:1"
},
{
"kind": "number",
"nativeSrc": "6082:2:1",
"nodeType": "YulLiteral",
"src": "6082:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "div",
"nativeSrc": "6062:3:1",
"nodeType": "YulIdentifier",
"src": "6062:3:1"
},
"nativeSrc": "6062:23:1",
"nodeType": "YulFunctionCall",
"src": "6062:23:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "6052:6:1",
"nodeType": "YulIdentifier",
"src": "6052:6:1"
}
]
}
]
},
"name": "divide_by_32_ceil",
"nativeSrc": "5998:93:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "6025:5:1",
"nodeType": "YulTypedName",
"src": "6025:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "6035:6:1",
"nodeType": "YulTypedName",
"src": "6035:6:1",
"type": ""
}
],
"src": "5998:93:1"
},
{
"body": {
"nativeSrc": "6150:54:1",
"nodeType": "YulBlock",
"src": "6150:54:1",
"statements": [
{
"nativeSrc": "6160:37:1",
"nodeType": "YulAssignment",
"src": "6160:37:1",
"value": {
"arguments": [
{
"name": "bits",
"nativeSrc": "6185:4:1",
"nodeType": "YulIdentifier",
"src": "6185:4:1"
},
{
"name": "value",
"nativeSrc": "6191:5:1",
"nodeType": "YulIdentifier",
"src": "6191:5:1"
}
],
"functionName": {
"name": "shl",
"nativeSrc": "6181:3:1",
"nodeType": "YulIdentifier",
"src": "6181:3:1"
},
"nativeSrc": "6181:16:1",
"nodeType": "YulFunctionCall",
"src": "6181:16:1"
},
"variableNames": [
{
"name": "newValue",
"nativeSrc": "6160:8:1",
"nodeType": "YulIdentifier",
"src": "6160:8:1"
}
]
}
]
},
"name": "shift_left_dynamic",
"nativeSrc": "6097:107:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "bits",
"nativeSrc": "6125:4:1",
"nodeType": "YulTypedName",
"src": "6125:4:1",
"type": ""
},
{
"name": "value",
"nativeSrc": "6131:5:1",
"nodeType": "YulTypedName",
"src": "6131:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nativeSrc": "6141:8:1",
"nodeType": "YulTypedName",
"src": "6141:8:1",
"type": ""
}
],
"src": "6097:107:1"
},
{
"body": {
"nativeSrc": "6286:317:1",
"nodeType": "YulBlock",
"src": "6286:317:1",
"statements": [
{
"nativeSrc": "6296:35:1",
"nodeType": "YulVariableDeclaration",
"src": "6296:35:1",
"value": {
"arguments": [
{
"name": "shiftBytes",
"nativeSrc": "6317:10:1",
"nodeType": "YulIdentifier",
"src": "6317:10:1"
},
{
"kind": "number",
"nativeSrc": "6329:1:1",
"nodeType": "YulLiteral",
"src": "6329:1:1",
"type": "",
"value": "8"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "6313:3:1",
"nodeType": "YulIdentifier",
"src": "6313:3:1"
},
"nativeSrc": "6313:18:1",
"nodeType": "YulFunctionCall",
"src": "6313:18:1"
},
"variables": [
{
"name": "shiftBits",
"nativeSrc": "6300:9:1",
"nodeType": "YulTypedName",
"src": "6300:9:1",
"type": ""
}
]
},
{
"nativeSrc": "6340:109:1",
"nodeType": "YulVariableDeclaration",
"src": "6340:109:1",
"value": {
"arguments": [
{
"name": "shiftBits",
"nativeSrc": "6371:9:1",
"nodeType": "YulIdentifier",
"src": "6371:9:1"
},
{
"kind": "number",
"nativeSrc": "6382:66:1",
"nodeType": "YulLiteral",
"src": "6382:66:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nativeSrc": "6352:18:1",
"nodeType": "YulIdentifier",
"src": "6352:18:1"
},
"nativeSrc": "6352:97:1",
"nodeType": "YulFunctionCall",
"src": "6352:97:1"
},
"variables": [
{
"name": "mask",
"nativeSrc": "6344:4:1",
"nodeType": "YulTypedName",
"src": "6344:4:1",
"type": ""
}
]
},
{
"nativeSrc": "6458:51:1",
"nodeType": "YulAssignment",
"src": "6458:51:1",
"value": {
"arguments": [
{
"name": "shiftBits",
"nativeSrc": "6489:9:1",
"nodeType": "YulIdentifier",
"src": "6489:9:1"
},
{
"name": "toInsert",
"nativeSrc": "6500:8:1",
"nodeType": "YulIdentifier",
"src": "6500:8:1"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nativeSrc": "6470:18:1",
"nodeType": "YulIdentifier",
"src": "6470:18:1"
},
"nativeSrc": "6470:39:1",
"nodeType": "YulFunctionCall",
"src": "6470:39:1"
},
"variableNames": [
{
"name": "toInsert",
"nativeSrc": "6458:8:1",
"nodeType": "YulIdentifier",
"src": "6458:8:1"
}
]
},
{
"nativeSrc": "6518:30:1",
"nodeType": "YulAssignment",
"src": "6518:30:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "6531:5:1",
"nodeType": "YulIdentifier",
"src": "6531:5:1"
},
{
"arguments": [
{
"name": "mask",
"nativeSrc": "6542:4:1",
"nodeType": "YulIdentifier",
"src": "6542:4:1"
}
],
"functionName": {
"name": "not",
"nativeSrc": "6538:3:1",
"nodeType": "YulIdentifier",
"src": "6538:3:1"
},
"nativeSrc": "6538:9:1",
"nodeType": "YulFunctionCall",
"src": "6538:9:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "6527:3:1",
"nodeType": "YulIdentifier",
"src": "6527:3:1"
},
"nativeSrc": "6527:21:1",
"nodeType": "YulFunctionCall",
"src": "6527:21:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "6518:5:1",
"nodeType": "YulIdentifier",
"src": "6518:5:1"
}
]
},
{
"nativeSrc": "6557:40:1",
"nodeType": "YulAssignment",
"src": "6557:40:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "6570:5:1",
"nodeType": "YulIdentifier",
"src": "6570:5:1"
},
{
"arguments": [
{
"name": "toInsert",
"nativeSrc": "6581:8:1",
"nodeType": "YulIdentifier",
"src": "6581:8:1"
},
{
"name": "mask",
"nativeSrc": "6591:4:1",
"nodeType": "YulIdentifier",
"src": "6591:4:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "6577:3:1",
"nodeType": "YulIdentifier",
"src": "6577:3:1"
},
"nativeSrc": "6577:19:1",
"nodeType": "YulFunctionCall",
"src": "6577:19:1"
}
],
"functionName": {
"name": "or",
"nativeSrc": "6567:2:1",
"nodeType": "YulIdentifier",
"src": "6567:2:1"
},
"nativeSrc": "6567:30:1",
"nodeType": "YulFunctionCall",
"src": "6567:30:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "6557:6:1",
"nodeType": "YulIdentifier",
"src": "6557:6:1"
}
]
}
]
},
"name": "update_byte_slice_dynamic32",
"nativeSrc": "6210:393:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "6247:5:1",
"nodeType": "YulTypedName",
"src": "6247:5:1",
"type": ""
},
{
"name": "shiftBytes",
"nativeSrc": "6254:10:1",
"nodeType": "YulTypedName",
"src": "6254:10:1",
"type": ""
},
{
"name": "toInsert",
"nativeSrc": "6266:8:1",
"nodeType": "YulTypedName",
"src": "6266:8:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "6279:6:1",
"nodeType": "YulTypedName",
"src": "6279:6:1",
"type": ""
}
],
"src": "6210:393:1"
},
{
"body": {
"nativeSrc": "6641:28:1",
"nodeType": "YulBlock",
"src": "6641:28:1",
"statements": [
{
"nativeSrc": "6651:12:1",
"nodeType": "YulAssignment",
"src": "6651:12:1",
"value": {
"name": "value",
"nativeSrc": "6658:5:1",
"nodeType": "YulIdentifier",
"src": "6658:5:1"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "6651:3:1",
"nodeType": "YulIdentifier",
"src": "6651:3:1"
}
]
}
]
},
"name": "identity",
"nativeSrc": "6609:60:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "6627:5:1",
"nodeType": "YulTypedName",
"src": "6627:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nativeSrc": "6637:3:1",
"nodeType": "YulTypedName",
"src": "6637:3:1",
"type": ""
}
],
"src": "6609:60:1"
},
{
"body": {
"nativeSrc": "6735:82:1",
"nodeType": "YulBlock",
"src": "6735:82:1",
"statements": [
{
"nativeSrc": "6745:66:1",
"nodeType": "YulAssignment",
"src": "6745:66:1",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "6803:5:1",
"nodeType": "YulIdentifier",
"src": "6803:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "6785:17:1",
"nodeType": "YulIdentifier",
"src": "6785:17:1"
},
"nativeSrc": "6785:24:1",
"nodeType": "YulFunctionCall",
"src": "6785:24:1"
}
],
"functionName": {
"name": "identity",
"nativeSrc": "6776:8:1",
"nodeType": "YulIdentifier",
"src": "6776:8:1"
},
"nativeSrc": "6776:34:1",
"nodeType": "YulFunctionCall",
"src": "6776:34:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "6758:17:1",
"nodeType": "YulIdentifier",
"src": "6758:17:1"
},
"nativeSrc": "6758:53:1",
"nodeType": "YulFunctionCall",
"src": "6758:53:1"
},
"variableNames": [
{
"name": "converted",
"nativeSrc": "6745:9:1",
"nodeType": "YulIdentifier",
"src": "6745:9:1"
}
]
}
]
},
"name": "convert_t_uint256_to_t_uint256",
"nativeSrc": "6675:142:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "6715:5:1",
"nodeType": "YulTypedName",
"src": "6715:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "converted",
"nativeSrc": "6725:9:1",
"nodeType": "YulTypedName",
"src": "6725:9:1",
"type": ""
}
],
"src": "6675:142:1"
},
{
"body": {
"nativeSrc": "6870:28:1",
"nodeType": "YulBlock",
"src": "6870:28:1",
"statements": [
{
"nativeSrc": "6880:12:1",
"nodeType": "YulAssignment",
"src": "6880:12:1",
"value": {
"name": "value",
"nativeSrc": "6887:5:1",
"nodeType": "YulIdentifier",
"src": "6887:5:1"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "6880:3:1",
"nodeType": "YulIdentifier",
"src": "6880:3:1"
}
]
}
]
},
"name": "prepare_store_t_uint256",
"nativeSrc": "6823:75:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "6856:5:1",
"nodeType": "YulTypedName",
"src": "6856:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nativeSrc": "6866:3:1",
"nodeType": "YulTypedName",
"src": "6866:3:1",
"type": ""
}
],
"src": "6823:75:1"
},
{
"body": {
"nativeSrc": "6980:193:1",
"nodeType": "YulBlock",
"src": "6980:193:1",
"statements": [
{
"nativeSrc": "6990:63:1",
"nodeType": "YulVariableDeclaration",
"src": "6990:63:1",
"value": {
"arguments": [
{
"name": "value_0",
"nativeSrc": "7045:7:1",
"nodeType": "YulIdentifier",
"src": "7045:7:1"
}
],
"functionName": {
"name": "convert_t_uint256_to_t_uint256",
"nativeSrc": "7014:30:1",
"nodeType": "YulIdentifier",
"src": "7014:30:1"
},
"nativeSrc": "7014:39:1",
"nodeType": "YulFunctionCall",
"src": "7014:39:1"
},
"variables": [
{
"name": "convertedValue_0",
"nativeSrc": "6994:16:1",
"nodeType": "YulTypedName",
"src": "6994:16:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "7069:4:1",
"nodeType": "YulIdentifier",
"src": "7069:4:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "slot",
"nativeSrc": "7109:4:1",
"nodeType": "YulIdentifier",
"src": "7109:4:1"
}
],
"functionName": {
"name": "sload",
"nativeSrc": "7103:5:1",
"nodeType": "YulIdentifier",
"src": "7103:5:1"
},
"nativeSrc": "7103:11:1",
"nodeType": "YulFunctionCall",
"src": "7103:11:1"
},
{
"name": "offset",
"nativeSrc": "7116:6:1",
"nodeType": "YulIdentifier",
"src": "7116:6:1"
},
{
"arguments": [
{
"name": "convertedValue_0",
"nativeSrc": "7148:16:1",
"nodeType": "YulIdentifier",
"src": "7148:16:1"
}
],
"functionName": {
"name": "prepare_store_t_uint256",
"nativeSrc": "7124:23:1",
"nodeType": "YulIdentifier",
"src": "7124:23:1"
},
"nativeSrc": "7124:41:1",
"nodeType": "YulFunctionCall",
"src": "7124:41:1"
}
],
"functionName": {
"name": "update_byte_slice_dynamic32",
"nativeSrc": "7075:27:1",
"nodeType": "YulIdentifier",
"src": "7075:27:1"
},
"nativeSrc": "7075:91:1",
"nodeType": "YulFunctionCall",
"src": "7075:91:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "7062:6:1",
"nodeType": "YulIdentifier",
"src": "7062:6:1"
},
"nativeSrc": "7062:105:1",
"nodeType": "YulFunctionCall",
"src": "7062:105:1"
},
"nativeSrc": "7062:105:1",
"nodeType": "YulExpressionStatement",
"src": "7062:105:1"
}
]
},
"name": "update_storage_value_t_uint256_to_t_uint256",
"nativeSrc": "6904:269:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "6957:4:1",
"nodeType": "YulTypedName",
"src": "6957:4:1",
"type": ""
},
{
"name": "offset",
"nativeSrc": "6963:6:1",
"nodeType": "YulTypedName",
"src": "6963:6:1",
"type": ""
},
{
"name": "value_0",
"nativeSrc": "6971:7:1",
"nodeType": "YulTypedName",
"src": "6971:7:1",
"type": ""
}
],
"src": "6904:269:1"
},
{
"body": {
"nativeSrc": "7228:24:1",
"nodeType": "YulBlock",
"src": "7228:24:1",
"statements": [
{
"nativeSrc": "7238:8:1",
"nodeType": "YulAssignment",
"src": "7238:8:1",
"value": {
"kind": "number",
"nativeSrc": "7245:1:1",
"nodeType": "YulLiteral",
"src": "7245:1:1",
"type": "",
"value": "0"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "7238:3:1",
"nodeType": "YulIdentifier",
"src": "7238:3:1"
}
]
}
]
},
"name": "zero_value_for_split_t_uint256",
"nativeSrc": "7179:73:1",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "ret",
"nativeSrc": "7224:3:1",
"nodeType": "YulTypedName",
"src": "7224:3:1",
"type": ""
}
],
"src": "7179:73:1"
},
{
"body": {
"nativeSrc": "7311:136:1",
"nodeType": "YulBlock",
"src": "7311:136:1",
"statements": [
{
"nativeSrc": "7321:46:1",
"nodeType": "YulVariableDeclaration",
"src": "7321:46:1",
"value": {
"arguments": [],
"functionName": {
"name": "zero_value_for_split_t_uint256",
"nativeSrc": "7335:30:1",
"nodeType": "YulIdentifier",
"src": "7335:30:1"
},
"nativeSrc": "7335:32:1",
"nodeType": "YulFunctionCall",
"src": "7335:32:1"
},
"variables": [
{
"name": "zero_0",
"nativeSrc": "7325:6:1",
"nodeType": "YulTypedName",
"src": "7325:6:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "7420:4:1",
"nodeType": "YulIdentifier",
"src": "7420:4:1"
},
{
"name": "offset",
"nativeSrc": "7426:6:1",
"nodeType": "YulIdentifier",
"src": "7426:6:1"
},
{
"name": "zero_0",
"nativeSrc": "7434:6:1",
"nodeType": "YulIdentifier",
"src": "7434:6:1"
}
],
"functionName": {
"name": "update_storage_value_t_uint256_to_t_uint256",
"nativeSrc": "7376:43:1",
"nodeType": "YulIdentifier",
"src": "7376:43:1"
},
"nativeSrc": "7376:65:1",
"nodeType": "YulFunctionCall",
"src": "7376:65:1"
},
"nativeSrc": "7376:65:1",
"nodeType": "YulExpressionStatement",
"src": "7376:65:1"
}
]
},
"name": "storage_set_to_zero_t_uint256",
"nativeSrc": "7258:189:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "7297:4:1",
"nodeType": "YulTypedName",
"src": "7297:4:1",
"type": ""
},
{
"name": "offset",
"nativeSrc": "7303:6:1",
"nodeType": "YulTypedName",
"src": "7303:6:1",
"type": ""
}
],
"src": "7258:189:1"
},
{
"body": {
"nativeSrc": "7503:136:1",
"nodeType": "YulBlock",
"src": "7503:136:1",
"statements": [
{
"body": {
"nativeSrc": "7570:63:1",
"nodeType": "YulBlock",
"src": "7570:63:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "start",
"nativeSrc": "7614:5:1",
"nodeType": "YulIdentifier",
"src": "7614:5:1"
},
{
"kind": "number",
"nativeSrc": "7621:1:1",
"nodeType": "YulLiteral",
"src": "7621:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "storage_set_to_zero_t_uint256",
"nativeSrc": "7584:29:1",
"nodeType": "YulIdentifier",
"src": "7584:29:1"
},
"nativeSrc": "7584:39:1",
"nodeType": "YulFunctionCall",
"src": "7584:39:1"
},
"nativeSrc": "7584:39:1",
"nodeType": "YulExpressionStatement",
"src": "7584:39:1"
}
]
},
"condition": {
"arguments": [
{
"name": "start",
"nativeSrc": "7523:5:1",
"nodeType": "YulIdentifier",
"src": "7523:5:1"
},
{
"name": "end",
"nativeSrc": "7530:3:1",
"nodeType": "YulIdentifier",
"src": "7530:3:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "7520:2:1",
"nodeType": "YulIdentifier",
"src": "7520:2:1"
},
"nativeSrc": "7520:14:1",
"nodeType": "YulFunctionCall",
"src": "7520:14:1"
},
"nativeSrc": "7513:120:1",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "7535:26:1",
"nodeType": "YulBlock",
"src": "7535:26:1",
"statements": [
{
"nativeSrc": "7537:22:1",
"nodeType": "YulAssignment",
"src": "7537:22:1",
"value": {
"arguments": [
{
"name": "start",
"nativeSrc": "7550:5:1",
"nodeType": "YulIdentifier",
"src": "7550:5:1"
},
{
"kind": "number",
"nativeSrc": "7557:1:1",
"nodeType": "YulLiteral",
"src": "7557:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "7546:3:1",
"nodeType": "YulIdentifier",
"src": "7546:3:1"
},
"nativeSrc": "7546:13:1",
"nodeType": "YulFunctionCall",
"src": "7546:13:1"
},
"variableNames": [
{
"name": "start",
"nativeSrc": "7537:5:1",
"nodeType": "YulIdentifier",
"src": "7537:5:1"
}
]
}
]
},
"pre": {
"nativeSrc": "7517:2:1",
"nodeType": "YulBlock",
"src": "7517:2:1",
"statements": []
},
"src": "7513:120:1"
}
]
},
"name": "clear_storage_range_t_bytes1",
"nativeSrc": "7453:186:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "start",
"nativeSrc": "7491:5:1",
"nodeType": "YulTypedName",
"src": "7491:5:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "7498:3:1",
"nodeType": "YulTypedName",
"src": "7498:3:1",
"type": ""
}
],
"src": "7453:186:1"
},
{
"body": {
"nativeSrc": "7724:464:1",
"nodeType": "YulBlock",
"src": "7724:464:1",
"statements": [
{
"body": {
"nativeSrc": "7750:431:1",
"nodeType": "YulBlock",
"src": "7750:431:1",
"statements": [
{
"nativeSrc": "7764:54:1",
"nodeType": "YulVariableDeclaration",
"src": "7764:54:1",
"value": {
"arguments": [
{
"name": "array",
"nativeSrc": "7812:5:1",
"nodeType": "YulIdentifier",
"src": "7812:5:1"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nativeSrc": "7780:31:1",
"nodeType": "YulIdentifier",
"src": "7780:31:1"
},
"nativeSrc": "7780:38:1",
"nodeType": "YulFunctionCall",
"src": "7780:38:1"
},
"variables": [
{
"name": "dataArea",
"nativeSrc": "7768:8:1",
"nodeType": "YulTypedName",
"src": "7768:8:1",
"type": ""
}
]
},
{
"nativeSrc": "7831:63:1",
"nodeType": "YulVariableDeclaration",
"src": "7831:63:1",
"value": {
"arguments": [
{
"name": "dataArea",
"nativeSrc": "7854:8:1",
"nodeType": "YulIdentifier",
"src": "7854:8:1"
},
{
"arguments": [
{
"name": "startIndex",
"nativeSrc": "7882:10:1",
"nodeType": "YulIdentifier",
"src": "7882:10:1"
}
],
"functionName": {
"name": "divide_by_32_ceil",
"nativeSrc": "7864:17:1",
"nodeType": "YulIdentifier",
"src": "7864:17:1"
},
"nativeSrc": "7864:29:1",
"nodeType": "YulFunctionCall",
"src": "7864:29:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "7850:3:1",
"nodeType": "YulIdentifier",
"src": "7850:3:1"
},
"nativeSrc": "7850:44:1",
"nodeType": "YulFunctionCall",
"src": "7850:44:1"
},
"variables": [
{
"name": "deleteStart",
"nativeSrc": "7835:11:1",
"nodeType": "YulTypedName",
"src": "7835:11:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "8051:27:1",
"nodeType": "YulBlock",
"src": "8051:27:1",
"statements": [
{
"nativeSrc": "8053:23:1",
"nodeType": "YulAssignment",
"src": "8053:23:1",
"value": {
"name": "dataArea",
"nativeSrc": "8068:8:1",
"nodeType": "YulIdentifier",
"src": "8068:8:1"
},
"variableNames": [
{
"name": "deleteStart",
"nativeSrc": "8053:11:1",
"nodeType": "YulIdentifier",
"src": "8053:11:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "startIndex",
"nativeSrc": "8035:10:1",
"nodeType": "YulIdentifier",
"src": "8035:10:1"
},
{
"kind": "number",
"nativeSrc": "8047:2:1",
"nodeType": "YulLiteral",
"src": "8047:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "8032:2:1",
"nodeType": "YulIdentifier",
"src": "8032:2:1"
},
"nativeSrc": "8032:18:1",
"nodeType": "YulFunctionCall",
"src": "8032:18:1"
},
"nativeSrc": "8029:49:1",
"nodeType": "YulIf",
"src": "8029:49:1"
},
{
"expression": {
"arguments": [
{
"name": "deleteStart",
"nativeSrc": "8120:11:1",
"nodeType": "YulIdentifier",
"src": "8120:11:1"
},
{
"arguments": [
{
"name": "dataArea",
"nativeSrc": "8137:8:1",
"nodeType": "YulIdentifier",
"src": "8137:8:1"
},
{
"arguments": [
{
"name": "len",
"nativeSrc": "8165:3:1",
"nodeType": "YulIdentifier",
"src": "8165:3:1"
}
],
"functionName": {
"name": "divide_by_32_ceil",
"nativeSrc": "8147:17:1",
"nodeType": "YulIdentifier",
"src": "8147:17:1"
},
"nativeSrc": "8147:22:1",
"nodeType": "YulFunctionCall",
"src": "8147:22:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "8133:3:1",
"nodeType": "YulIdentifier",
"src": "8133:3:1"
},
"nativeSrc": "8133:37:1",
"nodeType": "YulFunctionCall",
"src": "8133:37:1"
}
],
"functionName": {
"name": "clear_storage_range_t_bytes1",
"nativeSrc": "8091:28:1",
"nodeType": "YulIdentifier",
"src": "8091:28:1"
},
"nativeSrc": "8091:80:1",
"nodeType": "YulFunctionCall",
"src": "8091:80:1"
},
"nativeSrc": "8091:80:1",
"nodeType": "YulExpressionStatement",
"src": "8091:80:1"
}
]
},
"condition": {
"arguments": [
{
"name": "len",
"nativeSrc": "7741:3:1",
"nodeType": "YulIdentifier",
"src": "7741:3:1"
},
{
"kind": "number",
"nativeSrc": "7746:2:1",
"nodeType": "YulLiteral",
"src": "7746:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "7738:2:1",
"nodeType": "YulIdentifier",
"src": "7738:2:1"
},
"nativeSrc": "7738:11:1",
"nodeType": "YulFunctionCall",
"src": "7738:11:1"
},
"nativeSrc": "7735:446:1",
"nodeType": "YulIf",
"src": "7735:446:1"
}
]
},
"name": "clean_up_bytearray_end_slots_t_string_storage",
"nativeSrc": "7645:543:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "array",
"nativeSrc": "7700:5:1",
"nodeType": "YulTypedName",
"src": "7700:5:1",
"type": ""
},
{
"name": "len",
"nativeSrc": "7707:3:1",
"nodeType": "YulTypedName",
"src": "7707:3:1",
"type": ""
},
{
"name": "startIndex",
"nativeSrc": "7712:10:1",
"nodeType": "YulTypedName",
"src": "7712:10:1",
"type": ""
}
],
"src": "7645:543:1"
},
{
"body": {
"nativeSrc": "8257:54:1",
"nodeType": "YulBlock",
"src": "8257:54:1",
"statements": [
{
"nativeSrc": "8267:37:1",
"nodeType": "YulAssignment",
"src": "8267:37:1",
"value": {
"arguments": [
{
"name": "bits",
"nativeSrc": "8292:4:1",
"nodeType": "YulIdentifier",
"src": "8292:4:1"
},
{
"name": "value",
"nativeSrc": "8298:5:1",
"nodeType": "YulIdentifier",
"src": "8298:5:1"
}
],
"functionName": {
"name": "shr",
"nativeSrc": "8288:3:1",
"nodeType": "YulIdentifier",
"src": "8288:3:1"
},
"nativeSrc": "8288:16:1",
"nodeType": "YulFunctionCall",
"src": "8288:16:1"
},
"variableNames": [
{
"name": "newValue",
"nativeSrc": "8267:8:1",
"nodeType": "YulIdentifier",
"src": "8267:8:1"
}
]
}
]
},
"name": "shift_right_unsigned_dynamic",
"nativeSrc": "8194:117:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "bits",
"nativeSrc": "8232:4:1",
"nodeType": "YulTypedName",
"src": "8232:4:1",
"type": ""
},
{
"name": "value",
"nativeSrc": "8238:5:1",
"nodeType": "YulTypedName",
"src": "8238:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nativeSrc": "8248:8:1",
"nodeType": "YulTypedName",
"src": "8248:8:1",
"type": ""
}
],
"src": "8194:117:1"
},
{
"body": {
"nativeSrc": "8368:118:1",
"nodeType": "YulBlock",
"src": "8368:118:1",
"statements": [
{
"nativeSrc": "8378:68:1",
"nodeType": "YulVariableDeclaration",
"src": "8378:68:1",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nativeSrc": "8427:1:1",
"nodeType": "YulLiteral",
"src": "8427:1:1",
"type": "",
"value": "8"
},
{
"name": "bytes",
"nativeSrc": "8430:5:1",
"nodeType": "YulIdentifier",
"src": "8430:5:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "8423:3:1",
"nodeType": "YulIdentifier",
"src": "8423:3:1"
},
"nativeSrc": "8423:13:1",
"nodeType": "YulFunctionCall",
"src": "8423:13:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "8442:1:1",
"nodeType": "YulLiteral",
"src": "8442:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nativeSrc": "8438:3:1",
"nodeType": "YulIdentifier",
"src": "8438:3:1"
},
"nativeSrc": "8438:6:1",
"nodeType": "YulFunctionCall",
"src": "8438:6:1"
}
],
"functionName": {
"name": "shift_right_unsigned_dynamic",
"nativeSrc": "8394:28:1",
"nodeType": "YulIdentifier",
"src": "8394:28:1"
},
"nativeSrc": "8394:51:1",
"nodeType": "YulFunctionCall",
"src": "8394:51:1"
}
],
"functionName": {
"name": "not",
"nativeSrc": "8390:3:1",
"nodeType": "YulIdentifier",
"src": "8390:3:1"
},
"nativeSrc": "8390:56:1",
"nodeType": "YulFunctionCall",
"src": "8390:56:1"
},
"variables": [
{
"name": "mask",
"nativeSrc": "8382:4:1",
"nodeType": "YulTypedName",
"src": "8382:4:1",
"type": ""
}
]
},
{
"nativeSrc": "8455:25:1",
"nodeType": "YulAssignment",
"src": "8455:25:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "8469:4:1",
"nodeType": "YulIdentifier",
"src": "8469:4:1"
},
{
"name": "mask",
"nativeSrc": "8475:4:1",
"nodeType": "YulIdentifier",
"src": "8475:4:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "8465:3:1",
"nodeType": "YulIdentifier",
"src": "8465:3:1"
},
"nativeSrc": "8465:15:1",
"nodeType": "YulFunctionCall",
"src": "8465:15:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "8455:6:1",
"nodeType": "YulIdentifier",
"src": "8455:6:1"
}
]
}
]
},
"name": "mask_bytes_dynamic",
"nativeSrc": "8317:169:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "8345:4:1",
"nodeType": "YulTypedName",
"src": "8345:4:1",
"type": ""
},
{
"name": "bytes",
"nativeSrc": "8351:5:1",
"nodeType": "YulTypedName",
"src": "8351:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "8361:6:1",
"nodeType": "YulTypedName",
"src": "8361:6:1",
"type": ""
}
],
"src": "8317:169:1"
},
{
"body": {
"nativeSrc": "8572:214:1",
"nodeType": "YulBlock",
"src": "8572:214:1",
"statements": [
{
"nativeSrc": "8705:37:1",
"nodeType": "YulAssignment",
"src": "8705:37:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "8732:4:1",
"nodeType": "YulIdentifier",
"src": "8732:4:1"
},
{
"name": "len",
"nativeSrc": "8738:3:1",
"nodeType": "YulIdentifier",
"src": "8738:3:1"
}
],
"functionName": {
"name": "mask_bytes_dynamic",
"nativeSrc": "8713:18:1",
"nodeType": "YulIdentifier",
"src": "8713:18:1"
},
"nativeSrc": "8713:29:1",
"nodeType": "YulFunctionCall",
"src": "8713:29:1"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "8705:4:1",
"nodeType": "YulIdentifier",
"src": "8705:4:1"
}
]
},
{
"nativeSrc": "8751:29:1",
"nodeType": "YulAssignment",
"src": "8751:29:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "8762:4:1",
"nodeType": "YulIdentifier",
"src": "8762:4:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "8772:1:1",
"nodeType": "YulLiteral",
"src": "8772:1:1",
"type": "",
"value": "2"
},
{
"name": "len",
"nativeSrc": "8775:3:1",
"nodeType": "YulIdentifier",
"src": "8775:3:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "8768:3:1",
"nodeType": "YulIdentifier",
"src": "8768:3:1"
},
"nativeSrc": "8768:11:1",
"nodeType": "YulFunctionCall",
"src": "8768:11:1"
}
],
"functionName": {
"name": "or",
"nativeSrc": "8759:2:1",
"nodeType": "YulIdentifier",
"src": "8759:2:1"
},
"nativeSrc": "8759:21:1",
"nodeType": "YulFunctionCall",
"src": "8759:21:1"
},
"variableNames": [
{
"name": "used",
"nativeSrc": "8751:4:1",
"nodeType": "YulIdentifier",
"src": "8751:4:1"
}
]
}
]
},
"name": "extract_used_part_and_set_length_of_short_byte_array",
"nativeSrc": "8491:295:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "8553:4:1",
"nodeType": "YulTypedName",
"src": "8553:4:1",
"type": ""
},
{
"name": "len",
"nativeSrc": "8559:3:1",
"nodeType": "YulTypedName",
"src": "8559:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "used",
"nativeSrc": "8567:4:1",
"nodeType": "YulTypedName",
"src": "8567:4:1",
"type": ""
}
],
"src": "8491:295:1"
},
{
"body": {
"nativeSrc": "8883:1303:1",
"nodeType": "YulBlock",
"src": "8883:1303:1",
"statements": [
{
"nativeSrc": "8894:51:1",
"nodeType": "YulVariableDeclaration",
"src": "8894:51:1",
"value": {
"arguments": [
{
"name": "src",
"nativeSrc": "8941:3:1",
"nodeType": "YulIdentifier",
"src": "8941:3:1"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "8908:32:1",
"nodeType": "YulIdentifier",
"src": "8908:32:1"
},
"nativeSrc": "8908:37:1",
"nodeType": "YulFunctionCall",
"src": "8908:37:1"
},
"variables": [
{
"name": "newLen",
"nativeSrc": "8898:6:1",
"nodeType": "YulTypedName",
"src": "8898:6:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "9030:22:1",
"nodeType": "YulBlock",
"src": "9030:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nativeSrc": "9032:16:1",
"nodeType": "YulIdentifier",
"src": "9032:16:1"
},
"nativeSrc": "9032:18:1",
"nodeType": "YulFunctionCall",
"src": "9032:18:1"
},
"nativeSrc": "9032:18:1",
"nodeType": "YulExpressionStatement",
"src": "9032:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "9002:6:1",
"nodeType": "YulIdentifier",
"src": "9002:6:1"
},
{
"kind": "number",
"nativeSrc": "9010:18:1",
"nodeType": "YulLiteral",
"src": "9010:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "8999:2:1",
"nodeType": "YulIdentifier",
"src": "8999:2:1"
},
"nativeSrc": "8999:30:1",
"nodeType": "YulFunctionCall",
"src": "8999:30:1"
},
"nativeSrc": "8996:56:1",
"nodeType": "YulIf",
"src": "8996:56:1"
},
{
"nativeSrc": "9062:52:1",
"nodeType": "YulVariableDeclaration",
"src": "9062:52:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "slot",
"nativeSrc": "9108:4:1",
"nodeType": "YulIdentifier",
"src": "9108:4:1"
}
],
"functionName": {
"name": "sload",
"nativeSrc": "9102:5:1",
"nodeType": "YulIdentifier",
"src": "9102:5:1"
},
"nativeSrc": "9102:11:1",
"nodeType": "YulFunctionCall",
"src": "9102:11:1"
}
],
"functionName": {
"name": "extract_byte_array_length",
"nativeSrc": "9076:25:1",
"nodeType": "YulIdentifier",
"src": "9076:25:1"
},
"nativeSrc": "9076:38:1",
"nodeType": "YulFunctionCall",
"src": "9076:38:1"
},
"variables": [
{
"name": "oldLen",
"nativeSrc": "9066:6:1",
"nodeType": "YulTypedName",
"src": "9066:6:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "9207:4:1",
"nodeType": "YulIdentifier",
"src": "9207:4:1"
},
{
"name": "oldLen",
"nativeSrc": "9213:6:1",
"nodeType": "YulIdentifier",
"src": "9213:6:1"
},
{
"name": "newLen",
"nativeSrc": "9221:6:1",
"nodeType": "YulIdentifier",
"src": "9221:6:1"
}
],
"functionName": {
"name": "clean_up_bytearray_end_slots_t_string_storage",
"nativeSrc": "9161:45:1",
"nodeType": "YulIdentifier",
"src": "9161:45:1"
},
"nativeSrc": "9161:67:1",
"nodeType": "YulFunctionCall",
"src": "9161:67:1"
},
"nativeSrc": "9161:67:1",
"nodeType": "YulExpressionStatement",
"src": "9161:67:1"
},
{
"nativeSrc": "9238:18:1",
"nodeType": "YulVariableDeclaration",
"src": "9238:18:1",
"value": {
"kind": "number",
"nativeSrc": "9255:1:1",
"nodeType": "YulLiteral",
"src": "9255:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "srcOffset",
"nativeSrc": "9242:9:1",
"nodeType": "YulTypedName",
"src": "9242:9:1",
"type": ""
}
]
},
{
"nativeSrc": "9266:17:1",
"nodeType": "YulAssignment",
"src": "9266:17:1",
"value": {
"kind": "number",
"nativeSrc": "9279:4:1",
"nodeType": "YulLiteral",
"src": "9279:4:1",
"type": "",
"value": "0x20"
},
"variableNames": [
{
"name": "srcOffset",
"nativeSrc": "9266:9:1",
"nodeType": "YulIdentifier",
"src": "9266:9:1"
}
]
},
{
"cases": [
{
"body": {
"nativeSrc": "9330:611:1",
"nodeType": "YulBlock",
"src": "9330:611:1",
"statements": [
{
"nativeSrc": "9344:37:1",
"nodeType": "YulVariableDeclaration",
"src": "9344:37:1",
"value": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "9363:6:1",
"nodeType": "YulIdentifier",
"src": "9363:6:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "9375:4:1",
"nodeType": "YulLiteral",
"src": "9375:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "not",
"nativeSrc": "9371:3:1",
"nodeType": "YulIdentifier",
"src": "9371:3:1"
},
"nativeSrc": "9371:9:1",
"nodeType": "YulFunctionCall",
"src": "9371:9:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "9359:3:1",
"nodeType": "YulIdentifier",
"src": "9359:3:1"
},
"nativeSrc": "9359:22:1",
"nodeType": "YulFunctionCall",
"src": "9359:22:1"
},
"variables": [
{
"name": "loopEnd",
"nativeSrc": "9348:7:1",
"nodeType": "YulTypedName",
"src": "9348:7:1",
"type": ""
}
]
},
{
"nativeSrc": "9395:51:1",
"nodeType": "YulVariableDeclaration",
"src": "9395:51:1",
"value": {
"arguments": [
{
"name": "slot",
"nativeSrc": "9441:4:1",
"nodeType": "YulIdentifier",
"src": "9441:4:1"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nativeSrc": "9409:31:1",
"nodeType": "YulIdentifier",
"src": "9409:31:1"
},
"nativeSrc": "9409:37:1",
"nodeType": "YulFunctionCall",
"src": "9409:37:1"
},
"variables": [
{
"name": "dstPtr",
"nativeSrc": "9399:6:1",
"nodeType": "YulTypedName",
"src": "9399:6:1",
"type": ""
}
]
},
{
"nativeSrc": "9459:10:1",
"nodeType": "YulVariableDeclaration",
"src": "9459:10:1",
"value": {
"kind": "number",
"nativeSrc": "9468:1:1",
"nodeType": "YulLiteral",
"src": "9468:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nativeSrc": "9463:1:1",
"nodeType": "YulTypedName",
"src": "9463:1:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "9527:163:1",
"nodeType": "YulBlock",
"src": "9527:163:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "9552:6:1",
"nodeType": "YulIdentifier",
"src": "9552:6:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "9570:3:1",
"nodeType": "YulIdentifier",
"src": "9570:3:1"
},
{
"name": "srcOffset",
"nativeSrc": "9575:9:1",
"nodeType": "YulIdentifier",
"src": "9575:9:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9566:3:1",
"nodeType": "YulIdentifier",
"src": "9566:3:1"
},
"nativeSrc": "9566:19:1",
"nodeType": "YulFunctionCall",
"src": "9566:19:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "9560:5:1",
"nodeType": "YulIdentifier",
"src": "9560:5:1"
},
"nativeSrc": "9560:26:1",
"nodeType": "YulFunctionCall",
"src": "9560:26:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "9545:6:1",
"nodeType": "YulIdentifier",
"src": "9545:6:1"
},
"nativeSrc": "9545:42:1",
"nodeType": "YulFunctionCall",
"src": "9545:42:1"
},
"nativeSrc": "9545:42:1",
"nodeType": "YulExpressionStatement",
"src": "9545:42:1"
},
{
"nativeSrc": "9604:24:1",
"nodeType": "YulAssignment",
"src": "9604:24:1",
"value": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "9618:6:1",
"nodeType": "YulIdentifier",
"src": "9618:6:1"
},
{
"kind": "number",
"nativeSrc": "9626:1:1",
"nodeType": "YulLiteral",
"src": "9626:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9614:3:1",
"nodeType": "YulIdentifier",
"src": "9614:3:1"
},
"nativeSrc": "9614:14:1",
"nodeType": "YulFunctionCall",
"src": "9614:14:1"
},
"variableNames": [
{
"name": "dstPtr",
"nativeSrc": "9604:6:1",
"nodeType": "YulIdentifier",
"src": "9604:6:1"
}
]
},
{
"nativeSrc": "9645:31:1",
"nodeType": "YulAssignment",
"src": "9645:31:1",
"value": {
"arguments": [
{
"name": "srcOffset",
"nativeSrc": "9662:9:1",
"nodeType": "YulIdentifier",
"src": "9662:9:1"
},
{
"kind": "number",
"nativeSrc": "9673:2:1",
"nodeType": "YulLiteral",
"src": "9673:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9658:3:1",
"nodeType": "YulIdentifier",
"src": "9658:3:1"
},
"nativeSrc": "9658:18:1",
"nodeType": "YulFunctionCall",
"src": "9658:18:1"
},
"variableNames": [
{
"name": "srcOffset",
"nativeSrc": "9645:9:1",
"nodeType": "YulIdentifier",
"src": "9645:9:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nativeSrc": "9493:1:1",
"nodeType": "YulIdentifier",
"src": "9493:1:1"
},
{
"name": "loopEnd",
"nativeSrc": "9496:7:1",
"nodeType": "YulIdentifier",
"src": "9496:7:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "9490:2:1",
"nodeType": "YulIdentifier",
"src": "9490:2:1"
},
"nativeSrc": "9490:14:1",
"nodeType": "YulFunctionCall",
"src": "9490:14:1"
},
"nativeSrc": "9482:208:1",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "9505:21:1",
"nodeType": "YulBlock",
"src": "9505:21:1",
"statements": [
{
"nativeSrc": "9507:17:1",
"nodeType": "YulAssignment",
"src": "9507:17:1",
"value": {
"arguments": [
{
"name": "i",
"nativeSrc": "9516:1:1",
"nodeType": "YulIdentifier",
"src": "9516:1:1"
},
{
"kind": "number",
"nativeSrc": "9519:4:1",
"nodeType": "YulLiteral",
"src": "9519:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9512:3:1",
"nodeType": "YulIdentifier",
"src": "9512:3:1"
},
"nativeSrc": "9512:12:1",
"nodeType": "YulFunctionCall",
"src": "9512:12:1"
},
"variableNames": [
{
"name": "i",
"nativeSrc": "9507:1:1",
"nodeType": "YulIdentifier",
"src": "9507:1:1"
}
]
}
]
},
"pre": {
"nativeSrc": "9486:3:1",
"nodeType": "YulBlock",
"src": "9486:3:1",
"statements": []
},
"src": "9482:208:1"
},
{
"body": {
"nativeSrc": "9726:156:1",
"nodeType": "YulBlock",
"src": "9726:156:1",
"statements": [
{
"nativeSrc": "9744:43:1",
"nodeType": "YulVariableDeclaration",
"src": "9744:43:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "9771:3:1",
"nodeType": "YulIdentifier",
"src": "9771:3:1"
},
{
"name": "srcOffset",
"nativeSrc": "9776:9:1",
"nodeType": "YulIdentifier",
"src": "9776:9:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9767:3:1",
"nodeType": "YulIdentifier",
"src": "9767:3:1"
},
"nativeSrc": "9767:19:1",
"nodeType": "YulFunctionCall",
"src": "9767:19:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "9761:5:1",
"nodeType": "YulIdentifier",
"src": "9761:5:1"
},
"nativeSrc": "9761:26:1",
"nodeType": "YulFunctionCall",
"src": "9761:26:1"
},
"variables": [
{
"name": "lastValue",
"nativeSrc": "9748:9:1",
"nodeType": "YulTypedName",
"src": "9748:9:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "9811:6:1",
"nodeType": "YulIdentifier",
"src": "9811:6:1"
},
{
"arguments": [
{
"name": "lastValue",
"nativeSrc": "9838:9:1",
"nodeType": "YulIdentifier",
"src": "9838:9:1"
},
{
"arguments": [
{
"name": "newLen",
"nativeSrc": "9853:6:1",
"nodeType": "YulIdentifier",
"src": "9853:6:1"
},
{
"kind": "number",
"nativeSrc": "9861:4:1",
"nodeType": "YulLiteral",
"src": "9861:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "and",
"nativeSrc": "9849:3:1",
"nodeType": "YulIdentifier",
"src": "9849:3:1"
},
"nativeSrc": "9849:17:1",
"nodeType": "YulFunctionCall",
"src": "9849:17:1"
}
],
"functionName": {
"name": "mask_bytes_dynamic",
"nativeSrc": "9819:18:1",
"nodeType": "YulIdentifier",
"src": "9819:18:1"
},
"nativeSrc": "9819:48:1",
"nodeType": "YulFunctionCall",
"src": "9819:48:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "9804:6:1",
"nodeType": "YulIdentifier",
"src": "9804:6:1"
},
"nativeSrc": "9804:64:1",
"nodeType": "YulFunctionCall",
"src": "9804:64:1"
},
"nativeSrc": "9804:64:1",
"nodeType": "YulExpressionStatement",
"src": "9804:64:1"
}
]
},
"condition": {
"arguments": [
{
"name": "loopEnd",
"nativeSrc": "9709:7:1",
"nodeType": "YulIdentifier",
"src": "9709:7:1"
},
{
"name": "newLen",
"nativeSrc": "9718:6:1",
"nodeType": "YulIdentifier",
"src": "9718:6:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "9706:2:1",
"nodeType": "YulIdentifier",
"src": "9706:2:1"
},
"nativeSrc": "9706:19:1",
"nodeType": "YulFunctionCall",
"src": "9706:19:1"
},
"nativeSrc": "9703:179:1",
"nodeType": "YulIf",
"src": "9703:179:1"
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "9902:4:1",
"nodeType": "YulIdentifier",
"src": "9902:4:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "newLen",
"nativeSrc": "9916:6:1",
"nodeType": "YulIdentifier",
"src": "9916:6:1"
},
{
"kind": "number",
"nativeSrc": "9924:1:1",
"nodeType": "YulLiteral",
"src": "9924:1:1",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "9912:3:1",
"nodeType": "YulIdentifier",
"src": "9912:3:1"
},
"nativeSrc": "9912:14:1",
"nodeType": "YulFunctionCall",
"src": "9912:14:1"
},
{
"kind": "number",
"nativeSrc": "9928:1:1",
"nodeType": "YulLiteral",
"src": "9928:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9908:3:1",
"nodeType": "YulIdentifier",
"src": "9908:3:1"
},
"nativeSrc": "9908:22:1",
"nodeType": "YulFunctionCall",
"src": "9908:22:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "9895:6:1",
"nodeType": "YulIdentifier",
"src": "9895:6:1"
},
"nativeSrc": "9895:36:1",
"nodeType": "YulFunctionCall",
"src": "9895:36:1"
},
"nativeSrc": "9895:36:1",
"nodeType": "YulExpressionStatement",
"src": "9895:36:1"
}
]
},
"nativeSrc": "9323:618:1",
"nodeType": "YulCase",
"src": "9323:618:1",
"value": {
"kind": "number",
"nativeSrc": "9328:1:1",
"nodeType": "YulLiteral",
"src": "9328:1:1",
"type": "",
"value": "1"
}
},
{
"body": {
"nativeSrc": "9958:222:1",
"nodeType": "YulBlock",
"src": "9958:222:1",
"statements": [
{
"nativeSrc": "9972:14:1",
"nodeType": "YulVariableDeclaration",
"src": "9972:14:1",
"value": {
"kind": "number",
"nativeSrc": "9985:1:1",
"nodeType": "YulLiteral",
"src": "9985:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "value",
"nativeSrc": "9976:5:1",
"nodeType": "YulTypedName",
"src": "9976:5:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "10009:67:1",
"nodeType": "YulBlock",
"src": "10009:67:1",
"statements": [
{
"nativeSrc": "10027:35:1",
"nodeType": "YulAssignment",
"src": "10027:35:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "10046:3:1",
"nodeType": "YulIdentifier",
"src": "10046:3:1"
},
{
"name": "srcOffset",
"nativeSrc": "10051:9:1",
"nodeType": "YulIdentifier",
"src": "10051:9:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10042:3:1",
"nodeType": "YulIdentifier",
"src": "10042:3:1"
},
"nativeSrc": "10042:19:1",
"nodeType": "YulFunctionCall",
"src": "10042:19:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "10036:5:1",
"nodeType": "YulIdentifier",
"src": "10036:5:1"
},
"nativeSrc": "10036:26:1",
"nodeType": "YulFunctionCall",
"src": "10036:26:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "10027:5:1",
"nodeType": "YulIdentifier",
"src": "10027:5:1"
}
]
}
]
},
"condition": {
"name": "newLen",
"nativeSrc": "10002:6:1",
"nodeType": "YulIdentifier",
"src": "10002:6:1"
},
"nativeSrc": "9999:77:1",
"nodeType": "YulIf",
"src": "9999:77:1"
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "10096:4:1",
"nodeType": "YulIdentifier",
"src": "10096:4:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "10155:5:1",
"nodeType": "YulIdentifier",
"src": "10155:5:1"
},
{
"name": "newLen",
"nativeSrc": "10162:6:1",
"nodeType": "YulIdentifier",
"src": "10162:6:1"
}
],
"functionName": {
"name": "extract_used_part_and_set_length_of_short_byte_array",
"nativeSrc": "10102:52:1",
"nodeType": "YulIdentifier",
"src": "10102:52:1"
},
"nativeSrc": "10102:67:1",
"nodeType": "YulFunctionCall",
"src": "10102:67:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "10089:6:1",
"nodeType": "YulIdentifier",
"src": "10089:6:1"
},
"nativeSrc": "10089:81:1",
"nodeType": "YulFunctionCall",
"src": "10089:81:1"
},
"nativeSrc": "10089:81:1",
"nodeType": "YulExpressionStatement",
"src": "10089:81:1"
}
]
},
"nativeSrc": "9950:230:1",
"nodeType": "YulCase",
"src": "9950:230:1",
"value": "default"
}
],
"expression": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "9303:6:1",
"nodeType": "YulIdentifier",
"src": "9303:6:1"
},
{
"kind": "number",
"nativeSrc": "9311:2:1",
"nodeType": "YulLiteral",
"src": "9311:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "9300:2:1",
"nodeType": "YulIdentifier",
"src": "9300:2:1"
},
"nativeSrc": "9300:14:1",
"nodeType": "YulFunctionCall",
"src": "9300:14:1"
},
"nativeSrc": "9293:887:1",
"nodeType": "YulSwitch",
"src": "9293:887:1"
}
]
},
"name": "copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage",
"nativeSrc": "8791:1395:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "8872:4:1",
"nodeType": "YulTypedName",
"src": "8872:4:1",
"type": ""
},
{
"name": "src",
"nativeSrc": "8878:3:1",
"nodeType": "YulTypedName",
"src": "8878:3:1",
"type": ""
}
],
"src": "8791:1395:1"
},
{
"body": {
"nativeSrc": "10220:152:1",
"nodeType": "YulBlock",
"src": "10220:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "10237:1:1",
"nodeType": "YulLiteral",
"src": "10237:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "10240:77:1",
"nodeType": "YulLiteral",
"src": "10240:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "10230:6:1",
"nodeType": "YulIdentifier",
"src": "10230:6:1"
},
"nativeSrc": "10230:88:1",
"nodeType": "YulFunctionCall",
"src": "10230:88:1"
},
"nativeSrc": "10230:88:1",
"nodeType": "YulExpressionStatement",
"src": "10230:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "10334:1:1",
"nodeType": "YulLiteral",
"src": "10334:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nativeSrc": "10337:4:1",
"nodeType": "YulLiteral",
"src": "10337:4:1",
"type": "",
"value": "0x11"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "10327:6:1",
"nodeType": "YulIdentifier",
"src": "10327:6:1"
},
"nativeSrc": "10327:15:1",
"nodeType": "YulFunctionCall",
"src": "10327:15:1"
},
"nativeSrc": "10327:15:1",
"nodeType": "YulExpressionStatement",
"src": "10327:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "10358:1:1",
"nodeType": "YulLiteral",
"src": "10358:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "10361:4:1",
"nodeType": "YulLiteral",
"src": "10361:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "10351:6:1",
"nodeType": "YulIdentifier",
"src": "10351:6:1"
},
"nativeSrc": "10351:15:1",
"nodeType": "YulFunctionCall",
"src": "10351:15:1"
},
"nativeSrc": "10351:15:1",
"nodeType": "YulExpressionStatement",
"src": "10351:15:1"
}
]
},
"name": "panic_error_0x11",
"nativeSrc": "10192:180:1",
"nodeType": "YulFunctionDefinition",
"src": "10192:180:1"
},
{
"body": {
"nativeSrc": "10429:51:1",
"nodeType": "YulBlock",
"src": "10429:51:1",
"statements": [
{
"nativeSrc": "10439:34:1",
"nodeType": "YulAssignment",
"src": "10439:34:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "10464:1:1",
"nodeType": "YulLiteral",
"src": "10464:1:1",
"type": "",
"value": "1"
},
{
"name": "value",
"nativeSrc": "10467:5:1",
"nodeType": "YulIdentifier",
"src": "10467:5:1"
}
],
"functionName": {
"name": "shr",
"nativeSrc": "10460:3:1",
"nodeType": "YulIdentifier",
"src": "10460:3:1"
},
"nativeSrc": "10460:13:1",
"nodeType": "YulFunctionCall",
"src": "10460:13:1"
},
"variableNames": [
{
"name": "newValue",
"nativeSrc": "10439:8:1",
"nodeType": "YulIdentifier",
"src": "10439:8:1"
}
]
}
]
},
"name": "shift_right_1_unsigned",
"nativeSrc": "10378:102:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "10410:5:1",
"nodeType": "YulTypedName",
"src": "10410:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nativeSrc": "10420:8:1",
"nodeType": "YulTypedName",
"src": "10420:8:1",
"type": ""
}
],
"src": "10378:102:1"
},
{
"body": {
"nativeSrc": "10559:775:1",
"nodeType": "YulBlock",
"src": "10559:775:1",
"statements": [
{
"nativeSrc": "10569:15:1",
"nodeType": "YulAssignment",
"src": "10569:15:1",
"value": {
"name": "_power",
"nativeSrc": "10578:6:1",
"nodeType": "YulIdentifier",
"src": "10578:6:1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "10569:5:1",
"nodeType": "YulIdentifier",
"src": "10569:5:1"
}
]
},
{
"nativeSrc": "10593:14:1",
"nodeType": "YulAssignment",
"src": "10593:14:1",
"value": {
"name": "_base",
"nativeSrc": "10602:5:1",
"nodeType": "YulIdentifier",
"src": "10602:5:1"
},
"variableNames": [
{
"name": "base",
"nativeSrc": "10593:4:1",
"nodeType": "YulIdentifier",
"src": "10593:4:1"
}
]
},
{
"body": {
"nativeSrc": "10651:677:1",
"nodeType": "YulBlock",
"src": "10651:677:1",
"statements": [
{
"body": {
"nativeSrc": "10739:22:1",
"nodeType": "YulBlock",
"src": "10739:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nativeSrc": "10741:16:1",
"nodeType": "YulIdentifier",
"src": "10741:16:1"
},
"nativeSrc": "10741:18:1",
"nodeType": "YulFunctionCall",
"src": "10741:18:1"
},
"nativeSrc": "10741:18:1",
"nodeType": "YulExpressionStatement",
"src": "10741:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "base",
"nativeSrc": "10717:4:1",
"nodeType": "YulIdentifier",
"src": "10717:4:1"
},
{
"arguments": [
{
"name": "max",
"nativeSrc": "10727:3:1",
"nodeType": "YulIdentifier",
"src": "10727:3:1"
},
{
"name": "base",
"nativeSrc": "10732:4:1",
"nodeType": "YulIdentifier",
"src": "10732:4:1"
}
],
"functionName": {
"name": "div",
"nativeSrc": "10723:3:1",
"nodeType": "YulIdentifier",
"src": "10723:3:1"
},
"nativeSrc": "10723:14:1",
"nodeType": "YulFunctionCall",
"src": "10723:14:1"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "10714:2:1",
"nodeType": "YulIdentifier",
"src": "10714:2:1"
},
"nativeSrc": "10714:24:1",
"nodeType": "YulFunctionCall",
"src": "10714:24:1"
},
"nativeSrc": "10711:50:1",
"nodeType": "YulIf",
"src": "10711:50:1"
},
{
"body": {
"nativeSrc": "10806:419:1",
"nodeType": "YulBlock",
"src": "10806:419:1",
"statements": [
{
"nativeSrc": "11186:25:1",
"nodeType": "YulAssignment",
"src": "11186:25:1",
"value": {
"arguments": [
{
"name": "power",
"nativeSrc": "11199:5:1",
"nodeType": "YulIdentifier",
"src": "11199:5:1"
},
{
"name": "base",
"nativeSrc": "11206:4:1",
"nodeType": "YulIdentifier",
"src": "11206:4:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "11195:3:1",
"nodeType": "YulIdentifier",
"src": "11195:3:1"
},
"nativeSrc": "11195:16:1",
"nodeType": "YulFunctionCall",
"src": "11195:16:1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "11186:5:1",
"nodeType": "YulIdentifier",
"src": "11186:5:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "exponent",
"nativeSrc": "10781:8:1",
"nodeType": "YulIdentifier",
"src": "10781:8:1"
},
{
"kind": "number",
"nativeSrc": "10791:1:1",
"nodeType": "YulLiteral",
"src": "10791:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "10777:3:1",
"nodeType": "YulIdentifier",
"src": "10777:3:1"
},
"nativeSrc": "10777:16:1",
"nodeType": "YulFunctionCall",
"src": "10777:16:1"
},
"nativeSrc": "10774:451:1",
"nodeType": "YulIf",
"src": "10774:451:1"
},
{
"nativeSrc": "11238:23:1",
"nodeType": "YulAssignment",
"src": "11238:23:1",
"value": {
"arguments": [
{
"name": "base",
"nativeSrc": "11250:4:1",
"nodeType": "YulIdentifier",
"src": "11250:4:1"
},
{
"name": "base",
"nativeSrc": "11256:4:1",
"nodeType": "YulIdentifier",
"src": "11256:4:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "11246:3:1",
"nodeType": "YulIdentifier",
"src": "11246:3:1"
},
"nativeSrc": "11246:15:1",
"nodeType": "YulFunctionCall",
"src": "11246:15:1"
},
"variableNames": [
{
"name": "base",
"nativeSrc": "11238:4:1",
"nodeType": "YulIdentifier",
"src": "11238:4:1"
}
]
},
{
"nativeSrc": "11274:44:1",
"nodeType": "YulAssignment",
"src": "11274:44:1",
"value": {
"arguments": [
{
"name": "exponent",
"nativeSrc": "11309:8:1",
"nodeType": "YulIdentifier",
"src": "11309:8:1"
}
],
"functionName": {
"name": "shift_right_1_unsigned",
"nativeSrc": "11286:22:1",
"nodeType": "YulIdentifier",
"src": "11286:22:1"
},
"nativeSrc": "11286:32:1",
"nodeType": "YulFunctionCall",
"src": "11286:32:1"
},
"variableNames": [
{
"name": "exponent",
"nativeSrc": "11274:8:1",
"nodeType": "YulIdentifier",
"src": "11274:8:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "exponent",
"nativeSrc": "10627:8:1",
"nodeType": "YulIdentifier",
"src": "10627:8:1"
},
{
"kind": "number",
"nativeSrc": "10637:1:1",
"nodeType": "YulLiteral",
"src": "10637:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "10624:2:1",
"nodeType": "YulIdentifier",
"src": "10624:2:1"
},
"nativeSrc": "10624:15:1",
"nodeType": "YulFunctionCall",
"src": "10624:15:1"
},
"nativeSrc": "10616:712:1",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "10640:2:1",
"nodeType": "YulBlock",
"src": "10640:2:1",
"statements": []
},
"pre": {
"nativeSrc": "10620:3:1",
"nodeType": "YulBlock",
"src": "10620:3:1",
"statements": []
},
"src": "10616:712:1"
}
]
},
"name": "checked_exp_helper",
"nativeSrc": "10486:848:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "_power",
"nativeSrc": "10514:6:1",
"nodeType": "YulTypedName",
"src": "10514:6:1",
"type": ""
},
{
"name": "_base",
"nativeSrc": "10522:5:1",
"nodeType": "YulTypedName",
"src": "10522:5:1",
"type": ""
},
{
"name": "exponent",
"nativeSrc": "10529:8:1",
"nodeType": "YulTypedName",
"src": "10529:8:1",
"type": ""
},
{
"name": "max",
"nativeSrc": "10539:3:1",
"nodeType": "YulTypedName",
"src": "10539:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "power",
"nativeSrc": "10547:5:1",
"nodeType": "YulTypedName",
"src": "10547:5:1",
"type": ""
},
{
"name": "base",
"nativeSrc": "10554:4:1",
"nodeType": "YulTypedName",
"src": "10554:4:1",
"type": ""
}
],
"src": "10486:848:1"
},
{
"body": {
"nativeSrc": "11400:1013:1",
"nodeType": "YulBlock",
"src": "11400:1013:1",
"statements": [
{
"body": {
"nativeSrc": "11595:20:1",
"nodeType": "YulBlock",
"src": "11595:20:1",
"statements": [
{
"nativeSrc": "11597:10:1",
"nodeType": "YulAssignment",
"src": "11597:10:1",
"value": {
"kind": "number",
"nativeSrc": "11606:1:1",
"nodeType": "YulLiteral",
"src": "11606:1:1",
"type": "",
"value": "1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "11597:5:1",
"nodeType": "YulIdentifier",
"src": "11597:5:1"
}
]
},
{
"nativeSrc": "11608:5:1",
"nodeType": "YulLeave",
"src": "11608:5:1"
}
]
},
"condition": {
"arguments": [
{
"name": "exponent",
"nativeSrc": "11585:8:1",
"nodeType": "YulIdentifier",
"src": "11585:8:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "11578:6:1",
"nodeType": "YulIdentifier",
"src": "11578:6:1"
},
"nativeSrc": "11578:16:1",
"nodeType": "YulFunctionCall",
"src": "11578:16:1"
},
"nativeSrc": "11575:40:1",
"nodeType": "YulIf",
"src": "11575:40:1"
},
{
"body": {
"nativeSrc": "11640:20:1",
"nodeType": "YulBlock",
"src": "11640:20:1",
"statements": [
{
"nativeSrc": "11642:10:1",
"nodeType": "YulAssignment",
"src": "11642:10:1",
"value": {
"kind": "number",
"nativeSrc": "11651:1:1",
"nodeType": "YulLiteral",
"src": "11651:1:1",
"type": "",
"value": "0"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "11642:5:1",
"nodeType": "YulIdentifier",
"src": "11642:5:1"
}
]
},
{
"nativeSrc": "11653:5:1",
"nodeType": "YulLeave",
"src": "11653:5:1"
}
]
},
"condition": {
"arguments": [
{
"name": "base",
"nativeSrc": "11634:4:1",
"nodeType": "YulIdentifier",
"src": "11634:4:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "11627:6:1",
"nodeType": "YulIdentifier",
"src": "11627:6:1"
},
"nativeSrc": "11627:12:1",
"nodeType": "YulFunctionCall",
"src": "11627:12:1"
},
"nativeSrc": "11624:36:1",
"nodeType": "YulIf",
"src": "11624:36:1"
},
{
"cases": [
{
"body": {
"nativeSrc": "11770:20:1",
"nodeType": "YulBlock",
"src": "11770:20:1",
"statements": [
{
"nativeSrc": "11772:10:1",
"nodeType": "YulAssignment",
"src": "11772:10:1",
"value": {
"kind": "number",
"nativeSrc": "11781:1:1",
"nodeType": "YulLiteral",
"src": "11781:1:1",
"type": "",
"value": "1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "11772:5:1",
"nodeType": "YulIdentifier",
"src": "11772:5:1"
}
]
},
{
"nativeSrc": "11783:5:1",
"nodeType": "YulLeave",
"src": "11783:5:1"
}
]
},
"nativeSrc": "11763:27:1",
"nodeType": "YulCase",
"src": "11763:27:1",
"value": {
"kind": "number",
"nativeSrc": "11768:1:1",
"nodeType": "YulLiteral",
"src": "11768:1:1",
"type": "",
"value": "1"
}
},
{
"body": {
"nativeSrc": "11814:176:1",
"nodeType": "YulBlock",
"src": "11814:176:1",
"statements": [
{
"body": {
"nativeSrc": "11849:22:1",
"nodeType": "YulBlock",
"src": "11849:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nativeSrc": "11851:16:1",
"nodeType": "YulIdentifier",
"src": "11851:16:1"
},
"nativeSrc": "11851:18:1",
"nodeType": "YulFunctionCall",
"src": "11851:18:1"
},
"nativeSrc": "11851:18:1",
"nodeType": "YulExpressionStatement",
"src": "11851:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "exponent",
"nativeSrc": "11834:8:1",
"nodeType": "YulIdentifier",
"src": "11834:8:1"
},
{
"kind": "number",
"nativeSrc": "11844:3:1",
"nodeType": "YulLiteral",
"src": "11844:3:1",
"type": "",
"value": "255"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "11831:2:1",
"nodeType": "YulIdentifier",
"src": "11831:2:1"
},
"nativeSrc": "11831:17:1",
"nodeType": "YulFunctionCall",
"src": "11831:17:1"
},
"nativeSrc": "11828:43:1",
"nodeType": "YulIf",
"src": "11828:43:1"
},
{
"nativeSrc": "11884:25:1",
"nodeType": "YulAssignment",
"src": "11884:25:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "11897:1:1",
"nodeType": "YulLiteral",
"src": "11897:1:1",
"type": "",
"value": "2"
},
{
"name": "exponent",
"nativeSrc": "11900:8:1",
"nodeType": "YulIdentifier",
"src": "11900:8:1"
}
],
"functionName": {
"name": "exp",
"nativeSrc": "11893:3:1",
"nodeType": "YulIdentifier",
"src": "11893:3:1"
},
"nativeSrc": "11893:16:1",
"nodeType": "YulFunctionCall",
"src": "11893:16:1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "11884:5:1",
"nodeType": "YulIdentifier",
"src": "11884:5:1"
}
]
},
{
"body": {
"nativeSrc": "11940:22:1",
"nodeType": "YulBlock",
"src": "11940:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nativeSrc": "11942:16:1",
"nodeType": "YulIdentifier",
"src": "11942:16:1"
},
"nativeSrc": "11942:18:1",
"nodeType": "YulFunctionCall",
"src": "11942:18:1"
},
"nativeSrc": "11942:18:1",
"nodeType": "YulExpressionStatement",
"src": "11942:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "power",
"nativeSrc": "11928:5:1",
"nodeType": "YulIdentifier",
"src": "11928:5:1"
},
{
"name": "max",
"nativeSrc": "11935:3:1",
"nodeType": "YulIdentifier",
"src": "11935:3:1"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "11925:2:1",
"nodeType": "YulIdentifier",
"src": "11925:2:1"
},
"nativeSrc": "11925:14:1",
"nodeType": "YulFunctionCall",
"src": "11925:14:1"
},
"nativeSrc": "11922:40:1",
"nodeType": "YulIf",
"src": "11922:40:1"
},
{
"nativeSrc": "11975:5:1",
"nodeType": "YulLeave",
"src": "11975:5:1"
}
]
},
"nativeSrc": "11799:191:1",
"nodeType": "YulCase",
"src": "11799:191:1",
"value": {
"kind": "number",
"nativeSrc": "11804:1:1",
"nodeType": "YulLiteral",
"src": "11804:1:1",
"type": "",
"value": "2"
}
}
],
"expression": {
"name": "base",
"nativeSrc": "11720:4:1",
"nodeType": "YulIdentifier",
"src": "11720:4:1"
},
"nativeSrc": "11713:277:1",
"nodeType": "YulSwitch",
"src": "11713:277:1"
},
{
"body": {
"nativeSrc": "12122:123:1",
"nodeType": "YulBlock",
"src": "12122:123:1",
"statements": [
{
"nativeSrc": "12136:28:1",
"nodeType": "YulAssignment",
"src": "12136:28:1",
"value": {
"arguments": [
{
"name": "base",
"nativeSrc": "12149:4:1",
"nodeType": "YulIdentifier",
"src": "12149:4:1"
},
{
"name": "exponent",
"nativeSrc": "12155:8:1",
"nodeType": "YulIdentifier",
"src": "12155:8:1"
}
],
"functionName": {
"name": "exp",
"nativeSrc": "12145:3:1",
"nodeType": "YulIdentifier",
"src": "12145:3:1"
},
"nativeSrc": "12145:19:1",
"nodeType": "YulFunctionCall",
"src": "12145:19:1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "12136:5:1",
"nodeType": "YulIdentifier",
"src": "12136:5:1"
}
]
},
{
"body": {
"nativeSrc": "12195:22:1",
"nodeType": "YulBlock",
"src": "12195:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nativeSrc": "12197:16:1",
"nodeType": "YulIdentifier",
"src": "12197:16:1"
},
"nativeSrc": "12197:18:1",
"nodeType": "YulFunctionCall",
"src": "12197:18:1"
},
"nativeSrc": "12197:18:1",
"nodeType": "YulExpressionStatement",
"src": "12197:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "power",
"nativeSrc": "12183:5:1",
"nodeType": "YulIdentifier",
"src": "12183:5:1"
},
{
"name": "max",
"nativeSrc": "12190:3:1",
"nodeType": "YulIdentifier",
"src": "12190:3:1"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "12180:2:1",
"nodeType": "YulIdentifier",
"src": "12180:2:1"
},
"nativeSrc": "12180:14:1",
"nodeType": "YulFunctionCall",
"src": "12180:14:1"
},
"nativeSrc": "12177:40:1",
"nodeType": "YulIf",
"src": "12177:40:1"
},
{
"nativeSrc": "12230:5:1",
"nodeType": "YulLeave",
"src": "12230:5:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "base",
"nativeSrc": "12025:4:1",
"nodeType": "YulIdentifier",
"src": "12025:4:1"
},
{
"kind": "number",
"nativeSrc": "12031:2:1",
"nodeType": "YulLiteral",
"src": "12031:2:1",
"type": "",
"value": "11"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "12022:2:1",
"nodeType": "YulIdentifier",
"src": "12022:2:1"
},
"nativeSrc": "12022:12:1",
"nodeType": "YulFunctionCall",
"src": "12022:12:1"
},
{
"arguments": [
{
"name": "exponent",
"nativeSrc": "12039:8:1",
"nodeType": "YulIdentifier",
"src": "12039:8:1"
},
{
"kind": "number",
"nativeSrc": "12049:2:1",
"nodeType": "YulLiteral",
"src": "12049:2:1",
"type": "",
"value": "78"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "12036:2:1",
"nodeType": "YulIdentifier",
"src": "12036:2:1"
},
"nativeSrc": "12036:16:1",
"nodeType": "YulFunctionCall",
"src": "12036:16:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "12018:3:1",
"nodeType": "YulIdentifier",
"src": "12018:3:1"
},
"nativeSrc": "12018:35:1",
"nodeType": "YulFunctionCall",
"src": "12018:35:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "base",
"nativeSrc": "12074:4:1",
"nodeType": "YulIdentifier",
"src": "12074:4:1"
},
{
"kind": "number",
"nativeSrc": "12080:3:1",
"nodeType": "YulLiteral",
"src": "12080:3:1",
"type": "",
"value": "307"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "12071:2:1",
"nodeType": "YulIdentifier",
"src": "12071:2:1"
},
"nativeSrc": "12071:13:1",
"nodeType": "YulFunctionCall",
"src": "12071:13:1"
},
{
"arguments": [
{
"name": "exponent",
"nativeSrc": "12089:8:1",
"nodeType": "YulIdentifier",
"src": "12089:8:1"
},
{
"kind": "number",
"nativeSrc": "12099:2:1",
"nodeType": "YulLiteral",
"src": "12099:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "12086:2:1",
"nodeType": "YulIdentifier",
"src": "12086:2:1"
},
"nativeSrc": "12086:16:1",
"nodeType": "YulFunctionCall",
"src": "12086:16:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "12067:3:1",
"nodeType": "YulIdentifier",
"src": "12067:3:1"
},
"nativeSrc": "12067:36:1",
"nodeType": "YulFunctionCall",
"src": "12067:36:1"
}
],
"functionName": {
"name": "or",
"nativeSrc": "12002:2:1",
"nodeType": "YulIdentifier",
"src": "12002:2:1"
},
"nativeSrc": "12002:111:1",
"nodeType": "YulFunctionCall",
"src": "12002:111:1"
},
"nativeSrc": "11999:246:1",
"nodeType": "YulIf",
"src": "11999:246:1"
},
{
"nativeSrc": "12255:57:1",
"nodeType": "YulAssignment",
"src": "12255:57:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "12289:1:1",
"nodeType": "YulLiteral",
"src": "12289:1:1",
"type": "",
"value": "1"
},
{
"name": "base",
"nativeSrc": "12292:4:1",
"nodeType": "YulIdentifier",
"src": "12292:4:1"
},
{
"name": "exponent",
"nativeSrc": "12298:8:1",
"nodeType": "YulIdentifier",
"src": "12298:8:1"
},
{
"name": "max",
"nativeSrc": "12308:3:1",
"nodeType": "YulIdentifier",
"src": "12308:3:1"
}
],
"functionName": {
"name": "checked_exp_helper",
"nativeSrc": "12270:18:1",
"nodeType": "YulIdentifier",
"src": "12270:18:1"
},
"nativeSrc": "12270:42:1",
"nodeType": "YulFunctionCall",
"src": "12270:42:1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "12255:5:1",
"nodeType": "YulIdentifier",
"src": "12255:5:1"
},
{
"name": "base",
"nativeSrc": "12262:4:1",
"nodeType": "YulIdentifier",
"src": "12262:4:1"
}
]
},
{
"body": {
"nativeSrc": "12351:22:1",
"nodeType": "YulBlock",
"src": "12351:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nativeSrc": "12353:16:1",
"nodeType": "YulIdentifier",
"src": "12353:16:1"
},
"nativeSrc": "12353:18:1",
"nodeType": "YulFunctionCall",
"src": "12353:18:1"
},
"nativeSrc": "12353:18:1",
"nodeType": "YulExpressionStatement",
"src": "12353:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "power",
"nativeSrc": "12328:5:1",
"nodeType": "YulIdentifier",
"src": "12328:5:1"
},
{
"arguments": [
{
"name": "max",
"nativeSrc": "12339:3:1",
"nodeType": "YulIdentifier",
"src": "12339:3:1"
},
{
"name": "base",
"nativeSrc": "12344:4:1",
"nodeType": "YulIdentifier",
"src": "12344:4:1"
}
],
"functionName": {
"name": "div",
"nativeSrc": "12335:3:1",
"nodeType": "YulIdentifier",
"src": "12335:3:1"
},
"nativeSrc": "12335:14:1",
"nodeType": "YulFunctionCall",
"src": "12335:14:1"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "12325:2:1",
"nodeType": "YulIdentifier",
"src": "12325:2:1"
},
"nativeSrc": "12325:25:1",
"nodeType": "YulFunctionCall",
"src": "12325:25:1"
},
"nativeSrc": "12322:51:1",
"nodeType": "YulIf",
"src": "12322:51:1"
},
{
"nativeSrc": "12382:25:1",
"nodeType": "YulAssignment",
"src": "12382:25:1",
"value": {
"arguments": [
{
"name": "power",
"nativeSrc": "12395:5:1",
"nodeType": "YulIdentifier",
"src": "12395:5:1"
},
{
"name": "base",
"nativeSrc": "12402:4:1",
"nodeType": "YulIdentifier",
"src": "12402:4:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "12391:3:1",
"nodeType": "YulIdentifier",
"src": "12391:3:1"
},
"nativeSrc": "12391:16:1",
"nodeType": "YulFunctionCall",
"src": "12391:16:1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "12382:5:1",
"nodeType": "YulIdentifier",
"src": "12382:5:1"
}
]
}
]
},
"name": "checked_exp_unsigned",
"nativeSrc": "11340:1073:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "base",
"nativeSrc": "11370:4:1",
"nodeType": "YulTypedName",
"src": "11370:4:1",
"type": ""
},
{
"name": "exponent",
"nativeSrc": "11376:8:1",
"nodeType": "YulTypedName",
"src": "11376:8:1",
"type": ""
},
{
"name": "max",
"nativeSrc": "11386:3:1",
"nodeType": "YulTypedName",
"src": "11386:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "power",
"nativeSrc": "11394:5:1",
"nodeType": "YulTypedName",
"src": "11394:5:1",
"type": ""
}
],
"src": "11340:1073:1"
},
{
"body": {
"nativeSrc": "12483:217:1",
"nodeType": "YulBlock",
"src": "12483:217:1",
"statements": [
{
"nativeSrc": "12493:31:1",
"nodeType": "YulAssignment",
"src": "12493:31:1",
"value": {
"arguments": [
{
"name": "base",
"nativeSrc": "12519:4:1",
"nodeType": "YulIdentifier",
"src": "12519:4:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "12501:17:1",
"nodeType": "YulIdentifier",
"src": "12501:17:1"
},
"nativeSrc": "12501:23:1",
"nodeType": "YulFunctionCall",
"src": "12501:23:1"
},
"variableNames": [
{
"name": "base",
"nativeSrc": "12493:4:1",
"nodeType": "YulIdentifier",
"src": "12493:4:1"
}
]
},
{
"nativeSrc": "12533:37:1",
"nodeType": "YulAssignment",
"src": "12533:37:1",
"value": {
"arguments": [
{
"name": "exponent",
"nativeSrc": "12561:8:1",
"nodeType": "YulIdentifier",
"src": "12561:8:1"
}
],
"functionName": {
"name": "cleanup_t_uint8",
"nativeSrc": "12545:15:1",
"nodeType": "YulIdentifier",
"src": "12545:15:1"
},
"nativeSrc": "12545:25:1",
"nodeType": "YulFunctionCall",
"src": "12545:25:1"
},
"variableNames": [
{
"name": "exponent",
"nativeSrc": "12533:8:1",
"nodeType": "YulIdentifier",
"src": "12533:8:1"
}
]
},
{
"nativeSrc": "12580:113:1",
"nodeType": "YulAssignment",
"src": "12580:113:1",
"value": {
"arguments": [
{
"name": "base",
"nativeSrc": "12610:4:1",
"nodeType": "YulIdentifier",
"src": "12610:4:1"
},
{
"name": "exponent",
"nativeSrc": "12616:8:1",
"nodeType": "YulIdentifier",
"src": "12616:8:1"
},
{
"kind": "number",
"nativeSrc": "12626:66:1",
"nodeType": "YulLiteral",
"src": "12626:66:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "checked_exp_unsigned",
"nativeSrc": "12589:20:1",
"nodeType": "YulIdentifier",
"src": "12589:20:1"
},
"nativeSrc": "12589:104:1",
"nodeType": "YulFunctionCall",
"src": "12589:104:1"
},
"variableNames": [
{
"name": "power",
"nativeSrc": "12580:5:1",
"nodeType": "YulIdentifier",
"src": "12580:5:1"
}
]
}
]
},
"name": "checked_exp_t_uint256_t_uint8",
"nativeSrc": "12419:281:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "base",
"nativeSrc": "12458:4:1",
"nodeType": "YulTypedName",
"src": "12458:4:1",
"type": ""
},
{
"name": "exponent",
"nativeSrc": "12464:8:1",
"nodeType": "YulTypedName",
"src": "12464:8:1",
"type": ""
}
],
"returnVariables": [
{
"name": "power",
"nativeSrc": "12477:5:1",
"nodeType": "YulTypedName",
"src": "12477:5:1",
"type": ""
}
],
"src": "12419:281:1"
},
{
"body": {
"nativeSrc": "12754:362:1",
"nodeType": "YulBlock",
"src": "12754:362:1",
"statements": [
{
"nativeSrc": "12764:25:1",
"nodeType": "YulAssignment",
"src": "12764:25:1",
"value": {
"arguments": [
{
"name": "x",
"nativeSrc": "12787:1:1",
"nodeType": "YulIdentifier",
"src": "12787:1:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "12769:17:1",
"nodeType": "YulIdentifier",
"src": "12769:17:1"
},
"nativeSrc": "12769:20:1",
"nodeType": "YulFunctionCall",
"src": "12769:20:1"
},
"variableNames": [
{
"name": "x",
"nativeSrc": "12764:1:1",
"nodeType": "YulIdentifier",
"src": "12764:1:1"
}
]
},
{
"nativeSrc": "12798:25:1",
"nodeType": "YulAssignment",
"src": "12798:25:1",
"value": {
"arguments": [
{
"name": "y",
"nativeSrc": "12821:1:1",
"nodeType": "YulIdentifier",
"src": "12821:1:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "12803:17:1",
"nodeType": "YulIdentifier",
"src": "12803:17:1"
},
"nativeSrc": "12803:20:1",
"nodeType": "YulFunctionCall",
"src": "12803:20:1"
},
"variableNames": [
{
"name": "y",
"nativeSrc": "12798:1:1",
"nodeType": "YulIdentifier",
"src": "12798:1:1"
}
]
},
{
"nativeSrc": "12832:28:1",
"nodeType": "YulVariableDeclaration",
"src": "12832:28:1",
"value": {
"arguments": [
{
"name": "x",
"nativeSrc": "12855:1:1",
"nodeType": "YulIdentifier",
"src": "12855:1:1"
},
{
"name": "y",
"nativeSrc": "12858:1:1",
"nodeType": "YulIdentifier",
"src": "12858:1:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "12851:3:1",
"nodeType": "YulIdentifier",
"src": "12851:3:1"
},
"nativeSrc": "12851:9:1",
"nodeType": "YulFunctionCall",
"src": "12851:9:1"
},
"variables": [
{
"name": "product_raw",
"nativeSrc": "12836:11:1",
"nodeType": "YulTypedName",
"src": "12836:11:1",
"type": ""
}
]
},
{
"nativeSrc": "12869:41:1",
"nodeType": "YulAssignment",
"src": "12869:41:1",
"value": {
"arguments": [
{
"name": "product_raw",
"nativeSrc": "12898:11:1",
"nodeType": "YulIdentifier",
"src": "12898:11:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "12880:17:1",
"nodeType": "YulIdentifier",
"src": "12880:17:1"
},
"nativeSrc": "12880:30:1",
"nodeType": "YulFunctionCall",
"src": "12880:30:1"
},
"variableNames": [
{
"name": "product",
"nativeSrc": "12869:7:1",
"nodeType": "YulIdentifier",
"src": "12869:7:1"
}
]
},
{
"body": {
"nativeSrc": "13087:22:1",
"nodeType": "YulBlock",
"src": "13087:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nativeSrc": "13089:16:1",
"nodeType": "YulIdentifier",
"src": "13089:16:1"
},
"nativeSrc": "13089:18:1",
"nodeType": "YulFunctionCall",
"src": "13089:18:1"
},
"nativeSrc": "13089:18:1",
"nodeType": "YulExpressionStatement",
"src": "13089:18:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "x",
"nativeSrc": "13020:1:1",
"nodeType": "YulIdentifier",
"src": "13020:1:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "13013:6:1",
"nodeType": "YulIdentifier",
"src": "13013:6:1"
},
"nativeSrc": "13013:9:1",
"nodeType": "YulFunctionCall",
"src": "13013:9:1"
},
{
"arguments": [
{
"name": "y",
"nativeSrc": "13043:1:1",
"nodeType": "YulIdentifier",
"src": "13043:1:1"
},
{
"arguments": [
{
"name": "product",
"nativeSrc": "13050:7:1",
"nodeType": "YulIdentifier",
"src": "13050:7:1"
},
{
"name": "x",
"nativeSrc": "13059:1:1",
"nodeType": "YulIdentifier",
"src": "13059:1:1"
}
],
"functionName": {
"name": "div",
"nativeSrc": "13046:3:1",
"nodeType": "YulIdentifier",
"src": "13046:3:1"
},
"nativeSrc": "13046:15:1",
"nodeType": "YulFunctionCall",
"src": "13046:15:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "13040:2:1",
"nodeType": "YulIdentifier",
"src": "13040:2:1"
},
"nativeSrc": "13040:22:1",
"nodeType": "YulFunctionCall",
"src": "13040:22:1"
}
],
"functionName": {
"name": "or",
"nativeSrc": "12993:2:1",
"nodeType": "YulIdentifier",
"src": "12993:2:1"
},
"nativeSrc": "12993:83:1",
"nodeType": "YulFunctionCall",
"src": "12993:83:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "12973:6:1",
"nodeType": "YulIdentifier",
"src": "12973:6:1"
},
"nativeSrc": "12973:113:1",
"nodeType": "YulFunctionCall",
"src": "12973:113:1"
},
"nativeSrc": "12970:139:1",
"nodeType": "YulIf",
"src": "12970:139:1"
}
]
},
"name": "checked_mul_t_uint256",
"nativeSrc": "12706:410:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nativeSrc": "12737:1:1",
"nodeType": "YulTypedName",
"src": "12737:1:1",
"type": ""
},
{
"name": "y",
"nativeSrc": "12740:1:1",
"nodeType": "YulTypedName",
"src": "12740:1:1",
"type": ""
}
],
"returnVariables": [
{
"name": "product",
"nativeSrc": "12746:7:1",
"nodeType": "YulTypedName",
"src": "12746:7:1",
"type": ""
}
],
"src": "12706:410:1"
},
{
"body": {
"nativeSrc": "13218:73:1",
"nodeType": "YulBlock",
"src": "13218:73:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "13235:3:1",
"nodeType": "YulIdentifier",
"src": "13235:3:1"
},
{
"name": "length",
"nativeSrc": "13240:6:1",
"nodeType": "YulIdentifier",
"src": "13240:6:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "13228:6:1",
"nodeType": "YulIdentifier",
"src": "13228:6:1"
},
"nativeSrc": "13228:19:1",
"nodeType": "YulFunctionCall",
"src": "13228:19:1"
},
"nativeSrc": "13228:19:1",
"nodeType": "YulExpressionStatement",
"src": "13228:19:1"
},
{
"nativeSrc": "13256:29:1",
"nodeType": "YulAssignment",
"src": "13256:29:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "13275:3:1",
"nodeType": "YulIdentifier",
"src": "13275:3:1"
},
{
"kind": "number",
"nativeSrc": "13280:4:1",
"nodeType": "YulLiteral",
"src": "13280:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "13271:3:1",
"nodeType": "YulIdentifier",
"src": "13271:3:1"
},
"nativeSrc": "13271:14:1",
"nodeType": "YulFunctionCall",
"src": "13271:14:1"
},
"variableNames": [
{
"name": "updated_pos",
"nativeSrc": "13256:11:1",
"nodeType": "YulIdentifier",
"src": "13256:11:1"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "13122:169:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nativeSrc": "13190:3:1",
"nodeType": "YulTypedName",
"src": "13190:3:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "13195:6:1",
"nodeType": "YulTypedName",
"src": "13195:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nativeSrc": "13206:11:1",
"nodeType": "YulTypedName",
"src": "13206:11:1",
"type": ""
}
],
"src": "13122:169:1"
},
{
"body": {
"nativeSrc": "13403:75:1",
"nodeType": "YulBlock",
"src": "13403:75:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nativeSrc": "13425:6:1",
"nodeType": "YulIdentifier",
"src": "13425:6:1"
},
{
"kind": "number",
"nativeSrc": "13433:1:1",
"nodeType": "YulLiteral",
"src": "13433:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "13421:3:1",
"nodeType": "YulIdentifier",
"src": "13421:3:1"
},
"nativeSrc": "13421:14:1",
"nodeType": "YulFunctionCall",
"src": "13421:14:1"
},
{
"hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373",
"kind": "string",
"nativeSrc": "13437:33:1",
"nodeType": "YulLiteral",
"src": "13437:33:1",
"type": "",
"value": "ERC20: mint to the zero address"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "13414:6:1",
"nodeType": "YulIdentifier",
"src": "13414:6:1"
},
"nativeSrc": "13414:57:1",
"nodeType": "YulFunctionCall",
"src": "13414:57:1"
},
"nativeSrc": "13414:57:1",
"nodeType": "YulExpressionStatement",
"src": "13414:57:1"
}
]
},
"name": "store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e",
"nativeSrc": "13297:181:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nativeSrc": "13395:6:1",
"nodeType": "YulTypedName",
"src": "13395:6:1",
"type": ""
}
],
"src": "13297:181:1"
},
{
"body": {
"nativeSrc": "13630:220:1",
"nodeType": "YulBlock",
"src": "13630:220:1",
"statements": [
{
"nativeSrc": "13640:74:1",
"nodeType": "YulAssignment",
"src": "13640:74:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "13706:3:1",
"nodeType": "YulIdentifier",
"src": "13706:3:1"
},
{
"kind": "number",
"nativeSrc": "13711:2:1",
"nodeType": "YulLiteral",
"src": "13711:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "13647:58:1",
"nodeType": "YulIdentifier",
"src": "13647:58:1"
},
"nativeSrc": "13647:67:1",
"nodeType": "YulFunctionCall",
"src": "13647:67:1"
},
"variableNames": [
{
"name": "pos",
"nativeSrc": "13640:3:1",
"nodeType": "YulIdentifier",
"src": "13640:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "13812:3:1",
"nodeType": "YulIdentifier",
"src": "13812:3:1"
}
],
"functionName": {
"name": "store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e",
"nativeSrc": "13723:88:1",
"nodeType": "YulIdentifier",
"src": "13723:88:1"
},
"nativeSrc": "13723:93:1",
"nodeType": "YulFunctionCall",
"src": "13723:93:1"
},
"nativeSrc": "13723:93:1",
"nodeType": "YulExpressionStatement",
"src": "13723:93:1"
},
{
"nativeSrc": "13825:19:1",
"nodeType": "YulAssignment",
"src": "13825:19:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "13836:3:1",
"nodeType": "YulIdentifier",
"src": "13836:3:1"
},
{
"kind": "number",
"nativeSrc": "13841:2:1",
"nodeType": "YulLiteral",
"src": "13841:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "13832:3:1",
"nodeType": "YulIdentifier",
"src": "13832:3:1"
},
"nativeSrc": "13832:12:1",
"nodeType": "YulFunctionCall",
"src": "13832:12:1"
},
"variableNames": [
{
"name": "end",
"nativeSrc": "13825:3:1",
"nodeType": "YulIdentifier",
"src": "13825:3:1"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack",
"nativeSrc": "13484:366:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nativeSrc": "13618:3:1",
"nodeType": "YulTypedName",
"src": "13618:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nativeSrc": "13626:3:1",
"nodeType": "YulTypedName",
"src": "13626:3:1",
"type": ""
}
],
"src": "13484:366:1"
},
{
"body": {
"nativeSrc": "14027:248:1",
"nodeType": "YulBlock",
"src": "14027:248:1",
"statements": [
{
"nativeSrc": "14037:26:1",
"nodeType": "YulAssignment",
"src": "14037:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "14049:9:1",
"nodeType": "YulIdentifier",
"src": "14049:9:1"
},
{
"kind": "number",
"nativeSrc": "14060:2:1",
"nodeType": "YulLiteral",
"src": "14060:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "14045:3:1",
"nodeType": "YulIdentifier",
"src": "14045:3:1"
},
"nativeSrc": "14045:18:1",
"nodeType": "YulFunctionCall",
"src": "14045:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "14037:4:1",
"nodeType": "YulIdentifier",
"src": "14037:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "14084:9:1",
"nodeType": "YulIdentifier",
"src": "14084:9:1"
},
{
"kind": "number",
"nativeSrc": "14095:1:1",
"nodeType": "YulLiteral",
"src": "14095:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "14080:3:1",
"nodeType": "YulIdentifier",
"src": "14080:3:1"
},
"nativeSrc": "14080:17:1",
"nodeType": "YulFunctionCall",
"src": "14080:17:1"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "14103:4:1",
"nodeType": "YulIdentifier",
"src": "14103:4:1"
},
{
"name": "headStart",
"nativeSrc": "14109:9:1",
"nodeType": "YulIdentifier",
"src": "14109:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "14099:3:1",
"nodeType": "YulIdentifier",
"src": "14099:3:1"
},
"nativeSrc": "14099:20:1",
"nodeType": "YulFunctionCall",
"src": "14099:20:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "14073:6:1",
"nodeType": "YulIdentifier",
"src": "14073:6:1"
},
"nativeSrc": "14073:47:1",
"nodeType": "YulFunctionCall",
"src": "14073:47:1"
},
"nativeSrc": "14073:47:1",
"nodeType": "YulExpressionStatement",
"src": "14073:47:1"
},
{
"nativeSrc": "14129:139:1",
"nodeType": "YulAssignment",
"src": "14129:139:1",
"value": {
"arguments": [
{
"name": "tail",
"nativeSrc": "14263:4:1",
"nodeType": "YulIdentifier",
"src": "14263:4:1"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack",
"nativeSrc": "14137:124:1",
"nodeType": "YulIdentifier",
"src": "14137:124:1"
},
"nativeSrc": "14137:131:1",
"nodeType": "YulFunctionCall",
"src": "14137:131:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "14129:4:1",
"nodeType": "YulIdentifier",
"src": "14129:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e__to_t_string_memory_ptr__fromStack_reversed",
"nativeSrc": "13856:419:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "14007:9:1",
"nodeType": "YulTypedName",
"src": "14007:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "14022:4:1",
"nodeType": "YulTypedName",
"src": "14022:4:1",
"type": ""
}
],
"src": "13856:419:1"
},
{
"body": {
"nativeSrc": "14325:147:1",
"nodeType": "YulBlock",
"src": "14325:147:1",
"statements": [
{
"nativeSrc": "14335:25:1",
"nodeType": "YulAssignment",
"src": "14335:25:1",
"value": {
"arguments": [
{
"name": "x",
"nativeSrc": "14358:1:1",
"nodeType": "YulIdentifier",
"src": "14358:1:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "14340:17:1",
"nodeType": "YulIdentifier",
"src": "14340:17:1"
},
"nativeSrc": "14340:20:1",
"nodeType": "YulFunctionCall",
"src": "14340:20:1"
},
"variableNames": [
{
"name": "x",
"nativeSrc": "14335:1:1",
"nodeType": "YulIdentifier",
"src": "14335:1:1"
}
]
},
{
"nativeSrc": "14369:25:1",
"nodeType": "YulAssignment",
"src": "14369:25:1",
"value": {
"arguments": [
{
"name": "y",
"nativeSrc": "14392:1:1",
"nodeType": "YulIdentifier",
"src": "14392:1:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "14374:17:1",
"nodeType": "YulIdentifier",
"src": "14374:17:1"
},
"nativeSrc": "14374:20:1",
"nodeType": "YulFunctionCall",
"src": "14374:20:1"
},
"variableNames": [
{
"name": "y",
"nativeSrc": "14369:1:1",
"nodeType": "YulIdentifier",
"src": "14369:1:1"
}
]
},
{
"nativeSrc": "14403:16:1",
"nodeType": "YulAssignment",
"src": "14403:16:1",
"value": {
"arguments": [
{
"name": "x",
"nativeSrc": "14414:1:1",
"nodeType": "YulIdentifier",
"src": "14414:1:1"
},
{
"name": "y",
"nativeSrc": "14417:1:1",
"nodeType": "YulIdentifier",
"src": "14417:1:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "14410:3:1",
"nodeType": "YulIdentifier",
"src": "14410:3:1"
},
"nativeSrc": "14410:9:1",
"nodeType": "YulFunctionCall",
"src": "14410:9:1"
},
"variableNames": [
{
"name": "sum",
"nativeSrc": "14403:3:1",
"nodeType": "YulIdentifier",
"src": "14403:3:1"
}
]
},
{
"body": {
"nativeSrc": "14443:22:1",
"nodeType": "YulBlock",
"src": "14443:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nativeSrc": "14445:16:1",
"nodeType": "YulIdentifier",
"src": "14445:16:1"
},
"nativeSrc": "14445:18:1",
"nodeType": "YulFunctionCall",
"src": "14445:18:1"
},
"nativeSrc": "14445:18:1",
"nodeType": "YulExpressionStatement",
"src": "14445:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "x",
"nativeSrc": "14435:1:1",
"nodeType": "YulIdentifier",
"src": "14435:1:1"
},
{
"name": "sum",
"nativeSrc": "14438:3:1",
"nodeType": "YulIdentifier",
"src": "14438:3:1"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "14432:2:1",
"nodeType": "YulIdentifier",
"src": "14432:2:1"
},
"nativeSrc": "14432:10:1",
"nodeType": "YulFunctionCall",
"src": "14432:10:1"
},
"nativeSrc": "14429:36:1",
"nodeType": "YulIf",
"src": "14429:36:1"
}
]
},
"name": "checked_add_t_uint256",
"nativeSrc": "14281:191:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nativeSrc": "14312:1:1",
"nodeType": "YulTypedName",
"src": "14312:1:1",
"type": ""
},
{
"name": "y",
"nativeSrc": "14315:1:1",
"nodeType": "YulTypedName",
"src": "14315:1:1",
"type": ""
}
],
"returnVariables": [
{
"name": "sum",
"nativeSrc": "14321:3:1",
"nodeType": "YulTypedName",
"src": "14321:3:1",
"type": ""
}
],
"src": "14281:191:1"
},
{
"body": {
"nativeSrc": "14584:71:1",
"nodeType": "YulBlock",
"src": "14584:71:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nativeSrc": "14606:6:1",
"nodeType": "YulIdentifier",
"src": "14606:6:1"
},
{
"kind": "number",
"nativeSrc": "14614:1:1",
"nodeType": "YulLiteral",
"src": "14614:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "14602:3:1",
"nodeType": "YulIdentifier",
"src": "14602:3:1"
},
"nativeSrc": "14602:14:1",
"nodeType": "YulFunctionCall",
"src": "14602:14:1"
},
{
"hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77",
"kind": "string",
"nativeSrc": "14618:29:1",
"nodeType": "YulLiteral",
"src": "14618:29:1",
"type": "",
"value": "SafeMath: addition overflow"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "14595:6:1",
"nodeType": "YulIdentifier",
"src": "14595:6:1"
},
"nativeSrc": "14595:53:1",
"nodeType": "YulFunctionCall",
"src": "14595:53:1"
},
"nativeSrc": "14595:53:1",
"nodeType": "YulExpressionStatement",
"src": "14595:53:1"
}
]
},
"name": "store_literal_in_memory_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"nativeSrc": "14478:177:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nativeSrc": "14576:6:1",
"nodeType": "YulTypedName",
"src": "14576:6:1",
"type": ""
}
],
"src": "14478:177:1"
},
{
"body": {
"nativeSrc": "14807:220:1",
"nodeType": "YulBlock",
"src": "14807:220:1",
"statements": [
{
"nativeSrc": "14817:74:1",
"nodeType": "YulAssignment",
"src": "14817:74:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "14883:3:1",
"nodeType": "YulIdentifier",
"src": "14883:3:1"
},
{
"kind": "number",
"nativeSrc": "14888:2:1",
"nodeType": "YulLiteral",
"src": "14888:2:1",
"type": "",
"value": "27"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "14824:58:1",
"nodeType": "YulIdentifier",
"src": "14824:58:1"
},
"nativeSrc": "14824:67:1",
"nodeType": "YulFunctionCall",
"src": "14824:67:1"
},
"variableNames": [
{
"name": "pos",
"nativeSrc": "14817:3:1",
"nodeType": "YulIdentifier",
"src": "14817:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "14989:3:1",
"nodeType": "YulIdentifier",
"src": "14989:3:1"
}
],
"functionName": {
"name": "store_literal_in_memory_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"nativeSrc": "14900:88:1",
"nodeType": "YulIdentifier",
"src": "14900:88:1"
},
"nativeSrc": "14900:93:1",
"nodeType": "YulFunctionCall",
"src": "14900:93:1"
},
"nativeSrc": "14900:93:1",
"nodeType": "YulExpressionStatement",
"src": "14900:93:1"
},
{
"nativeSrc": "15002:19:1",
"nodeType": "YulAssignment",
"src": "15002:19:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "15013:3:1",
"nodeType": "YulIdentifier",
"src": "15013:3:1"
},
{
"kind": "number",
"nativeSrc": "15018:2:1",
"nodeType": "YulLiteral",
"src": "15018:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "15009:3:1",
"nodeType": "YulIdentifier",
"src": "15009:3:1"
},
"nativeSrc": "15009:12:1",
"nodeType": "YulFunctionCall",
"src": "15009:12:1"
},
"variableNames": [
{
"name": "end",
"nativeSrc": "15002:3:1",
"nodeType": "YulIdentifier",
"src": "15002:3:1"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a_to_t_string_memory_ptr_fromStack",
"nativeSrc": "14661:366:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nativeSrc": "14795:3:1",
"nodeType": "YulTypedName",
"src": "14795:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nativeSrc": "14803:3:1",
"nodeType": "YulTypedName",
"src": "14803:3:1",
"type": ""
}
],
"src": "14661:366:1"
},
{
"body": {
"nativeSrc": "15204:248:1",
"nodeType": "YulBlock",
"src": "15204:248:1",
"statements": [
{
"nativeSrc": "15214:26:1",
"nodeType": "YulAssignment",
"src": "15214:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "15226:9:1",
"nodeType": "YulIdentifier",
"src": "15226:9:1"
},
{
"kind": "number",
"nativeSrc": "15237:2:1",
"nodeType": "YulLiteral",
"src": "15237:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "15222:3:1",
"nodeType": "YulIdentifier",
"src": "15222:3:1"
},
"nativeSrc": "15222:18:1",
"nodeType": "YulFunctionCall",
"src": "15222:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "15214:4:1",
"nodeType": "YulIdentifier",
"src": "15214:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "15261:9:1",
"nodeType": "YulIdentifier",
"src": "15261:9:1"
},
{
"kind": "number",
"nativeSrc": "15272:1:1",
"nodeType": "YulLiteral",
"src": "15272:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "15257:3:1",
"nodeType": "YulIdentifier",
"src": "15257:3:1"
},
"nativeSrc": "15257:17:1",
"nodeType": "YulFunctionCall",
"src": "15257:17:1"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "15280:4:1",
"nodeType": "YulIdentifier",
"src": "15280:4:1"
},
{
"name": "headStart",
"nativeSrc": "15286:9:1",
"nodeType": "YulIdentifier",
"src": "15286:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "15276:3:1",
"nodeType": "YulIdentifier",
"src": "15276:3:1"
},
"nativeSrc": "15276:20:1",
"nodeType": "YulFunctionCall",
"src": "15276:20:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "15250:6:1",
"nodeType": "YulIdentifier",
"src": "15250:6:1"
},
"nativeSrc": "15250:47:1",
"nodeType": "YulFunctionCall",
"src": "15250:47:1"
},
"nativeSrc": "15250:47:1",
"nodeType": "YulExpressionStatement",
"src": "15250:47:1"
},
{
"nativeSrc": "15306:139:1",
"nodeType": "YulAssignment",
"src": "15306:139:1",
"value": {
"arguments": [
{
"name": "tail",
"nativeSrc": "15440:4:1",
"nodeType": "YulIdentifier",
"src": "15440:4:1"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a_to_t_string_memory_ptr_fromStack",
"nativeSrc": "15314:124:1",
"nodeType": "YulIdentifier",
"src": "15314:124:1"
},
"nativeSrc": "15314:131:1",
"nodeType": "YulFunctionCall",
"src": "15314:131:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "15306:4:1",
"nodeType": "YulIdentifier",
"src": "15306:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a__to_t_string_memory_ptr__fromStack_reversed",
"nativeSrc": "15033:419:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "15184:9:1",
"nodeType": "YulTypedName",
"src": "15184:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "15199:4:1",
"nodeType": "YulTypedName",
"src": "15199:4:1",
"type": ""
}
],
"src": "15033:419:1"
},
{
"body": {
"nativeSrc": "15523:53:1",
"nodeType": "YulBlock",
"src": "15523:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "15540:3:1",
"nodeType": "YulIdentifier",
"src": "15540:3:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "15563:5:1",
"nodeType": "YulIdentifier",
"src": "15563:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "15545:17:1",
"nodeType": "YulIdentifier",
"src": "15545:17:1"
},
"nativeSrc": "15545:24:1",
"nodeType": "YulFunctionCall",
"src": "15545:24:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "15533:6:1",
"nodeType": "YulIdentifier",
"src": "15533:6:1"
},
"nativeSrc": "15533:37:1",
"nodeType": "YulFunctionCall",
"src": "15533:37:1"
},
"nativeSrc": "15533:37:1",
"nodeType": "YulExpressionStatement",
"src": "15533:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "15458:118:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "15511:5:1",
"nodeType": "YulTypedName",
"src": "15511:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "15518:3:1",
"nodeType": "YulTypedName",
"src": "15518:3:1",
"type": ""
}
],
"src": "15458:118:1"
},
{
"body": {
"nativeSrc": "15680:124:1",
"nodeType": "YulBlock",
"src": "15680:124:1",
"statements": [
{
"nativeSrc": "15690:26:1",
"nodeType": "YulAssignment",
"src": "15690:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "15702:9:1",
"nodeType": "YulIdentifier",
"src": "15702:9:1"
},
{
"kind": "number",
"nativeSrc": "15713:2:1",
"nodeType": "YulLiteral",
"src": "15713:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "15698:3:1",
"nodeType": "YulIdentifier",
"src": "15698:3:1"
},
"nativeSrc": "15698:18:1",
"nodeType": "YulFunctionCall",
"src": "15698:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "15690:4:1",
"nodeType": "YulIdentifier",
"src": "15690:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nativeSrc": "15770:6:1",
"nodeType": "YulIdentifier",
"src": "15770:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "15783:9:1",
"nodeType": "YulIdentifier",
"src": "15783:9:1"
},
{
"kind": "number",
"nativeSrc": "15794:1:1",
"nodeType": "YulLiteral",
"src": "15794:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "15779:3:1",
"nodeType": "YulIdentifier",
"src": "15779:3:1"
},
"nativeSrc": "15779:17:1",
"nodeType": "YulFunctionCall",
"src": "15779:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "15726:43:1",
"nodeType": "YulIdentifier",
"src": "15726:43:1"
},
"nativeSrc": "15726:71:1",
"nodeType": "YulFunctionCall",
"src": "15726:71:1"
},
"nativeSrc": "15726:71:1",
"nodeType": "YulExpressionStatement",
"src": "15726:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nativeSrc": "15582:222:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "15652:9:1",
"nodeType": "YulTypedName",
"src": "15652:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "15664:6:1",
"nodeType": "YulTypedName",
"src": "15664:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "15675:4:1",
"nodeType": "YulTypedName",
"src": "15675:4:1",
"type": ""
}
],
"src": "15582:222:1"
}
]
},
"contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {\n revert(0, 0)\n }\n\n function revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() {\n revert(0, 0)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function finalize_allocation(memPtr, size) {\n let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function allocate_memory(size) -> memPtr {\n memPtr := allocate_unbounded()\n finalize_allocation(memPtr, size)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n size := round_up_to_mul_of_32(length)\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function copy_memory_to_memory_with_cleanup(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n mstore(add(dst, length), 0)\n }\n\n function abi_decode_available_length_t_string_memory_ptr_fromMemory(src, length, end) -> array {\n array := allocate_memory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() }\n copy_memory_to_memory_with_cleanup(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr_fromMemory(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }\n let length := mload(offset)\n array := abi_decode_available_length_t_string_memory_ptr_fromMemory(add(offset, 0x20), length, end)\n }\n\n function cleanup_t_uint8(value) -> cleaned {\n cleaned := and(value, 0xff)\n }\n\n function validator_revert_t_uint8(value) {\n if iszero(eq(value, cleanup_t_uint8(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint8_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint8(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_address(value)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_string_memory_ptrt_string_memory_ptrt_uint8t_addresst_uint256_fromMemory(headStart, dataEnd) -> value0, value1, value2, value3, value4 {\n if slt(sub(dataEnd, headStart), 160) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := mload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }\n\n value0 := abi_decode_t_string_memory_ptr_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := mload(add(headStart, 32))\n if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }\n\n value1 := abi_decode_t_string_memory_ptr_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 64\n\n value2 := abi_decode_t_uint8_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 96\n\n value3 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 128\n\n value4 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function array_dataslot_t_string_storage(ptr) -> data {\n data := ptr\n\n mstore(0, ptr)\n data := keccak256(0, 0x20)\n\n }\n\n function divide_by_32_ceil(value) -> result {\n result := div(add(value, 31), 32)\n }\n\n function shift_left_dynamic(bits, value) -> newValue {\n newValue :=\n\n shl(bits, value)\n\n }\n\n function update_byte_slice_dynamic32(value, shiftBytes, toInsert) -> result {\n let shiftBits := mul(shiftBytes, 8)\n let mask := shift_left_dynamic(shiftBits, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n toInsert := shift_left_dynamic(shiftBits, toInsert)\n value := and(value, not(mask))\n result := or(value, and(toInsert, mask))\n }\n\n function identity(value) -> ret {\n ret := value\n }\n\n function convert_t_uint256_to_t_uint256(value) -> converted {\n converted := cleanup_t_uint256(identity(cleanup_t_uint256(value)))\n }\n\n function prepare_store_t_uint256(value) -> ret {\n ret := value\n }\n\n function update_storage_value_t_uint256_to_t_uint256(slot, offset, value_0) {\n let convertedValue_0 := convert_t_uint256_to_t_uint256(value_0)\n sstore(slot, update_byte_slice_dynamic32(sload(slot), offset, prepare_store_t_uint256(convertedValue_0)))\n }\n\n function zero_value_for_split_t_uint256() -> ret {\n ret := 0\n }\n\n function storage_set_to_zero_t_uint256(slot, offset) {\n let zero_0 := zero_value_for_split_t_uint256()\n update_storage_value_t_uint256_to_t_uint256(slot, offset, zero_0)\n }\n\n function clear_storage_range_t_bytes1(start, end) {\n for {} lt(start, end) { start := add(start, 1) }\n {\n storage_set_to_zero_t_uint256(start, 0)\n }\n }\n\n function clean_up_bytearray_end_slots_t_string_storage(array, len, startIndex) {\n\n if gt(len, 31) {\n let dataArea := array_dataslot_t_string_storage(array)\n let deleteStart := add(dataArea, divide_by_32_ceil(startIndex))\n // If we are clearing array to be short byte array, we want to clear only data starting from array data area.\n if lt(startIndex, 32) { deleteStart := dataArea }\n clear_storage_range_t_bytes1(deleteStart, add(dataArea, divide_by_32_ceil(len)))\n }\n\n }\n\n function shift_right_unsigned_dynamic(bits, value) -> newValue {\n newValue :=\n\n shr(bits, value)\n\n }\n\n function mask_bytes_dynamic(data, bytes) -> result {\n let mask := not(shift_right_unsigned_dynamic(mul(8, bytes), not(0)))\n result := and(data, mask)\n }\n function extract_used_part_and_set_length_of_short_byte_array(data, len) -> used {\n // we want to save only elements that are part of the array after resizing\n // others should be set to zero\n data := mask_bytes_dynamic(data, len)\n used := or(data, mul(2, len))\n }\n function copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage(slot, src) {\n\n let newLen := array_length_t_string_memory_ptr(src)\n // Make sure array length is sane\n if gt(newLen, 0xffffffffffffffff) { panic_error_0x41() }\n\n let oldLen := extract_byte_array_length(sload(slot))\n\n // potentially truncate data\n clean_up_bytearray_end_slots_t_string_storage(slot, oldLen, newLen)\n\n let srcOffset := 0\n\n srcOffset := 0x20\n\n switch gt(newLen, 31)\n case 1 {\n let loopEnd := and(newLen, not(0x1f))\n\n let dstPtr := array_dataslot_t_string_storage(slot)\n let i := 0\n for { } lt(i, loopEnd) { i := add(i, 0x20) } {\n sstore(dstPtr, mload(add(src, srcOffset)))\n dstPtr := add(dstPtr, 1)\n srcOffset := add(srcOffset, 32)\n }\n if lt(loopEnd, newLen) {\n let lastValue := mload(add(src, srcOffset))\n sstore(dstPtr, mask_bytes_dynamic(lastValue, and(newLen, 0x1f)))\n }\n sstore(slot, add(mul(newLen, 2), 1))\n }\n default {\n let value := 0\n if newLen {\n value := mload(add(src, srcOffset))\n }\n sstore(slot, extract_used_part_and_set_length_of_short_byte_array(value, newLen))\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function shift_right_1_unsigned(value) -> newValue {\n newValue :=\n\n shr(1, value)\n\n }\n\n function checked_exp_helper(_power, _base, exponent, max) -> power, base {\n power := _power\n base := _base\n for { } gt(exponent, 1) {}\n {\n // overflow check for base * base\n if gt(base, div(max, base)) { panic_error_0x11() }\n if and(exponent, 1)\n {\n // No checks for power := mul(power, base) needed, because the check\n // for base * base above is sufficient, since:\n // |power| <= base (proof by induction) and thus:\n // |power * base| <= base * base <= max <= |min| (for signed)\n // (this is equally true for signed and unsigned exp)\n power := mul(power, base)\n }\n base := mul(base, base)\n exponent := shift_right_1_unsigned(exponent)\n }\n }\n\n function checked_exp_unsigned(base, exponent, max) -> power {\n // This function currently cannot be inlined because of the\n // \"leave\" statements. We have to improve the optimizer.\n\n // Note that 0**0 == 1\n if iszero(exponent) { power := 1 leave }\n if iszero(base) { power := 0 leave }\n\n // Specializations for small bases\n switch base\n // 0 is handled above\n case 1 { power := 1 leave }\n case 2\n {\n if gt(exponent, 255) { panic_error_0x11() }\n power := exp(2, exponent)\n if gt(power, max) { panic_error_0x11() }\n leave\n }\n if or(\n and(lt(base, 11), lt(exponent, 78)),\n and(lt(base, 307), lt(exponent, 32))\n )\n {\n power := exp(base, exponent)\n if gt(power, max) { panic_error_0x11() }\n leave\n }\n\n power, base := checked_exp_helper(1, base, exponent, max)\n\n if gt(power, div(max, base)) { panic_error_0x11() }\n power := mul(power, base)\n }\n\n function checked_exp_t_uint256_t_uint8(base, exponent) -> power {\n base := cleanup_t_uint256(base)\n exponent := cleanup_t_uint8(exponent)\n\n power := checked_exp_unsigned(base, exponent, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n\n }\n\n function checked_mul_t_uint256(x, y) -> product {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n let product_raw := mul(x, y)\n product := cleanup_t_uint256(product_raw)\n\n // overflow, if x != 0 and y != product/x\n if iszero(\n or(\n iszero(x),\n eq(y, div(product, x))\n )\n ) { panic_error_0x11() }\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: mint to the zero address\")\n\n }\n\n function abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 31)\n store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n sum := add(x, y)\n\n if gt(x, sum) { panic_error_0x11() }\n\n }\n\n function store_literal_in_memory_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a(memPtr) {\n\n mstore(add(memPtr, 0), \"SafeMath: addition overflow\")\n\n }\n\n function abi_encode_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 27)\n store_literal_in_memory_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "608060405234801562000010575f80fd5b5060405162002b8038038062002b808339818101604052810190620000369190620005ac565b620000566200004a620000e660201b60201c565b620000ed60201b60201c565b6200006782620000ed60201b60201c565b84600490816200007891906200089c565b5083600590816200008a91906200089c565b508260065f6101000a81548160ff021916908360ff1602179055505f8114620000db57620000da8284600a620000c1919062000afd565b83620000ce919062000b4d565b620001ae60201b60201c565b5b505050505062000ce9565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036200021f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002169062000bf5565b60405180910390fd5b5f8160035462000230919062000c15565b90508181101562000278576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200026f9062000c9d565b60405180910390fd5b8160035f8282546200028b919062000c15565b925050819055508160015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254620002e0919062000c15565b925050819055508273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405162000346919062000cce565b60405180910390a3505050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620003b4826200036c565b810181811067ffffffffffffffff82111715620003d657620003d56200037c565b5b80604052505050565b5f620003ea62000353565b9050620003f88282620003a9565b919050565b5f67ffffffffffffffff8211156200041a57620004196200037c565b5b62000425826200036c565b9050602081019050919050565b5f5b838110156200045157808201518184015260208101905062000434565b5f8484015250505050565b5f620004726200046c84620003fd565b620003df565b90508281526020810184848401111562000491576200049062000368565b5b6200049e84828562000432565b509392505050565b5f82601f830112620004bd57620004bc62000364565b5b8151620004cf8482602086016200045c565b91505092915050565b5f60ff82169050919050565b620004ef81620004d8565b8114620004fa575f80fd5b50565b5f815190506200050d81620004e4565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200053e8262000513565b9050919050565b620005508162000532565b81146200055b575f80fd5b50565b5f815190506200056e8162000545565b92915050565b5f819050919050565b620005888162000574565b811462000593575f80fd5b50565b5f81519050620005a6816200057d565b92915050565b5f805f805f60a08688031215620005c857620005c76200035c565b5b5f86015167ffffffffffffffff811115620005e857620005e762000360565b5b620005f688828901620004a6565b955050602086015167ffffffffffffffff8111156200061a576200061962000360565b5b6200062888828901620004a6565b94505060406200063b88828901620004fd565b93505060606200064e888289016200055e565b9250506080620006618882890162000596565b9150509295509295909350565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620006bd57607f821691505b602082108103620006d357620006d262000678565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620007377fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620006fa565b620007438683620006fa565b95508019841693508086168417925050509392505050565b5f819050919050565b5f620007846200077e620007788462000574565b6200075b565b62000574565b9050919050565b5f819050919050565b6200079f8362000764565b620007b7620007ae826200078b565b84845462000706565b825550505050565b5f90565b620007cd620007bf565b620007da81848462000794565b505050565b5b818110156200080157620007f55f82620007c3565b600181019050620007e0565b5050565b601f82111562000850576200081a81620006d9565b6200082584620006eb565b8101602085101562000835578190505b6200084d6200084485620006eb565b830182620007df565b50505b505050565b5f82821c905092915050565b5f620008725f198460080262000855565b1980831691505092915050565b5f6200088c838362000861565b9150826002028217905092915050565b620008a7826200066e565b67ffffffffffffffff811115620008c357620008c26200037c565b5b620008cf8254620006a5565b620008dc82828562000805565b5f60209050601f83116001811462000912575f8415620008fd578287015190505b6200090985826200087f565b86555062000978565b601f1984166200092286620006d9565b5f5b828110156200094b5784890151825560018201915060208501945060208101905062000924565b868310156200096b578489015162000967601f89168262000861565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f808291508390505b600185111562000a0a57808604811115620009e257620009e162000980565b5b6001851615620009f25780820291505b808102905062000a0285620009ad565b9450620009c2565b94509492505050565b5f8262000a24576001905062000af6565b8162000a33575f905062000af6565b816001811462000a4c576002811462000a575762000a8d565b600191505062000af6565b60ff84111562000a6c5762000a6b62000980565b5b8360020a91508482111562000a865762000a8562000980565b5b5062000af6565b5060208310610133831016604e8410600b841016171562000ac75782820a90508381111562000ac15762000ac062000980565b5b62000af6565b62000ad68484846001620009b9565b9250905081840481111562000af05762000aef62000980565b5b81810290505b9392505050565b5f62000b098262000574565b915062000b1683620004d8565b925062000b457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000a13565b905092915050565b5f62000b598262000574565b915062000b668362000574565b925082820262000b768162000574565b9150828204841483151762000b905762000b8f62000980565b5b5092915050565b5f82825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f62000bdd601f8362000b97565b915062000bea8262000ba7565b602082019050919050565b5f6020820190508181035f83015262000c0e8162000bcf565b9050919050565b5f62000c218262000574565b915062000c2e8362000574565b925082820190508082111562000c495762000c4862000980565b5b92915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f7700000000005f82015250565b5f62000c85601b8362000b97565b915062000c928262000c4f565b602082019050919050565b5f6020820190508181035f83015262000cb68162000c77565b9050919050565b62000cc88162000574565b82525050565b5f60208201905062000ce35f83018462000cbd565b92915050565b611e898062000cf75f395ff3fe608060405234801561000f575f80fd5b5060043610610109575f3560e01c8063715018a6116100a0578063a0712d681161006f578063a0712d68146102a5578063a457c2d7146102d5578063a9059cbb14610305578063dd62ed3e14610335578063f2fde38b1461036557610109565b8063715018a61461024357806379cc67901461024d5780638da5cb5b1461026957806395d89b411461028757610109565b8063313ce567116100dc578063313ce567146101a957806339509351146101c7578063449a52f8146101f757806370a082311461021357610109565b806306fdde031461010d578063095ea7b31461012b57806318160ddd1461015b57806323b872dd14610179575b5f80fd5b610115610381565b6040516101229190611415565b60405180910390f35b610145600480360381019061014091906114c6565b61040d565b604051610152919061151e565b60405180910390f35b610163610423565b6040516101709190611546565b60405180910390f35b610193600480360381019061018e919061155f565b610429565b6040516101a0919061151e565b60405180910390f35b6101b1610589565b6040516101be91906115ca565b60405180910390f35b6101e160048036038101906101dc91906114c6565b61059b565b6040516101ee919061151e565b60405180910390f35b610211600480360381019061020c91906114c6565b61067c565b005b61022d600480360381019061022891906115e3565b610692565b60405161023a9190611546565b60405180910390f35b61024b6106d8565b005b610267600480360381019061026291906114c6565b6106eb565b005b610271610701565b60405161027e919061161d565b60405180910390f35b61028f610728565b60405161029c9190611415565b60405180910390f35b6102bf60048036038101906102ba9190611636565b6107b4565b6040516102cc919061151e565b60405180910390f35b6102ef60048036038101906102ea91906114c6565b6107d0565b6040516102fc919061151e565b60405180910390f35b61031f600480360381019061031a91906114c6565b610924565b60405161032c919061151e565b60405180910390f35b61034f600480360381019061034a9190611661565b61093a565b60405161035c9190611546565b60405180910390f35b61037f600480360381019061037a91906115e3565b6109bc565b005b6004805461038e906116cc565b80601f01602080910402602001604051908101604052809291908181526020018280546103ba906116cc565b80156104055780601f106103dc57610100808354040283529160200191610405565b820191905f5260205f20905b8154815290600101906020018083116103e857829003601f168201915b505050505081565b5f610419338484610a3e565b6001905092915050565b60035481565b5f610435848484610c01565b8160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156104f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e79061176c565b60405180910390fd5b61057e84338460025f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461057991906117b7565b610a3e565b600190509392505050565b60065f9054906101000a900460ff1681565b5f808260025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461062191906117ea565b905082811015610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065d90611867565b60405180910390fd5b610671338583610a3e565b600191505092915050565b610684610eec565b61068e8282610f6a565b5050565b5f60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6106e0610eec565b6106e95f611101565b565b6106f3610eec565b6106fd82826111c2565b5050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60058054610735906116cc565b80601f0160208091040260200160405190810160405280929190818152602001828054610761906116cc565b80156107ac5780601f10610783576101008083540402835291602001916107ac565b820191905f5260205f20905b81548152906001019060200180831161078f57829003601f168201915b505050505081565b5f6107bd610eec565b6107c73383610f6a565b60019050919050565b5f8160025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054101561088c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610883906118f5565b60405180910390fd5b61091a33848460025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461091591906117b7565b610a3e565b6001905092915050565b5f610930338484610c01565b6001905092915050565b5f60025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b6109c4610eec565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2990611983565b60405180910390fd5b610a3b81611101565b50565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa390611a11565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1190611a9f565b60405180910390fd5b8060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610bf49190611546565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6690611b2d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610cdd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd490611bbb565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610d5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5490611c49565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da991906117b7565b925050819055505f8160015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610dfa91906117ea565b905081811015610e3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3690611867565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ede9190611546565b60405180910390a350505050565b610ef4611384565b73ffffffffffffffffffffffffffffffffffffffff16610f12610701565b73ffffffffffffffffffffffffffffffffffffffff1614610f68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5f90611cb1565b60405180910390fd5b565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610fd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fcf90611d19565b60405180910390fd5b5f81600354610fe791906117ea565b90508181101561102c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102390611867565b60405180910390fd5b8160035f82825461103d91906117ea565b925050819055508160015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461109091906117ea565b925050819055508273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110f49190611546565b60405180910390a3505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611230576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122790611da7565b60405180910390fd5b8060015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156112b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a790611e35565b60405180910390fd5b8060015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112fc91906117b7565b925050819055508060035f82825461131491906117b7565b925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516113789190611546565b60405180910390a35050565b5f33905090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156113c25780820151818401526020810190506113a7565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6113e78261138b565b6113f18185611395565b93506114018185602086016113a5565b61140a816113cd565b840191505092915050565b5f6020820190508181035f83015261142d81846113dd565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61146282611439565b9050919050565b61147281611458565b811461147c575f80fd5b50565b5f8135905061148d81611469565b92915050565b5f819050919050565b6114a581611493565b81146114af575f80fd5b50565b5f813590506114c08161149c565b92915050565b5f80604083850312156114dc576114db611435565b5b5f6114e98582860161147f565b92505060206114fa858286016114b2565b9150509250929050565b5f8115159050919050565b61151881611504565b82525050565b5f6020820190506115315f83018461150f565b92915050565b61154081611493565b82525050565b5f6020820190506115595f830184611537565b92915050565b5f805f6060848603121561157657611575611435565b5b5f6115838682870161147f565b93505060206115948682870161147f565b92505060406115a5868287016114b2565b9150509250925092565b5f60ff82169050919050565b6115c4816115af565b82525050565b5f6020820190506115dd5f8301846115bb565b92915050565b5f602082840312156115f8576115f7611435565b5b5f6116058482850161147f565b91505092915050565b61161781611458565b82525050565b5f6020820190506116305f83018461160e565b92915050565b5f6020828403121561164b5761164a611435565b5b5f611658848285016114b2565b91505092915050565b5f806040838503121561167757611676611435565b5b5f6116848582860161147f565b92505060206116958582860161147f565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806116e357607f821691505b6020821081036116f6576116f561169f565b5b50919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320615f8201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b5f611756602883611395565b9150611761826116fc565b604082019050919050565b5f6020820190508181035f8301526117838161174a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6117c182611493565b91506117cc83611493565b92508282039050818111156117e4576117e361178a565b5b92915050565b5f6117f482611493565b91506117ff83611493565b92508282019050808211156118175761181661178a565b5b92915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f7700000000005f82015250565b5f611851601b83611395565b915061185c8261181d565b602082019050919050565b5f6020820190508181035f83015261187e81611845565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f6118df602583611395565b91506118ea82611885565b604082019050919050565b5f6020820190508181035f83015261190c816118d3565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61196d602683611395565b915061197882611913565b604082019050919050565b5f6020820190508181035f83015261199a81611961565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f6119fb602483611395565b9150611a06826119a1565b604082019050919050565b5f6020820190508181035f830152611a28816119ef565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f611a89602283611395565b9150611a9482611a2f565b604082019050919050565b5f6020820190508181035f830152611ab681611a7d565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611b17602583611395565b9150611b2282611abd565b604082019050919050565b5f6020820190508181035f830152611b4481611b0b565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f611ba5602383611395565b9150611bb082611b4b565b604082019050919050565b5f6020820190508181035f830152611bd281611b99565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f611c33602683611395565b9150611c3e82611bd9565b604082019050919050565b5f6020820190508181035f830152611c6081611c27565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611c9b602083611395565b9150611ca682611c67565b602082019050919050565b5f6020820190508181035f830152611cc881611c8f565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f611d03601f83611395565b9150611d0e82611ccf565b602082019050919050565b5f6020820190508181035f830152611d3081611cf7565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f206164647265735f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f611d91602183611395565b9150611d9c82611d37565b604082019050919050565b5f6020820190508181035f830152611dbe81611d85565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e5f8201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b5f611e1f602283611395565b9150611e2a82611dc5565b604082019050919050565b5f6020820190508181035f830152611e4c81611e13565b905091905056fea2646970667358221220f8c614450ffc59dc69c819e54b8040db3cb5d16a605b5e3094e52cc62930a74864736f6c63430008160033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x10 JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x2B80 CODESIZE SUB DUP1 PUSH3 0x2B80 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH3 0x36 SWAP2 SWAP1 PUSH3 0x5AC JUMP JUMPDEST PUSH3 0x56 PUSH3 0x4A PUSH3 0xE6 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0xED PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x67 DUP3 PUSH3 0xED PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST DUP5 PUSH1 0x4 SWAP1 DUP2 PUSH3 0x78 SWAP2 SWAP1 PUSH3 0x89C JUMP JUMPDEST POP DUP4 PUSH1 0x5 SWAP1 DUP2 PUSH3 0x8A SWAP2 SWAP1 PUSH3 0x89C JUMP JUMPDEST POP DUP3 PUSH1 0x6 PUSH0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 PUSH1 0xFF AND MUL OR SWAP1 SSTORE POP PUSH0 DUP2 EQ PUSH3 0xDB JUMPI PUSH3 0xDA DUP3 DUP5 PUSH1 0xA PUSH3 0xC1 SWAP2 SWAP1 PUSH3 0xAFD JUMP JUMPDEST DUP4 PUSH3 0xCE SWAP2 SWAP1 PUSH3 0xB4D JUMP JUMPDEST PUSH3 0x1AE PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST JUMPDEST POP POP POP POP POP PUSH3 0xCE9 JUMP JUMPDEST PUSH0 CALLER SWAP1 POP SWAP1 JUMP JUMPDEST PUSH0 DUP1 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 PUSH0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH3 0x21F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH3 0x216 SWAP1 PUSH3 0xBF5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 DUP2 PUSH1 0x3 SLOAD PUSH3 0x230 SWAP2 SWAP1 PUSH3 0xC15 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 LT ISZERO PUSH3 0x278 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH3 0x26F SWAP1 PUSH3 0xC9D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 PUSH1 0x3 PUSH0 DUP3 DUP3 SLOAD PUSH3 0x28B SWAP2 SWAP1 PUSH3 0xC15 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP2 PUSH1 0x1 PUSH0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 DUP3 DUP3 SLOAD PUSH3 0x2E0 SWAP2 SWAP1 PUSH3 0xC15 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP5 PUSH1 0x40 MLOAD PUSH3 0x346 SWAP2 SWAP1 PUSH3 0xCCE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x40 MLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH3 0x3B4 DUP3 PUSH3 0x36C JUMP JUMPDEST DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH3 0x3D6 JUMPI PUSH3 0x3D5 PUSH3 0x37C JUMP JUMPDEST JUMPDEST DUP1 PUSH1 0x40 MSTORE POP POP POP JUMP JUMPDEST PUSH0 PUSH3 0x3EA PUSH3 0x353 JUMP JUMPDEST SWAP1 POP PUSH3 0x3F8 DUP3 DUP3 PUSH3 0x3A9 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH3 0x41A JUMPI PUSH3 0x419 PUSH3 0x37C JUMP JUMPDEST JUMPDEST PUSH3 0x425 DUP3 PUSH3 0x36C JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH3 0x451 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH3 0x434 JUMP JUMPDEST PUSH0 DUP5 DUP5 ADD MSTORE POP POP POP POP JUMP JUMPDEST PUSH0 PUSH3 0x472 PUSH3 0x46C DUP5 PUSH3 0x3FD JUMP JUMPDEST PUSH3 0x3DF JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH3 0x491 JUMPI PUSH3 0x490 PUSH3 0x368 JUMP JUMPDEST JUMPDEST PUSH3 0x49E DUP5 DUP3 DUP6 PUSH3 0x432 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x4BD JUMPI PUSH3 0x4BC PUSH3 0x364 JUMP JUMPDEST JUMPDEST DUP2 MLOAD PUSH3 0x4CF DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH3 0x45C JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0xFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0x4EF DUP2 PUSH3 0x4D8 JUMP JUMPDEST DUP2 EQ PUSH3 0x4FA JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 MLOAD SWAP1 POP PUSH3 0x50D DUP2 PUSH3 0x4E4 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH3 0x53E DUP3 PUSH3 0x513 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0x550 DUP2 PUSH3 0x532 JUMP JUMPDEST DUP2 EQ PUSH3 0x55B JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 MLOAD SWAP1 POP PUSH3 0x56E DUP2 PUSH3 0x545 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0x588 DUP2 PUSH3 0x574 JUMP JUMPDEST DUP2 EQ PUSH3 0x593 JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 MLOAD SWAP1 POP PUSH3 0x5A6 DUP2 PUSH3 0x57D JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 PUSH0 DUP1 PUSH0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH3 0x5C8 JUMPI PUSH3 0x5C7 PUSH3 0x35C JUMP JUMPDEST JUMPDEST PUSH0 DUP7 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH3 0x5E8 JUMPI PUSH3 0x5E7 PUSH3 0x360 JUMP JUMPDEST JUMPDEST PUSH3 0x5F6 DUP9 DUP3 DUP10 ADD PUSH3 0x4A6 JUMP JUMPDEST SWAP6 POP POP PUSH1 0x20 DUP7 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH3 0x61A JUMPI PUSH3 0x619 PUSH3 0x360 JUMP JUMPDEST JUMPDEST PUSH3 0x628 DUP9 DUP3 DUP10 ADD PUSH3 0x4A6 JUMP JUMPDEST SWAP5 POP POP PUSH1 0x40 PUSH3 0x63B DUP9 DUP3 DUP10 ADD PUSH3 0x4FD JUMP JUMPDEST SWAP4 POP POP PUSH1 0x60 PUSH3 0x64E DUP9 DUP3 DUP10 ADD PUSH3 0x55E JUMP JUMPDEST SWAP3 POP POP PUSH1 0x80 PUSH3 0x661 DUP9 DUP3 DUP10 ADD PUSH3 0x596 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH3 0x6BD JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH3 0x6D3 JUMPI PUSH3 0x6D2 PUSH3 0x678 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP DUP2 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 PUSH1 0x1F DUP4 ADD DIV SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 DUP3 SHL SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x8 DUP4 MUL PUSH3 0x737 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 PUSH3 0x6FA JUMP JUMPDEST PUSH3 0x743 DUP7 DUP4 PUSH3 0x6FA JUMP JUMPDEST SWAP6 POP DUP1 NOT DUP5 AND SWAP4 POP DUP1 DUP7 AND DUP5 OR SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH3 0x784 PUSH3 0x77E PUSH3 0x778 DUP5 PUSH3 0x574 JUMP JUMPDEST PUSH3 0x75B JUMP JUMPDEST PUSH3 0x574 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0x79F DUP4 PUSH3 0x764 JUMP JUMPDEST PUSH3 0x7B7 PUSH3 0x7AE DUP3 PUSH3 0x78B JUMP JUMPDEST DUP5 DUP5 SLOAD PUSH3 0x706 JUMP JUMPDEST DUP3 SSTORE POP POP POP POP JUMP JUMPDEST PUSH0 SWAP1 JUMP JUMPDEST PUSH3 0x7CD PUSH3 0x7BF JUMP JUMPDEST PUSH3 0x7DA DUP2 DUP5 DUP5 PUSH3 0x794 JUMP JUMPDEST POP POP POP JUMP JUMPDEST JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x801 JUMPI PUSH3 0x7F5 PUSH0 DUP3 PUSH3 0x7C3 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH3 0x7E0 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1F DUP3 GT ISZERO PUSH3 0x850 JUMPI PUSH3 0x81A DUP2 PUSH3 0x6D9 JUMP JUMPDEST PUSH3 0x825 DUP5 PUSH3 0x6EB JUMP JUMPDEST DUP2 ADD PUSH1 0x20 DUP6 LT ISZERO PUSH3 0x835 JUMPI DUP2 SWAP1 POP JUMPDEST PUSH3 0x84D PUSH3 0x844 DUP6 PUSH3 0x6EB JUMP JUMPDEST DUP4 ADD DUP3 PUSH3 0x7DF JUMP JUMPDEST POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH0 DUP3 DUP3 SHR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH3 0x872 PUSH0 NOT DUP5 PUSH1 0x8 MUL PUSH3 0x855 JUMP JUMPDEST NOT DUP1 DUP4 AND SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH3 0x88C DUP4 DUP4 PUSH3 0x861 JUMP JUMPDEST SWAP2 POP DUP3 PUSH1 0x2 MUL DUP3 OR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x8A7 DUP3 PUSH3 0x66E JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH3 0x8C3 JUMPI PUSH3 0x8C2 PUSH3 0x37C JUMP JUMPDEST JUMPDEST PUSH3 0x8CF DUP3 SLOAD PUSH3 0x6A5 JUMP JUMPDEST PUSH3 0x8DC DUP3 DUP3 DUP6 PUSH3 0x805 JUMP JUMPDEST PUSH0 PUSH1 0x20 SWAP1 POP PUSH1 0x1F DUP4 GT PUSH1 0x1 DUP2 EQ PUSH3 0x912 JUMPI PUSH0 DUP5 ISZERO PUSH3 0x8FD JUMPI DUP3 DUP8 ADD MLOAD SWAP1 POP JUMPDEST PUSH3 0x909 DUP6 DUP3 PUSH3 0x87F JUMP JUMPDEST DUP7 SSTORE POP PUSH3 0x978 JUMP JUMPDEST PUSH1 0x1F NOT DUP5 AND PUSH3 0x922 DUP7 PUSH3 0x6D9 JUMP JUMPDEST PUSH0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH3 0x94B JUMPI DUP5 DUP10 ADD MLOAD DUP3 SSTORE PUSH1 0x1 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP6 ADD SWAP5 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH3 0x924 JUMP JUMPDEST DUP7 DUP4 LT ISZERO PUSH3 0x96B JUMPI DUP5 DUP10 ADD MLOAD PUSH3 0x967 PUSH1 0x1F DUP10 AND DUP3 PUSH3 0x861 JUMP JUMPDEST DUP4 SSTORE POP JUMPDEST PUSH1 0x1 PUSH1 0x2 DUP9 MUL ADD DUP9 SSTORE POP POP POP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH0 DUP2 PUSH1 0x1 SHR SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP1 DUP3 SWAP2 POP DUP4 SWAP1 POP JUMPDEST PUSH1 0x1 DUP6 GT ISZERO PUSH3 0xA0A JUMPI DUP1 DUP7 DIV DUP2 GT ISZERO PUSH3 0x9E2 JUMPI PUSH3 0x9E1 PUSH3 0x980 JUMP JUMPDEST JUMPDEST PUSH1 0x1 DUP6 AND ISZERO PUSH3 0x9F2 JUMPI DUP1 DUP3 MUL SWAP2 POP JUMPDEST DUP1 DUP2 MUL SWAP1 POP PUSH3 0xA02 DUP6 PUSH3 0x9AD JUMP JUMPDEST SWAP5 POP PUSH3 0x9C2 JUMP JUMPDEST SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP3 PUSH3 0xA24 JUMPI PUSH1 0x1 SWAP1 POP PUSH3 0xAF6 JUMP JUMPDEST DUP2 PUSH3 0xA33 JUMPI PUSH0 SWAP1 POP PUSH3 0xAF6 JUMP JUMPDEST DUP2 PUSH1 0x1 DUP2 EQ PUSH3 0xA4C JUMPI PUSH1 0x2 DUP2 EQ PUSH3 0xA57 JUMPI PUSH3 0xA8D JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP PUSH3 0xAF6 JUMP JUMPDEST PUSH1 0xFF DUP5 GT ISZERO PUSH3 0xA6C JUMPI PUSH3 0xA6B PUSH3 0x980 JUMP JUMPDEST JUMPDEST DUP4 PUSH1 0x2 EXP SWAP2 POP DUP5 DUP3 GT ISZERO PUSH3 0xA86 JUMPI PUSH3 0xA85 PUSH3 0x980 JUMP JUMPDEST JUMPDEST POP PUSH3 0xAF6 JUMP JUMPDEST POP PUSH1 0x20 DUP4 LT PUSH2 0x133 DUP4 LT AND PUSH1 0x4E DUP5 LT PUSH1 0xB DUP5 LT AND OR ISZERO PUSH3 0xAC7 JUMPI DUP3 DUP3 EXP SWAP1 POP DUP4 DUP2 GT ISZERO PUSH3 0xAC1 JUMPI PUSH3 0xAC0 PUSH3 0x980 JUMP JUMPDEST JUMPDEST PUSH3 0xAF6 JUMP JUMPDEST PUSH3 0xAD6 DUP5 DUP5 DUP5 PUSH1 0x1 PUSH3 0x9B9 JUMP JUMPDEST SWAP3 POP SWAP1 POP DUP2 DUP5 DIV DUP2 GT ISZERO PUSH3 0xAF0 JUMPI PUSH3 0xAEF PUSH3 0x980 JUMP JUMPDEST JUMPDEST DUP2 DUP2 MUL SWAP1 POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 PUSH3 0xB09 DUP3 PUSH3 0x574 JUMP JUMPDEST SWAP2 POP PUSH3 0xB16 DUP4 PUSH3 0x4D8 JUMP JUMPDEST SWAP3 POP PUSH3 0xB45 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 DUP5 PUSH3 0xA13 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH3 0xB59 DUP3 PUSH3 0x574 JUMP JUMPDEST SWAP2 POP PUSH3 0xB66 DUP4 PUSH3 0x574 JUMP JUMPDEST SWAP3 POP DUP3 DUP3 MUL PUSH3 0xB76 DUP2 PUSH3 0x574 JUMP JUMPDEST SWAP2 POP DUP3 DUP3 DIV DUP5 EQ DUP4 ISZERO OR PUSH3 0xB90 JUMPI PUSH3 0xB8F PUSH3 0x980 JUMP JUMPDEST JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x45524332303A206D696E7420746F20746865207A65726F206164647265737300 PUSH0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH3 0xBDD PUSH1 0x1F DUP4 PUSH3 0xB97 JUMP JUMPDEST SWAP2 POP PUSH3 0xBEA DUP3 PUSH3 0xBA7 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH3 0xC0E DUP2 PUSH3 0xBCF JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH3 0xC21 DUP3 PUSH3 0x574 JUMP JUMPDEST SWAP2 POP PUSH3 0xC2E DUP4 PUSH3 0x574 JUMP JUMPDEST SWAP3 POP DUP3 DUP3 ADD SWAP1 POP DUP1 DUP3 GT ISZERO PUSH3 0xC49 JUMPI PUSH3 0xC48 PUSH3 0x980 JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH3 0xC85 PUSH1 0x1B DUP4 PUSH3 0xB97 JUMP JUMPDEST SWAP2 POP PUSH3 0xC92 DUP3 PUSH3 0xC4F JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH3 0xCB6 DUP2 PUSH3 0xC77 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0xCC8 DUP2 PUSH3 0x574 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH3 0xCE3 PUSH0 DUP4 ADD DUP5 PUSH3 0xCBD JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x1E89 DUP1 PUSH3 0xCF7 PUSH0 CODECOPY PUSH0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x109 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x715018A6 GT PUSH2 0xA0 JUMPI DUP1 PUSH4 0xA0712D68 GT PUSH2 0x6F JUMPI DUP1 PUSH4 0xA0712D68 EQ PUSH2 0x2A5 JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x2D5 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x335 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x365 JUMPI PUSH2 0x109 JUMP JUMPDEST DUP1 PUSH4 0x715018A6 EQ PUSH2 0x243 JUMPI DUP1 PUSH4 0x79CC6790 EQ PUSH2 0x24D JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x269 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x287 JUMPI PUSH2 0x109 JUMP JUMPDEST DUP1 PUSH4 0x313CE567 GT PUSH2 0xDC JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1A9 JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x1C7 JUMPI DUP1 PUSH4 0x449A52F8 EQ PUSH2 0x1F7 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x213 JUMPI PUSH2 0x109 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x10D JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x12B JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x15B JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x179 JUMPI JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0x115 PUSH2 0x381 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x122 SWAP2 SWAP1 PUSH2 0x1415 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x145 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x140 SWAP2 SWAP1 PUSH2 0x14C6 JUMP JUMPDEST PUSH2 0x40D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x152 SWAP2 SWAP1 PUSH2 0x151E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x163 PUSH2 0x423 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x170 SWAP2 SWAP1 PUSH2 0x1546 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x193 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x18E SWAP2 SWAP1 PUSH2 0x155F JUMP JUMPDEST PUSH2 0x429 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1A0 SWAP2 SWAP1 PUSH2 0x151E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1B1 PUSH2 0x589 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1BE SWAP2 SWAP1 PUSH2 0x15CA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1E1 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x1DC SWAP2 SWAP1 PUSH2 0x14C6 JUMP JUMPDEST PUSH2 0x59B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1EE SWAP2 SWAP1 PUSH2 0x151E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x211 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x20C SWAP2 SWAP1 PUSH2 0x14C6 JUMP JUMPDEST PUSH2 0x67C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x22D PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x228 SWAP2 SWAP1 PUSH2 0x15E3 JUMP JUMPDEST PUSH2 0x692 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x23A SWAP2 SWAP1 PUSH2 0x1546 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x24B PUSH2 0x6D8 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x267 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x262 SWAP2 SWAP1 PUSH2 0x14C6 JUMP JUMPDEST PUSH2 0x6EB JUMP JUMPDEST STOP JUMPDEST PUSH2 0x271 PUSH2 0x701 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x27E SWAP2 SWAP1 PUSH2 0x161D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x28F PUSH2 0x728 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x29C SWAP2 SWAP1 PUSH2 0x1415 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2BF PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x2BA SWAP2 SWAP1 PUSH2 0x1636 JUMP JUMPDEST PUSH2 0x7B4 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x2CC SWAP2 SWAP1 PUSH2 0x151E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2EF PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x2EA SWAP2 SWAP1 PUSH2 0x14C6 JUMP JUMPDEST PUSH2 0x7D0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x2FC SWAP2 SWAP1 PUSH2 0x151E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x31F PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x31A SWAP2 SWAP1 PUSH2 0x14C6 JUMP JUMPDEST PUSH2 0x924 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x32C SWAP2 SWAP1 PUSH2 0x151E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x34F PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x34A SWAP2 SWAP1 PUSH2 0x1661 JUMP JUMPDEST PUSH2 0x93A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x35C SWAP2 SWAP1 PUSH2 0x1546 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x37F PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x37A SWAP2 SWAP1 PUSH2 0x15E3 JUMP JUMPDEST PUSH2 0x9BC JUMP JUMPDEST STOP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH2 0x38E SWAP1 PUSH2 0x16CC JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x3BA SWAP1 PUSH2 0x16CC JUMP JUMPDEST DUP1 ISZERO PUSH2 0x405 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x3DC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x405 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x3E8 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH0 PUSH2 0x419 CALLER DUP5 DUP5 PUSH2 0xA3E JUMP JUMPDEST PUSH1 0x1 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH0 PUSH2 0x435 DUP5 DUP5 DUP5 PUSH2 0xC01 JUMP JUMPDEST DUP2 PUSH1 0x2 PUSH0 DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD LT ISZERO PUSH2 0x4F0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x4E7 SWAP1 PUSH2 0x176C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x57E DUP5 CALLER DUP5 PUSH1 0x2 PUSH0 DUP10 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD PUSH2 0x579 SWAP2 SWAP1 PUSH2 0x17B7 JUMP JUMPDEST PUSH2 0xA3E JUMP JUMPDEST PUSH1 0x1 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x6 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH0 DUP1 DUP3 PUSH1 0x2 PUSH0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD PUSH2 0x621 SWAP2 SWAP1 PUSH2 0x17EA JUMP JUMPDEST SWAP1 POP DUP3 DUP2 LT ISZERO PUSH2 0x666 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x65D SWAP1 PUSH2 0x1867 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x671 CALLER DUP6 DUP4 PUSH2 0xA3E JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x684 PUSH2 0xEEC JUMP JUMPDEST PUSH2 0x68E DUP3 DUP3 PUSH2 0xF6A JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH0 PUSH1 0x1 PUSH0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x6E0 PUSH2 0xEEC JUMP JUMPDEST PUSH2 0x6E9 PUSH0 PUSH2 0x1101 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0x6F3 PUSH2 0xEEC JUMP JUMPDEST PUSH2 0x6FD DUP3 DUP3 PUSH2 0x11C2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH0 DUP1 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x5 DUP1 SLOAD PUSH2 0x735 SWAP1 PUSH2 0x16CC JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x761 SWAP1 PUSH2 0x16CC JUMP JUMPDEST DUP1 ISZERO PUSH2 0x7AC JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x783 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x7AC JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x78F JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH0 PUSH2 0x7BD PUSH2 0xEEC JUMP JUMPDEST PUSH2 0x7C7 CALLER DUP4 PUSH2 0xF6A JUMP JUMPDEST PUSH1 0x1 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 PUSH1 0x2 PUSH0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD LT ISZERO PUSH2 0x88C JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x883 SWAP1 PUSH2 0x18F5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x91A CALLER DUP5 DUP5 PUSH1 0x2 PUSH0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD PUSH2 0x915 SWAP2 SWAP1 PUSH2 0x17B7 JUMP JUMPDEST PUSH2 0xA3E JUMP JUMPDEST PUSH1 0x1 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH2 0x930 CALLER DUP5 DUP5 PUSH2 0xC01 JUMP JUMPDEST PUSH1 0x1 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x2 PUSH0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x9C4 PUSH2 0xEEC JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xA32 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xA29 SWAP1 PUSH2 0x1983 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xA3B DUP2 PUSH2 0x1101 JUMP JUMPDEST POP JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xAAC JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xAA3 SWAP1 PUSH2 0x1A11 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xB1A JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xB11 SWAP1 PUSH2 0x1A9F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x2 PUSH0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 DUP2 SWAP1 SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 DUP4 PUSH1 0x40 MLOAD PUSH2 0xBF4 SWAP2 SWAP1 PUSH2 0x1546 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xC6F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xC66 SWAP1 PUSH2 0x1B2D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xCDD JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xCD4 SWAP1 PUSH2 0x1BBB JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x1 PUSH0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD LT ISZERO PUSH2 0xD5D JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD54 SWAP1 PUSH2 0x1C49 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x1 PUSH0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 DUP3 DUP3 SLOAD PUSH2 0xDA9 SWAP2 SWAP1 PUSH2 0x17B7 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH0 DUP2 PUSH1 0x1 PUSH0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD PUSH2 0xDFA SWAP2 SWAP1 PUSH2 0x17EA JUMP JUMPDEST SWAP1 POP DUP2 DUP2 LT ISZERO PUSH2 0xE3F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE36 SWAP1 PUSH2 0x1867 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x1 PUSH0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 DUP2 SWAP1 SSTORE POP DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP5 PUSH1 0x40 MLOAD PUSH2 0xEDE SWAP2 SWAP1 PUSH2 0x1546 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH2 0xEF4 PUSH2 0x1384 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xF12 PUSH2 0x701 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xF68 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xF5F SWAP1 PUSH2 0x1CB1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xFD8 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xFCF SWAP1 PUSH2 0x1D19 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 DUP2 PUSH1 0x3 SLOAD PUSH2 0xFE7 SWAP2 SWAP1 PUSH2 0x17EA JUMP JUMPDEST SWAP1 POP DUP2 DUP2 LT ISZERO PUSH2 0x102C JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1023 SWAP1 PUSH2 0x1867 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 PUSH1 0x3 PUSH0 DUP3 DUP3 SLOAD PUSH2 0x103D SWAP2 SWAP1 PUSH2 0x17EA JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP2 PUSH1 0x1 PUSH0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 DUP3 DUP3 SLOAD PUSH2 0x1090 SWAP2 SWAP1 PUSH2 0x17EA JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP5 PUSH1 0x40 MLOAD PUSH2 0x10F4 SWAP2 SWAP1 PUSH2 0x1546 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH0 DUP1 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 PUSH0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x1230 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1227 SWAP1 PUSH2 0x1DA7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x1 PUSH0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 SLOAD LT ISZERO PUSH2 0x12B0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x12A7 SWAP1 PUSH2 0x1E35 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x1 PUSH0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH0 KECCAK256 PUSH0 DUP3 DUP3 SLOAD PUSH2 0x12FC SWAP2 SWAP1 PUSH2 0x17B7 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP1 PUSH1 0x3 PUSH0 DUP3 DUP3 SLOAD PUSH2 0x1314 SWAP2 SWAP1 PUSH2 0x17B7 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP4 PUSH1 0x40 MLOAD PUSH2 0x1378 SWAP2 SWAP1 PUSH2 0x1546 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH0 CALLER SWAP1 POP SWAP1 JUMP JUMPDEST PUSH0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x13C2 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x13A7 JUMP JUMPDEST PUSH0 DUP5 DUP5 ADD MSTORE POP POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0x13E7 DUP3 PUSH2 0x138B JUMP JUMPDEST PUSH2 0x13F1 DUP2 DUP6 PUSH2 0x1395 JUMP JUMPDEST SWAP4 POP PUSH2 0x1401 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x13A5 JUMP JUMPDEST PUSH2 0x140A DUP2 PUSH2 0x13CD JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x142D DUP2 DUP5 PUSH2 0x13DD JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0x1462 DUP3 PUSH2 0x1439 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1472 DUP2 PUSH2 0x1458 JUMP JUMPDEST DUP2 EQ PUSH2 0x147C JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x148D DUP2 PUSH2 0x1469 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x14A5 DUP2 PUSH2 0x1493 JUMP JUMPDEST DUP2 EQ PUSH2 0x14AF JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x14C0 DUP2 PUSH2 0x149C JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x14DC JUMPI PUSH2 0x14DB PUSH2 0x1435 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x14E9 DUP6 DUP3 DUP7 ADD PUSH2 0x147F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x14FA DUP6 DUP3 DUP7 ADD PUSH2 0x14B2 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 ISZERO ISZERO SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1518 DUP2 PUSH2 0x1504 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x1531 PUSH0 DUP4 ADD DUP5 PUSH2 0x150F JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x1540 DUP2 PUSH2 0x1493 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x1559 PUSH0 DUP4 ADD DUP5 PUSH2 0x1537 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 PUSH0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x1576 JUMPI PUSH2 0x1575 PUSH2 0x1435 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x1583 DUP7 DUP3 DUP8 ADD PUSH2 0x147F JUMP JUMPDEST SWAP4 POP POP PUSH1 0x20 PUSH2 0x1594 DUP7 DUP3 DUP8 ADD PUSH2 0x147F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 PUSH2 0x15A5 DUP7 DUP3 DUP8 ADD PUSH2 0x14B2 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH0 PUSH1 0xFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x15C4 DUP2 PUSH2 0x15AF JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x15DD PUSH0 DUP4 ADD DUP5 PUSH2 0x15BB JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x15F8 JUMPI PUSH2 0x15F7 PUSH2 0x1435 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x1605 DUP5 DUP3 DUP6 ADD PUSH2 0x147F JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x1617 DUP2 PUSH2 0x1458 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x1630 PUSH0 DUP4 ADD DUP5 PUSH2 0x160E JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x164B JUMPI PUSH2 0x164A PUSH2 0x1435 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x1658 DUP5 DUP3 DUP6 ADD PUSH2 0x14B2 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1677 JUMPI PUSH2 0x1676 PUSH2 0x1435 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x1684 DUP6 DUP3 DUP7 ADD PUSH2 0x147F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x1695 DUP6 DUP3 DUP7 ADD PUSH2 0x147F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x16E3 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x16F6 JUMPI PUSH2 0x16F5 PUSH2 0x169F JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A207472616E7366657220616D6F756E7420657863656564732061 PUSH0 DUP3 ADD MSTORE PUSH32 0x6C6C6F77616E6365000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1756 PUSH1 0x28 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1761 DUP3 PUSH2 0x16FC JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1783 DUP2 PUSH2 0x174A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH0 PUSH2 0x17C1 DUP3 PUSH2 0x1493 JUMP JUMPDEST SWAP2 POP PUSH2 0x17CC DUP4 PUSH2 0x1493 JUMP JUMPDEST SWAP3 POP DUP3 DUP3 SUB SWAP1 POP DUP2 DUP2 GT ISZERO PUSH2 0x17E4 JUMPI PUSH2 0x17E3 PUSH2 0x178A JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH2 0x17F4 DUP3 PUSH2 0x1493 JUMP JUMPDEST SWAP2 POP PUSH2 0x17FF DUP4 PUSH2 0x1493 JUMP JUMPDEST SWAP3 POP DUP3 DUP3 ADD SWAP1 POP DUP1 DUP3 GT ISZERO PUSH2 0x1817 JUMPI PUSH2 0x1816 PUSH2 0x178A JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1851 PUSH1 0x1B DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x185C DUP3 PUSH2 0x181D JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x187E DUP2 PUSH2 0x1845 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A2064656372656173656420616C6C6F77616E63652062656C6F77 PUSH0 DUP3 ADD MSTORE PUSH32 0x207A65726F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x18DF PUSH1 0x25 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x18EA DUP3 PUSH2 0x1885 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x190C DUP2 PUSH2 0x18D3 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4F776E61626C653A206E6577206F776E657220697320746865207A65726F2061 PUSH0 DUP3 ADD MSTORE PUSH32 0x6464726573730000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x196D PUSH1 0x26 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1978 DUP3 PUSH2 0x1913 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x199A DUP2 PUSH2 0x1961 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A20617070726F76652066726F6D20746865207A65726F20616464 PUSH0 DUP3 ADD MSTORE PUSH32 0x7265737300000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x19FB PUSH1 0x24 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1A06 DUP3 PUSH2 0x19A1 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1A28 DUP2 PUSH2 0x19EF JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A20617070726F766520746F20746865207A65726F206164647265 PUSH0 DUP3 ADD MSTORE PUSH32 0x7373000000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1A89 PUSH1 0x22 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1A94 DUP3 PUSH2 0x1A2F JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1AB6 DUP2 PUSH2 0x1A7D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A207472616E736665722066726F6D20746865207A65726F206164 PUSH0 DUP3 ADD MSTORE PUSH32 0x6472657373000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1B17 PUSH1 0x25 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1B22 DUP3 PUSH2 0x1ABD JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1B44 DUP2 PUSH2 0x1B0B JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A207472616E7366657220746F20746865207A65726F2061646472 PUSH0 DUP3 ADD MSTORE PUSH32 0x6573730000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1BA5 PUSH1 0x23 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1BB0 DUP3 PUSH2 0x1B4B JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1BD2 DUP2 PUSH2 0x1B99 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A207472616E7366657220616D6F756E7420657863656564732062 PUSH0 DUP3 ADD MSTORE PUSH32 0x616C616E63650000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1C33 PUSH1 0x26 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1C3E DUP3 PUSH2 0x1BD9 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1C60 DUP2 PUSH2 0x1C27 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4F776E61626C653A2063616C6C6572206973206E6F7420746865206F776E6572 PUSH0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1C9B PUSH1 0x20 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1CA6 DUP3 PUSH2 0x1C67 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1CC8 DUP2 PUSH2 0x1C8F JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A206D696E7420746F20746865207A65726F206164647265737300 PUSH0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1D03 PUSH1 0x1F DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1D0E DUP3 PUSH2 0x1CCF JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1D30 DUP2 PUSH2 0x1CF7 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A206275726E2066726F6D20746865207A65726F20616464726573 PUSH0 DUP3 ADD MSTORE PUSH32 0x7300000000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1D91 PUSH1 0x21 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1D9C DUP3 PUSH2 0x1D37 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1DBE DUP2 PUSH2 0x1D85 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x45524332303A206275726E20616D6F756E7420657863656564732062616C616E PUSH0 DUP3 ADD MSTORE PUSH32 0x6365000000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH0 PUSH2 0x1E1F PUSH1 0x22 DUP4 PUSH2 0x1395 JUMP JUMPDEST SWAP2 POP PUSH2 0x1E2A DUP3 PUSH2 0x1DC5 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x1E4C DUP2 PUSH2 0x1E13 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF8 0xC6 EQ GASLIMIT 0xF 0xFC MSIZE 0xDC PUSH10 0xC819E54B8040DB3CB5D1 PUSH11 0x605B5E3094E52CC62930A7 BASEFEE PUSH5 0x736F6C6343 STOP ADDMOD AND STOP CALLER ",
"sourceMap": "8321:3756:0:-:0;;;8593:282;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7475:32;7494:12;:10;;;:12;;:::i;:::-;7475:18;;;:32;;:::i;:::-;8706:26;8725:6;8706:18;;;:26;;:::i;:::-;8743:5;8736:4;:12;;;;;;:::i;:::-;;8761:7;8752:6;:16;;;;;;:::i;:::-;;8783:9;8772:8;;:20;;;;;;;;;;;;;;;;;;8814:1;8800:12;:15;8796:76;;8822:45;8828:6;8857:9;8851:2;:15;;;;:::i;:::-;8836:12;:30;;;;:::i;:::-;8822:5;;;:45;;:::i;:::-;8796:76;8593:282;;;;;8321:3756;;7084:96;7137:7;7163:10;7156:17;;7084:96;:::o;8130:187::-;8203:16;8222:6;;;;;;;;;;;8203:25;;8247:8;8238:6;;:17;;;;;;;;;;;;;;;;;;8301:8;8270:40;;8291:8;8270:40;;;;;;;;;;;;8193:124;8130:187;:::o;10918:321::-;11006:1;10987:21;;:7;:21;;;10979:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;11048:6;11071;11057:11;;:20;;;;:::i;:::-;11048:29;;11094:6;11089:1;:11;;11081:51;;;;;;;;;;;;:::i;:::-;;;;;;;;;11151:6;11136:11;;:21;;;;;;;:::i;:::-;;;;;;;;11183:6;11161:9;:18;11171:7;11161:18;;;;;;;;;;;;;;;;:28;;;;;;;:::i;:::-;;;;;;;;11219:7;11198:37;;11215:1;11198:37;;;11228:6;11198:37;;;;;;:::i;:::-;;;;;;;;10975:264;10918:321;;:::o;7:75:1:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:117;443:1;440;433:12;457:117;566:1;563;556:12;580:102;621:6;672:2;668:7;663:2;656:5;652:14;648:28;638:38;;580:102;;;:::o;688:180::-;736:77;733:1;726:88;833:4;830:1;823:15;857:4;854:1;847:15;874:281;957:27;979:4;957:27;:::i;:::-;949:6;945:40;1087:6;1075:10;1072:22;1051:18;1039:10;1036:34;1033:62;1030:88;;;1098:18;;:::i;:::-;1030:88;1138:10;1134:2;1127:22;917:238;874:281;;:::o;1161:129::-;1195:6;1222:20;;:::i;:::-;1212:30;;1251:33;1279:4;1271:6;1251:33;:::i;:::-;1161:129;;;:::o;1296:308::-;1358:4;1448:18;1440:6;1437:30;1434:56;;;1470:18;;:::i;:::-;1434:56;1508:29;1530:6;1508:29;:::i;:::-;1500:37;;1592:4;1586;1582:15;1574:23;;1296:308;;;:::o;1610:246::-;1691:1;1701:113;1715:6;1712:1;1709:13;1701:113;;;1800:1;1795:3;1791:11;1785:18;1781:1;1776:3;1772:11;1765:39;1737:2;1734:1;1730:10;1725:15;;1701:113;;;1848:1;1839:6;1834:3;1830:16;1823:27;1672:184;1610:246;;;:::o;1862:434::-;1951:5;1976:66;1992:49;2034:6;1992:49;:::i;:::-;1976:66;:::i;:::-;1967:75;;2065:6;2058:5;2051:21;2103:4;2096:5;2092:16;2141:3;2132:6;2127:3;2123:16;2120:25;2117:112;;;2148:79;;:::i;:::-;2117:112;2238:52;2283:6;2278:3;2273;2238:52;:::i;:::-;1957:339;1862:434;;;;;:::o;2316:355::-;2383:5;2432:3;2425:4;2417:6;2413:17;2409:27;2399:122;;2440:79;;:::i;:::-;2399:122;2550:6;2544:13;2575:90;2661:3;2653:6;2646:4;2638:6;2634:17;2575:90;:::i;:::-;2566:99;;2389:282;2316:355;;;;:::o;2677:86::-;2712:7;2752:4;2745:5;2741:16;2730:27;;2677:86;;;:::o;2769:118::-;2840:22;2856:5;2840:22;:::i;:::-;2833:5;2830:33;2820:61;;2877:1;2874;2867:12;2820:61;2769:118;:::o;2893:139::-;2948:5;2979:6;2973:13;2964:22;;2995:31;3020:5;2995:31;:::i;:::-;2893:139;;;;:::o;3038:126::-;3075:7;3115:42;3108:5;3104:54;3093:65;;3038:126;;;:::o;3170:96::-;3207:7;3236:24;3254:5;3236:24;:::i;:::-;3225:35;;3170:96;;;:::o;3272:122::-;3345:24;3363:5;3345:24;:::i;:::-;3338:5;3335:35;3325:63;;3384:1;3381;3374:12;3325:63;3272:122;:::o;3400:143::-;3457:5;3488:6;3482:13;3473:22;;3504:33;3531:5;3504:33;:::i;:::-;3400:143;;;;:::o;3549:77::-;3586:7;3615:5;3604:16;;3549:77;;;:::o;3632:122::-;3705:24;3723:5;3705:24;:::i;:::-;3698:5;3695:35;3685:63;;3744:1;3741;3734:12;3685:63;3632:122;:::o;3760:143::-;3817:5;3848:6;3842:13;3833:22;;3864:33;3891:5;3864:33;:::i;:::-;3760:143;;;;:::o;3909:1319::-;4033:6;4041;4049;4057;4065;4114:3;4102:9;4093:7;4089:23;4085:33;4082:120;;;4121:79;;:::i;:::-;4082:120;4262:1;4251:9;4247:17;4241:24;4292:18;4284:6;4281:30;4278:117;;;4314:79;;:::i;:::-;4278:117;4419:74;4485:7;4476:6;4465:9;4461:22;4419:74;:::i;:::-;4409:84;;4212:291;4563:2;4552:9;4548:18;4542:25;4594:18;4586:6;4583:30;4580:117;;;4616:79;;:::i;:::-;4580:117;4721:74;4787:7;4778:6;4767:9;4763:22;4721:74;:::i;:::-;4711:84;;4513:292;4844:2;4870:62;4924:7;4915:6;4904:9;4900:22;4870:62;:::i;:::-;4860:72;;4815:127;4981:2;5007:64;5063:7;5054:6;5043:9;5039:22;5007:64;:::i;:::-;4997:74;;4952:129;5120:3;5147:64;5203:7;5194:6;5183:9;5179:22;5147:64;:::i;:::-;5137:74;;5091:130;3909:1319;;;;;;;;:::o;5234:99::-;5286:6;5320:5;5314:12;5304:22;;5234:99;;;:::o;5339:180::-;5387:77;5384:1;5377:88;5484:4;5481:1;5474:15;5508:4;5505:1;5498:15;5525:320;5569:6;5606:1;5600:4;5596:12;5586:22;;5653:1;5647:4;5643:12;5674:18;5664:81;;5730:4;5722:6;5718:17;5708:27;;5664:81;5792:2;5784:6;5781:14;5761:18;5758:38;5755:84;;5811:18;;:::i;:::-;5755:84;5576:269;5525:320;;;:::o;5851:141::-;5900:4;5923:3;5915:11;;5946:3;5943:1;5936:14;5980:4;5977:1;5967:18;5959:26;;5851:141;;;:::o;5998:93::-;6035:6;6082:2;6077;6070:5;6066:14;6062:23;6052:33;;5998:93;;;:::o;6097:107::-;6141:8;6191:5;6185:4;6181:16;6160:37;;6097:107;;;;:::o;6210:393::-;6279:6;6329:1;6317:10;6313:18;6352:97;6382:66;6371:9;6352:97;:::i;:::-;6470:39;6500:8;6489:9;6470:39;:::i;:::-;6458:51;;6542:4;6538:9;6531:5;6527:21;6518:30;;6591:4;6581:8;6577:19;6570:5;6567:30;6557:40;;6286:317;;6210:393;;;;;:::o;6609:60::-;6637:3;6658:5;6651:12;;6609:60;;;:::o;6675:142::-;6725:9;6758:53;6776:34;6785:24;6803:5;6785:24;:::i;:::-;6776:34;:::i;:::-;6758:53;:::i;:::-;6745:66;;6675:142;;;:::o;6823:75::-;6866:3;6887:5;6880:12;;6823:75;;;:::o;6904:269::-;7014:39;7045:7;7014:39;:::i;:::-;7075:91;7124:41;7148:16;7124:41;:::i;:::-;7116:6;7109:4;7103:11;7075:91;:::i;:::-;7069:4;7062:105;6980:193;6904:269;;;:::o;7179:73::-;7224:3;7179:73;:::o;7258:189::-;7335:32;;:::i;:::-;7376:65;7434:6;7426;7420:4;7376:65;:::i;:::-;7311:136;7258:189;;:::o;7453:186::-;7513:120;7530:3;7523:5;7520:14;7513:120;;;7584:39;7621:1;7614:5;7584:39;:::i;:::-;7557:1;7550:5;7546:13;7537:22;;7513:120;;;7453:186;;:::o;7645:543::-;7746:2;7741:3;7738:11;7735:446;;;7780:38;7812:5;7780:38;:::i;:::-;7864:29;7882:10;7864:29;:::i;:::-;7854:8;7850:44;8047:2;8035:10;8032:18;8029:49;;;8068:8;8053:23;;8029:49;8091:80;8147:22;8165:3;8147:22;:::i;:::-;8137:8;8133:37;8120:11;8091:80;:::i;:::-;7750:431;;7735:446;7645:543;;;:::o;8194:117::-;8248:8;8298:5;8292:4;8288:16;8267:37;;8194:117;;;;:::o;8317:169::-;8361:6;8394:51;8442:1;8438:6;8430:5;8427:1;8423:13;8394:51;:::i;:::-;8390:56;8475:4;8469;8465:15;8455:25;;8368:118;8317:169;;;;:::o;8491:295::-;8567:4;8713:29;8738:3;8732:4;8713:29;:::i;:::-;8705:37;;8775:3;8772:1;8768:11;8762:4;8759:21;8751:29;;8491:295;;;;:::o;8791:1395::-;8908:37;8941:3;8908:37;:::i;:::-;9010:18;9002:6;8999:30;8996:56;;;9032:18;;:::i;:::-;8996:56;9076:38;9108:4;9102:11;9076:38;:::i;:::-;9161:67;9221:6;9213;9207:4;9161:67;:::i;:::-;9255:1;9279:4;9266:17;;9311:2;9303:6;9300:14;9328:1;9323:618;;;;9985:1;10002:6;9999:77;;;10051:9;10046:3;10042:19;10036:26;10027:35;;9999:77;10102:67;10162:6;10155:5;10102:67;:::i;:::-;10096:4;10089:81;9958:222;9293:887;;9323:618;9375:4;9371:9;9363:6;9359:22;9409:37;9441:4;9409:37;:::i;:::-;9468:1;9482:208;9496:7;9493:1;9490:14;9482:208;;;9575:9;9570:3;9566:19;9560:26;9552:6;9545:42;9626:1;9618:6;9614:14;9604:24;;9673:2;9662:9;9658:18;9645:31;;9519:4;9516:1;9512:12;9507:17;;9482:208;;;9718:6;9709:7;9706:19;9703:179;;;9776:9;9771:3;9767:19;9761:26;9819:48;9861:4;9853:6;9849:17;9838:9;9819:48;:::i;:::-;9811:6;9804:64;9726:156;9703:179;9928:1;9924;9916:6;9912:14;9908:22;9902:4;9895:36;9330:611;;;9293:887;;8883:1303;;;8791:1395;;:::o;10192:180::-;10240:77;10237:1;10230:88;10337:4;10334:1;10327:15;10361:4;10358:1;10351:15;10378:102;10420:8;10467:5;10464:1;10460:13;10439:34;;10378:102;;;:::o;10486:848::-;10547:5;10554:4;10578:6;10569:15;;10602:5;10593:14;;10616:712;10637:1;10627:8;10624:15;10616:712;;;10732:4;10727:3;10723:14;10717:4;10714:24;10711:50;;;10741:18;;:::i;:::-;10711:50;10791:1;10781:8;10777:16;10774:451;;;11206:4;11199:5;11195:16;11186:25;;10774:451;11256:4;11250;11246:15;11238:23;;11286:32;11309:8;11286:32;:::i;:::-;11274:44;;10616:712;;;10486:848;;;;;;;:::o;11340:1073::-;11394:5;11585:8;11575:40;;11606:1;11597:10;;11608:5;;11575:40;11634:4;11624:36;;11651:1;11642:10;;11653:5;;11624:36;11720:4;11768:1;11763:27;;;;11804:1;11799:191;;;;11713:277;;11763:27;11781:1;11772:10;;11783:5;;;11799:191;11844:3;11834:8;11831:17;11828:43;;;11851:18;;:::i;:::-;11828:43;11900:8;11897:1;11893:16;11884:25;;11935:3;11928:5;11925:14;11922:40;;;11942:18;;:::i;:::-;11922:40;11975:5;;;11713:277;;12099:2;12089:8;12086:16;12080:3;12074:4;12071:13;12067:36;12049:2;12039:8;12036:16;12031:2;12025:4;12022:12;12018:35;12002:111;11999:246;;;12155:8;12149:4;12145:19;12136:28;;12190:3;12183:5;12180:14;12177:40;;;12197:18;;:::i;:::-;12177:40;12230:5;;11999:246;12270:42;12308:3;12298:8;12292:4;12289:1;12270:42;:::i;:::-;12255:57;;;;12344:4;12339:3;12335:14;12328:5;12325:25;12322:51;;;12353:18;;:::i;:::-;12322:51;12402:4;12395:5;12391:16;12382:25;;11340:1073;;;;;;:::o;12419:281::-;12477:5;12501:23;12519:4;12501:23;:::i;:::-;12493:31;;12545:25;12561:8;12545:25;:::i;:::-;12533:37;;12589:104;12626:66;12616:8;12610:4;12589:104;:::i;:::-;12580:113;;12419:281;;;;:::o;12706:410::-;12746:7;12769:20;12787:1;12769:20;:::i;:::-;12764:25;;12803:20;12821:1;12803:20;:::i;:::-;12798:25;;12858:1;12855;12851:9;12880:30;12898:11;12880:30;:::i;:::-;12869:41;;13059:1;13050:7;13046:15;13043:1;13040:22;13020:1;13013:9;12993:83;12970:139;;13089:18;;:::i;:::-;12970:139;12754:362;12706:410;;;;:::o;13122:169::-;13206:11;13240:6;13235:3;13228:19;13280:4;13275:3;13271:14;13256:29;;13122:169;;;;:::o;13297:181::-;13437:33;13433:1;13425:6;13421:14;13414:57;13297:181;:::o;13484:366::-;13626:3;13647:67;13711:2;13706:3;13647:67;:::i;:::-;13640:74;;13723:93;13812:3;13723:93;:::i;:::-;13841:2;13836:3;13832:12;13825:19;;13484:366;;;:::o;13856:419::-;14022:4;14060:2;14049:9;14045:18;14037:26;;14109:9;14103:4;14099:20;14095:1;14084:9;14080:17;14073:47;14137:131;14263:4;14137:131;:::i;:::-;14129:139;;13856:419;;;:::o;14281:191::-;14321:3;14340:20;14358:1;14340:20;:::i;:::-;14335:25;;14374:20;14392:1;14374:20;:::i;:::-;14369:25;;14417:1;14414;14410:9;14403:16;;14438:3;14435:1;14432:10;14429:36;;;14445:18;;:::i;:::-;14429:36;14281:191;;;;:::o;14478:177::-;14618:29;14614:1;14606:6;14602:14;14595:53;14478:177;:::o;14661:366::-;14803:3;14824:67;14888:2;14883:3;14824:67;:::i;:::-;14817:74;;14900:93;14989:3;14900:93;:::i;:::-;15018:2;15013:3;15009:12;15002:19;;14661:366;;;:::o;15033:419::-;15199:4;15237:2;15226:9;15222:18;15214:26;;15286:9;15280:4;15276:20;15272:1;15261:9;15257:17;15250:47;15314:131;15440:4;15314:131;:::i;:::-;15306:139;;15033:419;;;:::o;15458:118::-;15545:24;15563:5;15545:24;:::i;:::-;15540:3;15533:37;15458:118;;:::o;15582:222::-;15675:4;15713:2;15702:9;15698:18;15690:26;;15726:71;15794:1;15783:9;15779:17;15770:6;15726:71;:::i;:::-;15582:222;;;;:::o;8321:3756:0:-;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@_approve_1287": {
"entryPoint": 2622,
"id": 1287,
"parameterSlots": 3,
"returnSlots": 0
},
"@_burn_1243": {
"entryPoint": 4546,
"id": 1243,
"parameterSlots": 2,
"returnSlots": 0
},
"@_checkOwner_745": {
"entryPoint": 3820,
"id": 745,
"parameterSlots": 0,
"returnSlots": 0
},
"@_mint_1197": {
"entryPoint": 3946,
"id": 1197,
"parameterSlots": 2,
"returnSlots": 0
},
"@_msgSender_688": {
"entryPoint": 4996,
"id": 688,
"parameterSlots": 0,
"returnSlots": 1
},
"@_transferOwnership_799": {
"entryPoint": 4353,
"id": 799,
"parameterSlots": 1,
"returnSlots": 0
},
"@_transfer_1147": {
"entryPoint": 3073,
"id": 1147,
"parameterSlots": 3,
"returnSlots": 0
},
"@allowance_915": {
"entryPoint": 2362,
"id": 915,
"parameterSlots": 2,
"returnSlots": 1
},
"@approve_934": {
"entryPoint": 1037,
"id": 934,
"parameterSlots": 2,
"returnSlots": 1
},
"@balanceOf_880": {
"entryPoint": 1682,
"id": 880,
"parameterSlots": 1,
"returnSlots": 1
},
"@burnFrom_1317": {
"entryPoint": 1771,
"id": 1317,
"parameterSlots": 2,
"returnSlots": 0
},
"@decimals_824": {
"entryPoint": 1417,
"id": 824,
"parameterSlots": 0,
"returnSlots": 0
},
"@decreaseAllowance_1057": {
"entryPoint": 2000,
"id": 1057,
"parameterSlots": 2,
"returnSlots": 1
},
"@increaseAllowance_1017": {
"entryPoint": 1435,
"id": 1017,
"parameterSlots": 2,
"returnSlots": 1
},
"@mintTo_1302": {
"entryPoint": 1660,
"id": 1302,
"parameterSlots": 2,
"returnSlots": 0
},
"@mint_1075": {
"entryPoint": 1972,
"id": 1075,
"parameterSlots": 1,
"returnSlots": 1
},
"@name_820": {
"entryPoint": 897,
"id": 820,
"parameterSlots": 0,
"returnSlots": 0
},
"@owner_732": {
"entryPoint": 1793,
"id": 732,
"parameterSlots": 0,
"returnSlots": 1
},
"@renounceOwnership_758": {
"entryPoint": 1752,
"id": 758,
"parameterSlots": 0,
"returnSlots": 0
},
"@symbol_822": {
"entryPoint": 1832,
"id": 822,
"parameterSlots": 0,
"returnSlots": 0
},
"@totalSupply_818": {
"entryPoint": 1059,
"id": 818,
"parameterSlots": 0,
"returnSlots": 0
},
"@transferFrom_980": {
"entryPoint": 1065,
"id": 980,
"parameterSlots": 3,
"returnSlots": 1
},
"@transferOwnership_780": {
"entryPoint": 2492,
"id": 780,
"parameterSlots": 1,
"returnSlots": 0
},
"@transfer_899": {
"entryPoint": 2340,
"id": 899,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_address": {
"entryPoint": 5247,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_uint256": {
"entryPoint": 5298,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_address": {
"entryPoint": 5603,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_addresst_address": {
"entryPoint": 5729,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_decode_tuple_t_addresst_addresst_uint256": {
"entryPoint": 5471,
"id": null,
"parameterSlots": 2,
"returnSlots": 3
},
"abi_decode_tuple_t_addresst_uint256": {
"entryPoint": 5318,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 5686,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_address_to_t_address_fromStack": {
"entryPoint": 5646,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_bool_to_t_bool_fromStack": {
"entryPoint": 5391,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack": {
"entryPoint": 5085,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack": {
"entryPoint": 7065,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd_to_t_string_memory_ptr_fromStack": {
"entryPoint": 7699,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe_to_t_string_memory_ptr_fromStack": {
"entryPoint": 6497,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack": {
"entryPoint": 6781,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a_to_t_string_memory_ptr_fromStack": {
"entryPoint": 6213,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack": {
"entryPoint": 7207,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330_to_t_string_memory_ptr_fromStack": {
"entryPoint": 5962,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe_to_t_string_memory_ptr_fromStack": {
"entryPoint": 7311,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f_to_t_string_memory_ptr_fromStack": {
"entryPoint": 7557,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack": {
"entryPoint": 6923,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack": {
"entryPoint": 6639,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack": {
"entryPoint": 6355,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack": {
"entryPoint": 7415,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 5431,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_uint8_to_t_uint8_fromStack": {
"entryPoint": 5563,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_address__to_t_address__fromStack_reversed": {
"entryPoint": 5661,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed": {
"entryPoint": 5406,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 5141,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 7099,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 7733,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 6531,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 6815,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 6247,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 7241,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 5996,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 7345,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 7591,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 6957,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 6673,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 6389,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 7449,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 5446,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed": {
"entryPoint": 5578,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"array_length_t_string_memory_ptr": {
"entryPoint": 5003,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
"entryPoint": 5013,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"checked_add_t_uint256": {
"entryPoint": 6122,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"checked_sub_t_uint256": {
"entryPoint": 6071,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"cleanup_t_address": {
"entryPoint": 5208,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_bool": {
"entryPoint": 5380,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 5177,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 5267,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint8": {
"entryPoint": 5551,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"copy_memory_to_memory_with_cleanup": {
"entryPoint": 5029,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"extract_byte_array_length": {
"entryPoint": 5836,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"panic_error_0x11": {
"entryPoint": 6026,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x22": {
"entryPoint": 5791,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 5173,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"round_up_to_mul_of_32": {
"entryPoint": 5069,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f": {
"entryPoint": 6987,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd": {
"entryPoint": 7621,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe": {
"entryPoint": 6419,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029": {
"entryPoint": 6703,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a": {
"entryPoint": 6173,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6": {
"entryPoint": 7129,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330": {
"entryPoint": 5884,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe": {
"entryPoint": 7271,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f": {
"entryPoint": 7479,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea": {
"entryPoint": 6845,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208": {
"entryPoint": 6561,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8": {
"entryPoint": 6277,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e": {
"entryPoint": 7375,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"validator_revert_t_address": {
"entryPoint": 5225,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 5276,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nativeSrc": "0:20658:1",
"nodeType": "YulBlock",
"src": "0:20658:1",
"statements": [
{
"body": {
"nativeSrc": "66:40:1",
"nodeType": "YulBlock",
"src": "66:40:1",
"statements": [
{
"nativeSrc": "77:22:1",
"nodeType": "YulAssignment",
"src": "77:22:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "93:5:1",
"nodeType": "YulIdentifier",
"src": "93:5:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "87:5:1",
"nodeType": "YulIdentifier",
"src": "87:5:1"
},
"nativeSrc": "87:12:1",
"nodeType": "YulFunctionCall",
"src": "87:12:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "77:6:1",
"nodeType": "YulIdentifier",
"src": "77:6:1"
}
]
}
]
},
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "7:99:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "49:5:1",
"nodeType": "YulTypedName",
"src": "49:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "59:6:1",
"nodeType": "YulTypedName",
"src": "59:6:1",
"type": ""
}
],
"src": "7:99:1"
},
{
"body": {
"nativeSrc": "208:73:1",
"nodeType": "YulBlock",
"src": "208:73:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "225:3:1",
"nodeType": "YulIdentifier",
"src": "225:3:1"
},
{
"name": "length",
"nativeSrc": "230:6:1",
"nodeType": "YulIdentifier",
"src": "230:6:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "218:6:1",
"nodeType": "YulIdentifier",
"src": "218:6:1"
},
"nativeSrc": "218:19:1",
"nodeType": "YulFunctionCall",
"src": "218:19:1"
},
"nativeSrc": "218:19:1",
"nodeType": "YulExpressionStatement",
"src": "218:19:1"
},
{
"nativeSrc": "246:29:1",
"nodeType": "YulAssignment",
"src": "246:29:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "265:3:1",
"nodeType": "YulIdentifier",
"src": "265:3:1"
},
{
"kind": "number",
"nativeSrc": "270:4:1",
"nodeType": "YulLiteral",
"src": "270:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "261:3:1",
"nodeType": "YulIdentifier",
"src": "261:3:1"
},
"nativeSrc": "261:14:1",
"nodeType": "YulFunctionCall",
"src": "261:14:1"
},
"variableNames": [
{
"name": "updated_pos",
"nativeSrc": "246:11:1",
"nodeType": "YulIdentifier",
"src": "246:11:1"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "112:169:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nativeSrc": "180:3:1",
"nodeType": "YulTypedName",
"src": "180:3:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "185:6:1",
"nodeType": "YulTypedName",
"src": "185:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nativeSrc": "196:11:1",
"nodeType": "YulTypedName",
"src": "196:11:1",
"type": ""
}
],
"src": "112:169:1"
},
{
"body": {
"nativeSrc": "349:184:1",
"nodeType": "YulBlock",
"src": "349:184:1",
"statements": [
{
"nativeSrc": "359:10:1",
"nodeType": "YulVariableDeclaration",
"src": "359:10:1",
"value": {
"kind": "number",
"nativeSrc": "368:1:1",
"nodeType": "YulLiteral",
"src": "368:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nativeSrc": "363:1:1",
"nodeType": "YulTypedName",
"src": "363:1:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "428:63:1",
"nodeType": "YulBlock",
"src": "428:63:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nativeSrc": "453:3:1",
"nodeType": "YulIdentifier",
"src": "453:3:1"
},
{
"name": "i",
"nativeSrc": "458:1:1",
"nodeType": "YulIdentifier",
"src": "458:1:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "449:3:1",
"nodeType": "YulIdentifier",
"src": "449:3:1"
},
"nativeSrc": "449:11:1",
"nodeType": "YulFunctionCall",
"src": "449:11:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "472:3:1",
"nodeType": "YulIdentifier",
"src": "472:3:1"
},
{
"name": "i",
"nativeSrc": "477:1:1",
"nodeType": "YulIdentifier",
"src": "477:1:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "468:3:1",
"nodeType": "YulIdentifier",
"src": "468:3:1"
},
"nativeSrc": "468:11:1",
"nodeType": "YulFunctionCall",
"src": "468:11:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "462:5:1",
"nodeType": "YulIdentifier",
"src": "462:5:1"
},
"nativeSrc": "462:18:1",
"nodeType": "YulFunctionCall",
"src": "462:18:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "442:6:1",
"nodeType": "YulIdentifier",
"src": "442:6:1"
},
"nativeSrc": "442:39:1",
"nodeType": "YulFunctionCall",
"src": "442:39:1"
},
"nativeSrc": "442:39:1",
"nodeType": "YulExpressionStatement",
"src": "442:39:1"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nativeSrc": "389:1:1",
"nodeType": "YulIdentifier",
"src": "389:1:1"
},
{
"name": "length",
"nativeSrc": "392:6:1",
"nodeType": "YulIdentifier",
"src": "392:6:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "386:2:1",
"nodeType": "YulIdentifier",
"src": "386:2:1"
},
"nativeSrc": "386:13:1",
"nodeType": "YulFunctionCall",
"src": "386:13:1"
},
"nativeSrc": "378:113:1",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "400:19:1",
"nodeType": "YulBlock",
"src": "400:19:1",
"statements": [
{
"nativeSrc": "402:15:1",
"nodeType": "YulAssignment",
"src": "402:15:1",
"value": {
"arguments": [
{
"name": "i",
"nativeSrc": "411:1:1",
"nodeType": "YulIdentifier",
"src": "411:1:1"
},
{
"kind": "number",
"nativeSrc": "414:2:1",
"nodeType": "YulLiteral",
"src": "414:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "407:3:1",
"nodeType": "YulIdentifier",
"src": "407:3:1"
},
"nativeSrc": "407:10:1",
"nodeType": "YulFunctionCall",
"src": "407:10:1"
},
"variableNames": [
{
"name": "i",
"nativeSrc": "402:1:1",
"nodeType": "YulIdentifier",
"src": "402:1:1"
}
]
}
]
},
"pre": {
"nativeSrc": "382:3:1",
"nodeType": "YulBlock",
"src": "382:3:1",
"statements": []
},
"src": "378:113:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nativeSrc": "511:3:1",
"nodeType": "YulIdentifier",
"src": "511:3:1"
},
{
"name": "length",
"nativeSrc": "516:6:1",
"nodeType": "YulIdentifier",
"src": "516:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "507:3:1",
"nodeType": "YulIdentifier",
"src": "507:3:1"
},
"nativeSrc": "507:16:1",
"nodeType": "YulFunctionCall",
"src": "507:16:1"
},
{
"kind": "number",
"nativeSrc": "525:1:1",
"nodeType": "YulLiteral",
"src": "525:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "500:6:1",
"nodeType": "YulIdentifier",
"src": "500:6:1"
},
"nativeSrc": "500:27:1",
"nodeType": "YulFunctionCall",
"src": "500:27:1"
},
"nativeSrc": "500:27:1",
"nodeType": "YulExpressionStatement",
"src": "500:27:1"
}
]
},
"name": "copy_memory_to_memory_with_cleanup",
"nativeSrc": "287:246:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nativeSrc": "331:3:1",
"nodeType": "YulTypedName",
"src": "331:3:1",
"type": ""
},
{
"name": "dst",
"nativeSrc": "336:3:1",
"nodeType": "YulTypedName",
"src": "336:3:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "341:6:1",
"nodeType": "YulTypedName",
"src": "341:6:1",
"type": ""
}
],
"src": "287:246:1"
},
{
"body": {
"nativeSrc": "587:54:1",
"nodeType": "YulBlock",
"src": "587:54:1",
"statements": [
{
"nativeSrc": "597:38:1",
"nodeType": "YulAssignment",
"src": "597:38:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "615:5:1",
"nodeType": "YulIdentifier",
"src": "615:5:1"
},
{
"kind": "number",
"nativeSrc": "622:2:1",
"nodeType": "YulLiteral",
"src": "622:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nativeSrc": "611:3:1",
"nodeType": "YulIdentifier",
"src": "611:3:1"
},
"nativeSrc": "611:14:1",
"nodeType": "YulFunctionCall",
"src": "611:14:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "631:2:1",
"nodeType": "YulLiteral",
"src": "631:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nativeSrc": "627:3:1",
"nodeType": "YulIdentifier",
"src": "627:3:1"
},
"nativeSrc": "627:7:1",
"nodeType": "YulFunctionCall",
"src": "627:7:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "607:3:1",
"nodeType": "YulIdentifier",
"src": "607:3:1"
},
"nativeSrc": "607:28:1",
"nodeType": "YulFunctionCall",
"src": "607:28:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "597:6:1",
"nodeType": "YulIdentifier",
"src": "597:6:1"
}
]
}
]
},
"name": "round_up_to_mul_of_32",
"nativeSrc": "539:102:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "570:5:1",
"nodeType": "YulTypedName",
"src": "570:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "580:6:1",
"nodeType": "YulTypedName",
"src": "580:6:1",
"type": ""
}
],
"src": "539:102:1"
},
{
"body": {
"nativeSrc": "739:285:1",
"nodeType": "YulBlock",
"src": "739:285:1",
"statements": [
{
"nativeSrc": "749:53:1",
"nodeType": "YulVariableDeclaration",
"src": "749:53:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "796:5:1",
"nodeType": "YulIdentifier",
"src": "796:5:1"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "763:32:1",
"nodeType": "YulIdentifier",
"src": "763:32:1"
},
"nativeSrc": "763:39:1",
"nodeType": "YulFunctionCall",
"src": "763:39:1"
},
"variables": [
{
"name": "length",
"nativeSrc": "753:6:1",
"nodeType": "YulTypedName",
"src": "753:6:1",
"type": ""
}
]
},
{
"nativeSrc": "811:78:1",
"nodeType": "YulAssignment",
"src": "811:78:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "877:3:1",
"nodeType": "YulIdentifier",
"src": "877:3:1"
},
{
"name": "length",
"nativeSrc": "882:6:1",
"nodeType": "YulIdentifier",
"src": "882:6:1"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "818:58:1",
"nodeType": "YulIdentifier",
"src": "818:58:1"
},
"nativeSrc": "818:71:1",
"nodeType": "YulFunctionCall",
"src": "818:71:1"
},
"variableNames": [
{
"name": "pos",
"nativeSrc": "811:3:1",
"nodeType": "YulIdentifier",
"src": "811:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "937:5:1",
"nodeType": "YulIdentifier",
"src": "937:5:1"
},
{
"kind": "number",
"nativeSrc": "944:4:1",
"nodeType": "YulLiteral",
"src": "944:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "933:3:1",
"nodeType": "YulIdentifier",
"src": "933:3:1"
},
"nativeSrc": "933:16:1",
"nodeType": "YulFunctionCall",
"src": "933:16:1"
},
{
"name": "pos",
"nativeSrc": "951:3:1",
"nodeType": "YulIdentifier",
"src": "951:3:1"
},
{
"name": "length",
"nativeSrc": "956:6:1",
"nodeType": "YulIdentifier",
"src": "956:6:1"
}
],
"functionName": {
"name": "copy_memory_to_memory_with_cleanup",
"nativeSrc": "898:34:1",
"nodeType": "YulIdentifier",
"src": "898:34:1"
},
"nativeSrc": "898:65:1",
"nodeType": "YulFunctionCall",
"src": "898:65:1"
},
"nativeSrc": "898:65:1",
"nodeType": "YulExpressionStatement",
"src": "898:65:1"
},
{
"nativeSrc": "972:46:1",
"nodeType": "YulAssignment",
"src": "972:46:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "983:3:1",
"nodeType": "YulIdentifier",
"src": "983:3:1"
},
{
"arguments": [
{
"name": "length",
"nativeSrc": "1010:6:1",
"nodeType": "YulIdentifier",
"src": "1010:6:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nativeSrc": "988:21:1",
"nodeType": "YulIdentifier",
"src": "988:21:1"
},
"nativeSrc": "988:29:1",
"nodeType": "YulFunctionCall",
"src": "988:29:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "979:3:1",
"nodeType": "YulIdentifier",
"src": "979:3:1"
},
"nativeSrc": "979:39:1",
"nodeType": "YulFunctionCall",
"src": "979:39:1"
},
"variableNames": [
{
"name": "end",
"nativeSrc": "972:3:1",
"nodeType": "YulIdentifier",
"src": "972:3:1"
}
]
}
]
},
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nativeSrc": "647:377:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "720:5:1",
"nodeType": "YulTypedName",
"src": "720:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "727:3:1",
"nodeType": "YulTypedName",
"src": "727:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nativeSrc": "735:3:1",
"nodeType": "YulTypedName",
"src": "735:3:1",
"type": ""
}
],
"src": "647:377:1"
},
{
"body": {
"nativeSrc": "1148:195:1",
"nodeType": "YulBlock",
"src": "1148:195:1",
"statements": [
{
"nativeSrc": "1158:26:1",
"nodeType": "YulAssignment",
"src": "1158:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "1170:9:1",
"nodeType": "YulIdentifier",
"src": "1170:9:1"
},
{
"kind": "number",
"nativeSrc": "1181:2:1",
"nodeType": "YulLiteral",
"src": "1181:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1166:3:1",
"nodeType": "YulIdentifier",
"src": "1166:3:1"
},
"nativeSrc": "1166:18:1",
"nodeType": "YulFunctionCall",
"src": "1166:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "1158:4:1",
"nodeType": "YulIdentifier",
"src": "1158:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "1205:9:1",
"nodeType": "YulIdentifier",
"src": "1205:9:1"
},
{
"kind": "number",
"nativeSrc": "1216:1:1",
"nodeType": "YulLiteral",
"src": "1216:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1201:3:1",
"nodeType": "YulIdentifier",
"src": "1201:3:1"
},
"nativeSrc": "1201:17:1",
"nodeType": "YulFunctionCall",
"src": "1201:17:1"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "1224:4:1",
"nodeType": "YulIdentifier",
"src": "1224:4:1"
},
{
"name": "headStart",
"nativeSrc": "1230:9:1",
"nodeType": "YulIdentifier",
"src": "1230:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "1220:3:1",
"nodeType": "YulIdentifier",
"src": "1220:3:1"
},
"nativeSrc": "1220:20:1",
"nodeType": "YulFunctionCall",
"src": "1220:20:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1194:6:1",
"nodeType": "YulIdentifier",
"src": "1194:6:1"
},
"nativeSrc": "1194:47:1",
"nodeType": "YulFunctionCall",
"src": "1194:47:1"
},
"nativeSrc": "1194:47:1",
"nodeType": "YulExpressionStatement",
"src": "1194:47:1"
},
{
"nativeSrc": "1250:86:1",
"nodeType": "YulAssignment",
"src": "1250:86:1",
"value": {
"arguments": [
{
"name": "value0",
"nativeSrc": "1322:6:1",
"nodeType": "YulIdentifier",
"src": "1322:6:1"
},
{
"name": "tail",
"nativeSrc": "1331:4:1",
"nodeType": "YulIdentifier",
"src": "1331:4:1"
}
],
"functionName": {
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nativeSrc": "1258:63:1",
"nodeType": "YulIdentifier",
"src": "1258:63:1"
},
"nativeSrc": "1258:78:1",
"nodeType": "YulFunctionCall",
"src": "1258:78:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "1250:4:1",
"nodeType": "YulIdentifier",
"src": "1250:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed",
"nativeSrc": "1030:313:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "1120:9:1",
"nodeType": "YulTypedName",
"src": "1120:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "1132:6:1",
"nodeType": "YulTypedName",
"src": "1132:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "1143:4:1",
"nodeType": "YulTypedName",
"src": "1143:4:1",
"type": ""
}
],
"src": "1030:313:1"
},
{
"body": {
"nativeSrc": "1389:35:1",
"nodeType": "YulBlock",
"src": "1389:35:1",
"statements": [
{
"nativeSrc": "1399:19:1",
"nodeType": "YulAssignment",
"src": "1399:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1415:2:1",
"nodeType": "YulLiteral",
"src": "1415:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "1409:5:1",
"nodeType": "YulIdentifier",
"src": "1409:5:1"
},
"nativeSrc": "1409:9:1",
"nodeType": "YulFunctionCall",
"src": "1409:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nativeSrc": "1399:6:1",
"nodeType": "YulIdentifier",
"src": "1399:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "1349:75:1",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nativeSrc": "1382:6:1",
"nodeType": "YulTypedName",
"src": "1382:6:1",
"type": ""
}
],
"src": "1349:75:1"
},
{
"body": {
"nativeSrc": "1519:28:1",
"nodeType": "YulBlock",
"src": "1519:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1536:1:1",
"nodeType": "YulLiteral",
"src": "1536:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1539:1:1",
"nodeType": "YulLiteral",
"src": "1539:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1529:6:1",
"nodeType": "YulIdentifier",
"src": "1529:6:1"
},
"nativeSrc": "1529:12:1",
"nodeType": "YulFunctionCall",
"src": "1529:12:1"
},
"nativeSrc": "1529:12:1",
"nodeType": "YulExpressionStatement",
"src": "1529:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "1430:117:1",
"nodeType": "YulFunctionDefinition",
"src": "1430:117:1"
},
{
"body": {
"nativeSrc": "1642:28:1",
"nodeType": "YulBlock",
"src": "1642:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1659:1:1",
"nodeType": "YulLiteral",
"src": "1659:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1662:1:1",
"nodeType": "YulLiteral",
"src": "1662:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1652:6:1",
"nodeType": "YulIdentifier",
"src": "1652:6:1"
},
"nativeSrc": "1652:12:1",
"nodeType": "YulFunctionCall",
"src": "1652:12:1"
},
"nativeSrc": "1652:12:1",
"nodeType": "YulExpressionStatement",
"src": "1652:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "1553:117:1",
"nodeType": "YulFunctionDefinition",
"src": "1553:117:1"
},
{
"body": {
"nativeSrc": "1721:81:1",
"nodeType": "YulBlock",
"src": "1721:81:1",
"statements": [
{
"nativeSrc": "1731:65:1",
"nodeType": "YulAssignment",
"src": "1731:65:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "1746:5:1",
"nodeType": "YulIdentifier",
"src": "1746:5:1"
},
{
"kind": "number",
"nativeSrc": "1753:42:1",
"nodeType": "YulLiteral",
"src": "1753:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nativeSrc": "1742:3:1",
"nodeType": "YulIdentifier",
"src": "1742:3:1"
},
"nativeSrc": "1742:54:1",
"nodeType": "YulFunctionCall",
"src": "1742:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "1731:7:1",
"nodeType": "YulIdentifier",
"src": "1731:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nativeSrc": "1676:126:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "1703:5:1",
"nodeType": "YulTypedName",
"src": "1703:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "1713:7:1",
"nodeType": "YulTypedName",
"src": "1713:7:1",
"type": ""
}
],
"src": "1676:126:1"
},
{
"body": {
"nativeSrc": "1853:51:1",
"nodeType": "YulBlock",
"src": "1853:51:1",
"statements": [
{
"nativeSrc": "1863:35:1",
"nodeType": "YulAssignment",
"src": "1863:35:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "1892:5:1",
"nodeType": "YulIdentifier",
"src": "1892:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nativeSrc": "1874:17:1",
"nodeType": "YulIdentifier",
"src": "1874:17:1"
},
"nativeSrc": "1874:24:1",
"nodeType": "YulFunctionCall",
"src": "1874:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "1863:7:1",
"nodeType": "YulIdentifier",
"src": "1863:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nativeSrc": "1808:96:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "1835:5:1",
"nodeType": "YulTypedName",
"src": "1835:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "1845:7:1",
"nodeType": "YulTypedName",
"src": "1845:7:1",
"type": ""
}
],
"src": "1808:96:1"
},
{
"body": {
"nativeSrc": "1953:79:1",
"nodeType": "YulBlock",
"src": "1953:79:1",
"statements": [
{
"body": {
"nativeSrc": "2010:16:1",
"nodeType": "YulBlock",
"src": "2010:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "2019:1:1",
"nodeType": "YulLiteral",
"src": "2019:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "2022:1:1",
"nodeType": "YulLiteral",
"src": "2022:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "2012:6:1",
"nodeType": "YulIdentifier",
"src": "2012:6:1"
},
"nativeSrc": "2012:12:1",
"nodeType": "YulFunctionCall",
"src": "2012:12:1"
},
"nativeSrc": "2012:12:1",
"nodeType": "YulExpressionStatement",
"src": "2012:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "1976:5:1",
"nodeType": "YulIdentifier",
"src": "1976:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "2001:5:1",
"nodeType": "YulIdentifier",
"src": "2001:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nativeSrc": "1983:17:1",
"nodeType": "YulIdentifier",
"src": "1983:17:1"
},
"nativeSrc": "1983:24:1",
"nodeType": "YulFunctionCall",
"src": "1983:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "1973:2:1",
"nodeType": "YulIdentifier",
"src": "1973:2:1"
},
"nativeSrc": "1973:35:1",
"nodeType": "YulFunctionCall",
"src": "1973:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "1966:6:1",
"nodeType": "YulIdentifier",
"src": "1966:6:1"
},
"nativeSrc": "1966:43:1",
"nodeType": "YulFunctionCall",
"src": "1966:43:1"
},
"nativeSrc": "1963:63:1",
"nodeType": "YulIf",
"src": "1963:63:1"
}
]
},
"name": "validator_revert_t_address",
"nativeSrc": "1910:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "1946:5:1",
"nodeType": "YulTypedName",
"src": "1946:5:1",
"type": ""
}
],
"src": "1910:122:1"
},
{
"body": {
"nativeSrc": "2090:87:1",
"nodeType": "YulBlock",
"src": "2090:87:1",
"statements": [
{
"nativeSrc": "2100:29:1",
"nodeType": "YulAssignment",
"src": "2100:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "2122:6:1",
"nodeType": "YulIdentifier",
"src": "2122:6:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "2109:12:1",
"nodeType": "YulIdentifier",
"src": "2109:12:1"
},
"nativeSrc": "2109:20:1",
"nodeType": "YulFunctionCall",
"src": "2109:20:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "2100:5:1",
"nodeType": "YulIdentifier",
"src": "2100:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "2165:5:1",
"nodeType": "YulIdentifier",
"src": "2165:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nativeSrc": "2138:26:1",
"nodeType": "YulIdentifier",
"src": "2138:26:1"
},
"nativeSrc": "2138:33:1",
"nodeType": "YulFunctionCall",
"src": "2138:33:1"
},
"nativeSrc": "2138:33:1",
"nodeType": "YulExpressionStatement",
"src": "2138:33:1"
}
]
},
"name": "abi_decode_t_address",
"nativeSrc": "2038:139:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "2068:6:1",
"nodeType": "YulTypedName",
"src": "2068:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "2076:3:1",
"nodeType": "YulTypedName",
"src": "2076:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "2084:5:1",
"nodeType": "YulTypedName",
"src": "2084:5:1",
"type": ""
}
],
"src": "2038:139:1"
},
{
"body": {
"nativeSrc": "2228:32:1",
"nodeType": "YulBlock",
"src": "2228:32:1",
"statements": [
{
"nativeSrc": "2238:16:1",
"nodeType": "YulAssignment",
"src": "2238:16:1",
"value": {
"name": "value",
"nativeSrc": "2249:5:1",
"nodeType": "YulIdentifier",
"src": "2249:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "2238:7:1",
"nodeType": "YulIdentifier",
"src": "2238:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nativeSrc": "2183:77:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "2210:5:1",
"nodeType": "YulTypedName",
"src": "2210:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "2220:7:1",
"nodeType": "YulTypedName",
"src": "2220:7:1",
"type": ""
}
],
"src": "2183:77:1"
},
{
"body": {
"nativeSrc": "2309:79:1",
"nodeType": "YulBlock",
"src": "2309:79:1",
"statements": [
{
"body": {
"nativeSrc": "2366:16:1",
"nodeType": "YulBlock",
"src": "2366:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "2375:1:1",
"nodeType": "YulLiteral",
"src": "2375:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "2378:1:1",
"nodeType": "YulLiteral",
"src": "2378:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "2368:6:1",
"nodeType": "YulIdentifier",
"src": "2368:6:1"
},
"nativeSrc": "2368:12:1",
"nodeType": "YulFunctionCall",
"src": "2368:12:1"
},
"nativeSrc": "2368:12:1",
"nodeType": "YulExpressionStatement",
"src": "2368:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "2332:5:1",
"nodeType": "YulIdentifier",
"src": "2332:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "2357:5:1",
"nodeType": "YulIdentifier",
"src": "2357:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "2339:17:1",
"nodeType": "YulIdentifier",
"src": "2339:17:1"
},
"nativeSrc": "2339:24:1",
"nodeType": "YulFunctionCall",
"src": "2339:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "2329:2:1",
"nodeType": "YulIdentifier",
"src": "2329:2:1"
},
"nativeSrc": "2329:35:1",
"nodeType": "YulFunctionCall",
"src": "2329:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "2322:6:1",
"nodeType": "YulIdentifier",
"src": "2322:6:1"
},
"nativeSrc": "2322:43:1",
"nodeType": "YulFunctionCall",
"src": "2322:43:1"
},
"nativeSrc": "2319:63:1",
"nodeType": "YulIf",
"src": "2319:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nativeSrc": "2266:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "2302:5:1",
"nodeType": "YulTypedName",
"src": "2302:5:1",
"type": ""
}
],
"src": "2266:122:1"
},
{
"body": {
"nativeSrc": "2446:87:1",
"nodeType": "YulBlock",
"src": "2446:87:1",
"statements": [
{
"nativeSrc": "2456:29:1",
"nodeType": "YulAssignment",
"src": "2456:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "2478:6:1",
"nodeType": "YulIdentifier",
"src": "2478:6:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "2465:12:1",
"nodeType": "YulIdentifier",
"src": "2465:12:1"
},
"nativeSrc": "2465:20:1",
"nodeType": "YulFunctionCall",
"src": "2465:20:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "2456:5:1",
"nodeType": "YulIdentifier",
"src": "2456:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "2521:5:1",
"nodeType": "YulIdentifier",
"src": "2521:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nativeSrc": "2494:26:1",
"nodeType": "YulIdentifier",
"src": "2494:26:1"
},
"nativeSrc": "2494:33:1",
"nodeType": "YulFunctionCall",
"src": "2494:33:1"
},
"nativeSrc": "2494:33:1",
"nodeType": "YulExpressionStatement",
"src": "2494:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nativeSrc": "2394:139:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "2424:6:1",
"nodeType": "YulTypedName",
"src": "2424:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "2432:3:1",
"nodeType": "YulTypedName",
"src": "2432:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "2440:5:1",
"nodeType": "YulTypedName",
"src": "2440:5:1",
"type": ""
}
],
"src": "2394:139:1"
},
{
"body": {
"nativeSrc": "2622:391:1",
"nodeType": "YulBlock",
"src": "2622:391:1",
"statements": [
{
"body": {
"nativeSrc": "2668:83:1",
"nodeType": "YulBlock",
"src": "2668:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "2670:77:1",
"nodeType": "YulIdentifier",
"src": "2670:77:1"
},
"nativeSrc": "2670:79:1",
"nodeType": "YulFunctionCall",
"src": "2670:79:1"
},
"nativeSrc": "2670:79:1",
"nodeType": "YulExpressionStatement",
"src": "2670:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "2643:7:1",
"nodeType": "YulIdentifier",
"src": "2643:7:1"
},
{
"name": "headStart",
"nativeSrc": "2652:9:1",
"nodeType": "YulIdentifier",
"src": "2652:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "2639:3:1",
"nodeType": "YulIdentifier",
"src": "2639:3:1"
},
"nativeSrc": "2639:23:1",
"nodeType": "YulFunctionCall",
"src": "2639:23:1"
},
{
"kind": "number",
"nativeSrc": "2664:2:1",
"nodeType": "YulLiteral",
"src": "2664:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "2635:3:1",
"nodeType": "YulIdentifier",
"src": "2635:3:1"
},
"nativeSrc": "2635:32:1",
"nodeType": "YulFunctionCall",
"src": "2635:32:1"
},
"nativeSrc": "2632:119:1",
"nodeType": "YulIf",
"src": "2632:119:1"
},
{
"nativeSrc": "2761:117:1",
"nodeType": "YulBlock",
"src": "2761:117:1",
"statements": [
{
"nativeSrc": "2776:15:1",
"nodeType": "YulVariableDeclaration",
"src": "2776:15:1",
"value": {
"kind": "number",
"nativeSrc": "2790:1:1",
"nodeType": "YulLiteral",
"src": "2790:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nativeSrc": "2780:6:1",
"nodeType": "YulTypedName",
"src": "2780:6:1",
"type": ""
}
]
},
{
"nativeSrc": "2805:63:1",
"nodeType": "YulAssignment",
"src": "2805:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "2840:9:1",
"nodeType": "YulIdentifier",
"src": "2840:9:1"
},
{
"name": "offset",
"nativeSrc": "2851:6:1",
"nodeType": "YulIdentifier",
"src": "2851:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2836:3:1",
"nodeType": "YulIdentifier",
"src": "2836:3:1"
},
"nativeSrc": "2836:22:1",
"nodeType": "YulFunctionCall",
"src": "2836:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "2860:7:1",
"nodeType": "YulIdentifier",
"src": "2860:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address",
"nativeSrc": "2815:20:1",
"nodeType": "YulIdentifier",
"src": "2815:20:1"
},
"nativeSrc": "2815:53:1",
"nodeType": "YulFunctionCall",
"src": "2815:53:1"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "2805:6:1",
"nodeType": "YulIdentifier",
"src": "2805:6:1"
}
]
}
]
},
{
"nativeSrc": "2888:118:1",
"nodeType": "YulBlock",
"src": "2888:118:1",
"statements": [
{
"nativeSrc": "2903:16:1",
"nodeType": "YulVariableDeclaration",
"src": "2903:16:1",
"value": {
"kind": "number",
"nativeSrc": "2917:2:1",
"nodeType": "YulLiteral",
"src": "2917:2:1",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nativeSrc": "2907:6:1",
"nodeType": "YulTypedName",
"src": "2907:6:1",
"type": ""
}
]
},
{
"nativeSrc": "2933:63:1",
"nodeType": "YulAssignment",
"src": "2933:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "2968:9:1",
"nodeType": "YulIdentifier",
"src": "2968:9:1"
},
{
"name": "offset",
"nativeSrc": "2979:6:1",
"nodeType": "YulIdentifier",
"src": "2979:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2964:3:1",
"nodeType": "YulIdentifier",
"src": "2964:3:1"
},
"nativeSrc": "2964:22:1",
"nodeType": "YulFunctionCall",
"src": "2964:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "2988:7:1",
"nodeType": "YulIdentifier",
"src": "2988:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nativeSrc": "2943:20:1",
"nodeType": "YulIdentifier",
"src": "2943:20:1"
},
"nativeSrc": "2943:53:1",
"nodeType": "YulFunctionCall",
"src": "2943:53:1"
},
"variableNames": [
{
"name": "value1",
"nativeSrc": "2933:6:1",
"nodeType": "YulIdentifier",
"src": "2933:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_uint256",
"nativeSrc": "2539:474:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "2584:9:1",
"nodeType": "YulTypedName",
"src": "2584:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "2595:7:1",
"nodeType": "YulTypedName",
"src": "2595:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "2607:6:1",
"nodeType": "YulTypedName",
"src": "2607:6:1",
"type": ""
},
{
"name": "value1",
"nativeSrc": "2615:6:1",
"nodeType": "YulTypedName",
"src": "2615:6:1",
"type": ""
}
],
"src": "2539:474:1"
},
{
"body": {
"nativeSrc": "3061:48:1",
"nodeType": "YulBlock",
"src": "3061:48:1",
"statements": [
{
"nativeSrc": "3071:32:1",
"nodeType": "YulAssignment",
"src": "3071:32:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "3096:5:1",
"nodeType": "YulIdentifier",
"src": "3096:5:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "3089:6:1",
"nodeType": "YulIdentifier",
"src": "3089:6:1"
},
"nativeSrc": "3089:13:1",
"nodeType": "YulFunctionCall",
"src": "3089:13:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "3082:6:1",
"nodeType": "YulIdentifier",
"src": "3082:6:1"
},
"nativeSrc": "3082:21:1",
"nodeType": "YulFunctionCall",
"src": "3082:21:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "3071:7:1",
"nodeType": "YulIdentifier",
"src": "3071:7:1"
}
]
}
]
},
"name": "cleanup_t_bool",
"nativeSrc": "3019:90:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3043:5:1",
"nodeType": "YulTypedName",
"src": "3043:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "3053:7:1",
"nodeType": "YulTypedName",
"src": "3053:7:1",
"type": ""
}
],
"src": "3019:90:1"
},
{
"body": {
"nativeSrc": "3174:50:1",
"nodeType": "YulBlock",
"src": "3174:50:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "3191:3:1",
"nodeType": "YulIdentifier",
"src": "3191:3:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "3211:5:1",
"nodeType": "YulIdentifier",
"src": "3211:5:1"
}
],
"functionName": {
"name": "cleanup_t_bool",
"nativeSrc": "3196:14:1",
"nodeType": "YulIdentifier",
"src": "3196:14:1"
},
"nativeSrc": "3196:21:1",
"nodeType": "YulFunctionCall",
"src": "3196:21:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "3184:6:1",
"nodeType": "YulIdentifier",
"src": "3184:6:1"
},
"nativeSrc": "3184:34:1",
"nodeType": "YulFunctionCall",
"src": "3184:34:1"
},
"nativeSrc": "3184:34:1",
"nodeType": "YulExpressionStatement",
"src": "3184:34:1"
}
]
},
"name": "abi_encode_t_bool_to_t_bool_fromStack",
"nativeSrc": "3115:109:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3162:5:1",
"nodeType": "YulTypedName",
"src": "3162:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "3169:3:1",
"nodeType": "YulTypedName",
"src": "3169:3:1",
"type": ""
}
],
"src": "3115:109:1"
},
{
"body": {
"nativeSrc": "3322:118:1",
"nodeType": "YulBlock",
"src": "3322:118:1",
"statements": [
{
"nativeSrc": "3332:26:1",
"nodeType": "YulAssignment",
"src": "3332:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "3344:9:1",
"nodeType": "YulIdentifier",
"src": "3344:9:1"
},
{
"kind": "number",
"nativeSrc": "3355:2:1",
"nodeType": "YulLiteral",
"src": "3355:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3340:3:1",
"nodeType": "YulIdentifier",
"src": "3340:3:1"
},
"nativeSrc": "3340:18:1",
"nodeType": "YulFunctionCall",
"src": "3340:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "3332:4:1",
"nodeType": "YulIdentifier",
"src": "3332:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nativeSrc": "3406:6:1",
"nodeType": "YulIdentifier",
"src": "3406:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "3419:9:1",
"nodeType": "YulIdentifier",
"src": "3419:9:1"
},
{
"kind": "number",
"nativeSrc": "3430:1:1",
"nodeType": "YulLiteral",
"src": "3430:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3415:3:1",
"nodeType": "YulIdentifier",
"src": "3415:3:1"
},
"nativeSrc": "3415:17:1",
"nodeType": "YulFunctionCall",
"src": "3415:17:1"
}
],
"functionName": {
"name": "abi_encode_t_bool_to_t_bool_fromStack",
"nativeSrc": "3368:37:1",
"nodeType": "YulIdentifier",
"src": "3368:37:1"
},
"nativeSrc": "3368:65:1",
"nodeType": "YulFunctionCall",
"src": "3368:65:1"
},
"nativeSrc": "3368:65:1",
"nodeType": "YulExpressionStatement",
"src": "3368:65:1"
}
]
},
"name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed",
"nativeSrc": "3230:210:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "3294:9:1",
"nodeType": "YulTypedName",
"src": "3294:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "3306:6:1",
"nodeType": "YulTypedName",
"src": "3306:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "3317:4:1",
"nodeType": "YulTypedName",
"src": "3317:4:1",
"type": ""
}
],
"src": "3230:210:1"
},
{
"body": {
"nativeSrc": "3511:53:1",
"nodeType": "YulBlock",
"src": "3511:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "3528:3:1",
"nodeType": "YulIdentifier",
"src": "3528:3:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "3551:5:1",
"nodeType": "YulIdentifier",
"src": "3551:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "3533:17:1",
"nodeType": "YulIdentifier",
"src": "3533:17:1"
},
"nativeSrc": "3533:24:1",
"nodeType": "YulFunctionCall",
"src": "3533:24:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "3521:6:1",
"nodeType": "YulIdentifier",
"src": "3521:6:1"
},
"nativeSrc": "3521:37:1",
"nodeType": "YulFunctionCall",
"src": "3521:37:1"
},
"nativeSrc": "3521:37:1",
"nodeType": "YulExpressionStatement",
"src": "3521:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "3446:118:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3499:5:1",
"nodeType": "YulTypedName",
"src": "3499:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "3506:3:1",
"nodeType": "YulTypedName",
"src": "3506:3:1",
"type": ""
}
],
"src": "3446:11
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment