Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fielding/b15306cba2b50a885af62fe75ec17a2f to your computer and use it in GitHub Desktop.
Save fielding/b15306cba2b50a885af62fe75ec17a2f 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.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import {IGatewayTokenVerifier} from "./interfaces/IGatewayTokenVerifier.sol";
contract Gated {
address private _gatewayTokenContract;
uint256 private _gatekeeperNetwork;
/// The gateway token is not valid.
error IsGated__InvalidGatewayToken(address gatewayToken);
constructor(address gatewayTokenContract, uint256 gatekeeperNetwork) {
_gatewayTokenContract = gatewayTokenContract;
_gatekeeperNetwork = gatekeeperNetwork;
}
modifier gated() {
IGatewayTokenVerifier verifier = IGatewayTokenVerifier(_gatewayTokenContract);
if (!verifier.verifyToken(msg.sender, _gatekeeperNetwork)) {
revert IsGated__InvalidGatewayToken(_gatewayTokenContract);
}
_;
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
pragma experimental ABIEncoderV2;
interface IGatewayTokenVerifier {
/**
* @dev Triggered by external contract to verify if `slot` and token `owner` are correct.
*
* Checks if token exists in gateway token contract, `slot` still active, and not expired.
* Performs additional checks to verify that `owner` is not blacklisted globally.
*/
function verifyToken(address owner, uint256 network) external view returns (bool);
function verifyToken(uint256 tokenId) external view returns (bool);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @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.
*/
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].
*/
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 v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
* 0 before setting it to a non-zero value.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: address zero is not a valid owner");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _ownerOf(tokenId);
require(owner != address(0), "ERC721: invalid token ID");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
_requireMinted(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not token owner or approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
_requireMinted(tokenId);
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
_safeTransfer(from, to, tokenId, data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
*/
function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
return _owners[tokenId];
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _ownerOf(tokenId) != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId, 1);
// Check that tokenId was not minted by `_beforeTokenTransfer` hook
require(!_exists(tokenId), "ERC721: token already minted");
unchecked {
// Will not overflow unless all 2**256 token ids are minted to the same owner.
// Given that tokens are minted one by one, it is impossible in practice that
// this ever happens. Might change if we allow batch minting.
// The ERC fails to describe this case.
_balances[to] += 1;
}
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId, 1);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
* This is an internal function that does not check if the sender is authorized to operate on the token.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId, 1);
// Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
owner = ERC721.ownerOf(tokenId);
// Clear approvals
delete _tokenApprovals[tokenId];
unchecked {
// Cannot overflow, as that would require more tokens to be burned/transferred
// out than the owner initially received through minting and transferring in.
_balances[owner] -= 1;
}
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId, 1);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId, 1);
// Check that tokenId was not transferred by `_beforeTokenTransfer` hook
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
// Clear approvals from the previous owner
delete _tokenApprovals[tokenId];
unchecked {
// `_balances[from]` cannot overflow for the same reason as described in `_burn`:
// `from`'s balance is the number of token held, which is at least one before the current
// transfer.
// `_balances[to]` could overflow in the conditions described in `_mint`. That would require
// all 2**256 token ids to be minted, which in practice is impossible.
_balances[from] -= 1;
_balances[to] += 1;
}
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId, 1);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` has not been minted yet.
*/
function _requireMinted(uint256 tokenId) internal view virtual {
require(_exists(tokenId), "ERC721: invalid token ID");
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
* used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
* - When `from` is zero, the tokens will be minted for `to`.
* - When `to` is zero, ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
* - `batchSize` is non-zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
/**
* @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
* used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
* - When `from` is zero, the tokens were minted for `to`.
* - When `to` is zero, ``from``'s tokens were burned.
* - `from` and `to` are never both zero.
* - `batchSize` is non-zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
/**
* @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
*
* WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
* being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
* that `ownerOf(tokenId)` is `a`.
*/
// solhint-disable-next-line func-name-mixedcase
function __unsafe_increaseBalance(address account, uint256 amount) internal {
_balances[account] += amount;
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
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");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
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");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
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);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
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);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
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);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
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);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
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);
}
}
}
{
"id": "6a91b3cbd98a3e68e5dea2f7b8f3ecdc",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.18",
"solcLongVersion": "0.8.18+commit.87f61d96",
"input": {
"language": "Solidity",
"sources": {
".deps/npm/@openzeppelin/contracts/utils/Strings.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n"
},
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n"
},
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"contracts": {
".deps/npm/@openzeppelin/contracts/utils/Strings.sol": {
"Strings": {
"abi": [],
"devdoc": {
"details": "String operations.",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \".deps/npm/@openzeppelin/contracts/utils/Strings.sol\":220:2779 library Strings {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \".deps/npm/@openzeppelin/contracts/utils/Strings.sol\":220:2779 library Strings {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033",
"opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DIV 0xAF ADDMOD PUSH31 0x7CFC141511C09ECB44889964DBA39C326908A011AC5C95EF25B8093164736F PUSH13 0x63430008120033000000000000 ",
"sourceMap": "220:2559:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DIV 0xAF ADDMOD PUSH31 0x7CFC141511C09ECB44889964DBA39C326908A011AC5C95EF25B8093164736F PUSH13 0x63430008120033000000000000 ",
"sourceMap": "220:2559:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"equal(string memory,string memory)": "infinite",
"toHexString(address)": "infinite",
"toHexString(uint256)": "infinite",
"toHexString(uint256,uint256)": "infinite",
"toString(int256)": "infinite",
"toString(uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 220,
"end": 2779,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 220,
"end": 2779,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 220,
"end": 2779,
"name": "DUP3",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "DUP3",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "DUP3",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "CODECOPY",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "DUP1",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "MLOAD",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 220,
"end": 2779,
"name": "BYTE",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 220,
"end": 2779,
"name": "EQ",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 220,
"end": 2779,
"name": "JUMPI",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 220,
"end": 2779,
"name": "MSTORE",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 220,
"end": 2779,
"name": "MSTORE",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "24"
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 220,
"end": 2779,
"name": "REVERT",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 220,
"end": 2779,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "ADDRESS",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 220,
"end": 2779,
"name": "MSTORE",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 220,
"end": 2779,
"name": "DUP2",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "MSTORE8",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "DUP3",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "DUP2",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033",
".code": [
{
"begin": 220,
"end": 2779,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "ADDRESS",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "EQ",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 220,
"end": 2779,
"name": "MSTORE",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 220,
"end": 2779,
"name": "DUP1",
"source": 0
},
{
"begin": 220,
"end": 2779,
"name": "REVERT",
"source": 0
}
]
}
},
"sourceList": [
".deps/npm/@openzeppelin/contracts/utils/Strings.sol",
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol",
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"String operations.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\".deps/npm/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/npm/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b81d9ff6559ea5c47fc573e17ece6d9ba5d6839e213e6ebc3b4c5c8fe4199d7f\",\"dweb:/ipfs/QmPCW1bFisUzJkyjroY3yipwfism9RRCigCcK1hbXtVM8n\"]},\".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7\",\"dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
},
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol": {
"Math": {
"abi": [],
"devdoc": {
"details": "Standard math utilities missing in the Solidity language.",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":202:12784 library Math {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":202:12784 library Math {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa2646970667358221220cc60d619142539c74ac21b6a23798f2730f0977b223eaa2401d029326ecd420864736f6c63430008120033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cc60d619142539c74ac21b6a23798f2730f0977b223eaa2401d029326ecd420864736f6c63430008120033",
"opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCC PUSH1 0xD6 NOT EQ 0x25 CODECOPY 0xC7 0x4A 0xC2 SHL PUSH11 0x23798F2730F0977B223EAA 0x24 ADD 0xD0 0x29 ORIGIN PUSH15 0xCD420864736F6C6343000812003300 ",
"sourceMap": "202:12582:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cc60d619142539c74ac21b6a23798f2730f0977b223eaa2401d029326ecd420864736f6c63430008120033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCC PUSH1 0xD6 NOT EQ 0x25 CODECOPY 0xC7 0x4A 0xC2 SHL PUSH11 0x23798F2730F0977B223EAA 0x24 ADD 0xD0 0x29 ORIGIN PUSH15 0xCD420864736F6C6343000812003300 ",
"sourceMap": "202:12582:1:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"average(uint256,uint256)": "infinite",
"ceilDiv(uint256,uint256)": "infinite",
"log10(uint256)": "infinite",
"log10(uint256,enum Math.Rounding)": "infinite",
"log2(uint256)": "infinite",
"log2(uint256,enum Math.Rounding)": "infinite",
"log256(uint256)": "infinite",
"log256(uint256,enum Math.Rounding)": "infinite",
"max(uint256,uint256)": "infinite",
"min(uint256,uint256)": "infinite",
"mulDiv(uint256,uint256,uint256)": "infinite",
"mulDiv(uint256,uint256,uint256,enum Math.Rounding)": "infinite",
"sqrt(uint256)": "infinite",
"sqrt(uint256,enum Math.Rounding)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 202,
"end": 12784,
"name": "PUSH #[$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 202,
"end": 12784,
"name": "PUSH [$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "B"
},
{
"begin": 202,
"end": 12784,
"name": "DUP3",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "DUP3",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "DUP3",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "CODECOPY",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "DUP1",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "MLOAD",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 202,
"end": 12784,
"name": "BYTE",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 202,
"end": 12784,
"name": "EQ",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH [tag]",
"source": 1,
"value": "1"
},
{
"begin": 202,
"end": 12784,
"name": "JUMPI",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 202,
"end": 12784,
"name": "MSTORE",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "4"
},
{
"begin": 202,
"end": 12784,
"name": "MSTORE",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "24"
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 202,
"end": 12784,
"name": "REVERT",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "tag",
"source": 1,
"value": "1"
},
{
"begin": 202,
"end": 12784,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "ADDRESS",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 202,
"end": 12784,
"name": "MSTORE",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 202,
"end": 12784,
"name": "DUP2",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "MSTORE8",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "DUP3",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "DUP2",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "RETURN",
"source": 1
}
],
".data": {
"0": {
".auxdata": "a2646970667358221220cc60d619142539c74ac21b6a23798f2730f0977b223eaa2401d029326ecd420864736f6c63430008120033",
".code": [
{
"begin": 202,
"end": 12784,
"name": "PUSHDEPLOYADDRESS",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "ADDRESS",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "EQ",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "80"
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "40"
},
{
"begin": 202,
"end": 12784,
"name": "MSTORE",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 202,
"end": 12784,
"name": "DUP1",
"source": 1
},
{
"begin": 202,
"end": 12784,
"name": "REVERT",
"source": 1
}
]
}
},
"sourceList": [
".deps/npm/@openzeppelin/contracts/utils/Strings.sol",
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol",
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
},
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol": {
"SignedMath": {
"abi": [],
"devdoc": {
"details": "Standard signed math utilities missing in the Solidity language.",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":215:1262 library SignedMath {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":215:1262 library SignedMath {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212201730d8873780b53529d8093e544019304ae1994a54bdbf295e1fbff413a93c7e64736f6c63430008120033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201730d8873780b53529d8093e544019304ae1994a54bdbf295e1fbff413a93c7e64736f6c63430008120033",
"opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 OR ADDRESS 0xD8 DUP8 CALLDATACOPY DUP1 0xB5 CALLDATALOAD 0x29 0xD8 MULMOD RETURNDATACOPY SLOAD BLOCKHASH NOT ADDRESS 0x4A 0xE1 SWAP10 0x4A SLOAD 0xBD 0xBF 0x29 0x5E 0x1F 0xBF DELEGATECALL SGT 0xA9 EXTCODECOPY PUSH31 0x64736F6C634300081200330000000000000000000000000000000000000000 ",
"sourceMap": "215:1047:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201730d8873780b53529d8093e544019304ae1994a54bdbf295e1fbff413a93c7e64736f6c63430008120033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 OR ADDRESS 0xD8 DUP8 CALLDATACOPY DUP1 0xB5 CALLDATALOAD 0x29 0xD8 MULMOD RETURNDATACOPY SLOAD BLOCKHASH NOT ADDRESS 0x4A 0xE1 SWAP10 0x4A SLOAD 0xBD 0xBF 0x29 0x5E 0x1F 0xBF DELEGATECALL SGT 0xA9 EXTCODECOPY PUSH31 0x64736F6C634300081200330000000000000000000000000000000000000000 ",
"sourceMap": "215:1047:2:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"abs(int256)": "infinite",
"average(int256,int256)": "infinite",
"max(int256,int256)": "infinite",
"min(int256,int256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 215,
"end": 1262,
"name": "PUSH #[$]",
"source": 2,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 215,
"end": 1262,
"name": "PUSH [$]",
"source": 2,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "B"
},
{
"begin": 215,
"end": 1262,
"name": "DUP3",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "DUP3",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "DUP3",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "CODECOPY",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "DUP1",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "MLOAD",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 215,
"end": 1262,
"name": "BYTE",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "73"
},
{
"begin": 215,
"end": 1262,
"name": "EQ",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH [tag]",
"source": 2,
"value": "1"
},
{
"begin": 215,
"end": 1262,
"name": "JUMPI",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 215,
"end": 1262,
"name": "MSTORE",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "4"
},
{
"begin": 215,
"end": 1262,
"name": "MSTORE",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "24"
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 215,
"end": 1262,
"name": "REVERT",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "tag",
"source": 2,
"value": "1"
},
{
"begin": 215,
"end": 1262,
"name": "JUMPDEST",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "ADDRESS",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 215,
"end": 1262,
"name": "MSTORE",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "73"
},
{
"begin": 215,
"end": 1262,
"name": "DUP2",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "MSTORE8",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "DUP3",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "DUP2",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "RETURN",
"source": 2
}
],
".data": {
"0": {
".auxdata": "a26469706673582212201730d8873780b53529d8093e544019304ae1994a54bdbf295e1fbff413a93c7e64736f6c63430008120033",
".code": [
{
"begin": 215,
"end": 1262,
"name": "PUSHDEPLOYADDRESS",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "ADDRESS",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "EQ",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "80"
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "40"
},
{
"begin": 215,
"end": 1262,
"name": "MSTORE",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 215,
"end": 1262,
"name": "DUP1",
"source": 2
},
{
"begin": 215,
"end": 1262,
"name": "REVERT",
"source": 2
}
]
}
},
"sourceList": [
".deps/npm/@openzeppelin/contracts/utils/Strings.sol",
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol",
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7\",\"dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
".deps/npm/@openzeppelin/contracts/utils/Strings.sol": {
"ast": {
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/Strings.sol",
"exportedSymbols": {
"Math": [
1094
],
"SignedMath": [
1199
],
"Strings": [
228
]
},
"id": 229,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "101:23:0"
},
{
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/math/Math.sol",
"file": "./math/Math.sol",
"id": 2,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 229,
"sourceUnit": 1095,
"src": "126:25:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol",
"file": "./math/SignedMath.sol",
"id": 3,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 229,
"sourceUnit": 1200,
"src": "152:31:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Strings",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 4,
"nodeType": "StructuredDocumentation",
"src": "185:34:0",
"text": " @dev String operations."
},
"fullyImplemented": true,
"id": 228,
"linearizedBaseContracts": [
228
],
"name": "Strings",
"nameLocation": "228:7:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 7,
"mutability": "constant",
"name": "_SYMBOLS",
"nameLocation": "267:8:0",
"nodeType": "VariableDeclaration",
"scope": 228,
"src": "242:54:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
},
"typeName": {
"id": 5,
"name": "bytes16",
"nodeType": "ElementaryTypeName",
"src": "242:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
}
},
"value": {
"hexValue": "30313233343536373839616263646566",
"id": 6,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "278:18:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f",
"typeString": "literal_string \"0123456789abcdef\""
},
"value": "0123456789abcdef"
},
"visibility": "private"
},
{
"constant": true,
"id": 10,
"mutability": "constant",
"name": "_ADDRESS_LENGTH",
"nameLocation": "325:15:0",
"nodeType": "VariableDeclaration",
"scope": 228,
"src": "302:43:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 8,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "302:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"hexValue": "3230",
"id": 9,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "343:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"visibility": "private"
},
{
"body": {
"id": 57,
"nodeType": "Block",
"src": "518:625:0",
"statements": [
{
"id": 56,
"nodeType": "UncheckedBlock",
"src": "528:609:0",
"statements": [
{
"assignments": [
19
],
"declarations": [
{
"constant": false,
"id": 19,
"mutability": "mutable",
"name": "length",
"nameLocation": "560:6:0",
"nodeType": "VariableDeclaration",
"scope": 56,
"src": "552:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 18,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "552:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 26,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 25,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 22,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "580:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 20,
"name": "Math",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "569:4:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Math_$1094_$",
"typeString": "type(library Math)"
}
},
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "574:5:0",
"memberName": "log10",
"nodeType": "MemberAccess",
"referencedDeclaration": 931,
"src": "569:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 23,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "569:17:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 24,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "589:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "569:21:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "552:38:0"
},
{
"assignments": [
28
],
"declarations": [
{
"constant": false,
"id": 28,
"mutability": "mutable",
"name": "buffer",
"nameLocation": "618:6:0",
"nodeType": "VariableDeclaration",
"scope": 56,
"src": "604:20:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 27,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "604:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"id": 33,
"initialValue": {
"arguments": [
{
"id": 31,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19,
"src": "638:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 30,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "627:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$",
"typeString": "function (uint256) pure returns (string memory)"
},
"typeName": {
"id": 29,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "631:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
}
},
"id": 32,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "627:18:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "604:41:0"
},
{
"assignments": [
35
],
"declarations": [
{
"constant": false,
"id": 35,
"mutability": "mutable",
"name": "ptr",
"nameLocation": "667:3:0",
"nodeType": "VariableDeclaration",
"scope": 56,
"src": "659:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 34,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "659:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 36,
"nodeType": "VariableDeclarationStatement",
"src": "659:11:0"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "740:67:0",
"statements": [
{
"nodeType": "YulAssignment",
"src": "758:35:0",
"value": {
"arguments": [
{
"name": "buffer",
"nodeType": "YulIdentifier",
"src": "769:6:0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "781:2:0",
"type": "",
"value": "32"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "785:6:0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "777:3:0"
},
"nodeType": "YulFunctionCall",
"src": "777:15:0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "765:3:0"
},
"nodeType": "YulFunctionCall",
"src": "765:28:0"
},
"variableNames": [
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "758:3:0"
}
]
}
]
},
"documentation": "@solidity memory-safe-assembly",
"evmVersion": "paris",
"externalReferences": [
{
"declaration": 28,
"isOffset": false,
"isSlot": false,
"src": "769:6:0",
"valueSize": 1
},
{
"declaration": 19,
"isOffset": false,
"isSlot": false,
"src": "785:6:0",
"valueSize": 1
},
{
"declaration": 35,
"isOffset": false,
"isSlot": false,
"src": "758:3:0",
"valueSize": 1
}
],
"id": 37,
"nodeType": "InlineAssembly",
"src": "731:76:0"
},
{
"body": {
"id": 52,
"nodeType": "Block",
"src": "833:267:0",
"statements": [
{
"expression": {
"id": 40,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": false,
"src": "851:5:0",
"subExpression": {
"id": 39,
"name": "ptr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 35,
"src": "851:3:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 41,
"nodeType": "ExpressionStatement",
"src": "851:5:0"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "934:84:0",
"statements": [
{
"expression": {
"arguments": [
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "964:3:0"
},
{
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "978:5:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "985:2:0",
"type": "",
"value": "10"
}
],
"functionName": {
"name": "mod",
"nodeType": "YulIdentifier",
"src": "974:3:0"
},
"nodeType": "YulFunctionCall",
"src": "974:14:0"
},
{
"name": "_SYMBOLS",
"nodeType": "YulIdentifier",
"src": "990:8:0"
}
],
"functionName": {
"name": "byte",
"nodeType": "YulIdentifier",
"src": "969:4:0"
},
"nodeType": "YulFunctionCall",
"src": "969:30:0"
}
],
"functionName": {
"name": "mstore8",
"nodeType": "YulIdentifier",
"src": "956:7:0"
},
"nodeType": "YulFunctionCall",
"src": "956:44:0"
},
"nodeType": "YulExpressionStatement",
"src": "956:44:0"
}
]
},
"documentation": "@solidity memory-safe-assembly",
"evmVersion": "paris",
"externalReferences": [
{
"declaration": 7,
"isOffset": false,
"isSlot": false,
"src": "990:8:0",
"valueSize": 1
},
{
"declaration": 35,
"isOffset": false,
"isSlot": false,
"src": "964:3:0",
"valueSize": 1
},
{
"declaration": 13,
"isOffset": false,
"isSlot": false,
"src": "978:5:0",
"valueSize": 1
}
],
"id": 42,
"nodeType": "InlineAssembly",
"src": "925:93:0"
},
{
"expression": {
"id": 45,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 43,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "1035:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"hexValue": "3130",
"id": 44,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1044:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "1035:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 46,
"nodeType": "ExpressionStatement",
"src": "1035:11:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 49,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "1068:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 48,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1077:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1068:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 51,
"nodeType": "IfStatement",
"src": "1064:21:0",
"trueBody": {
"id": 50,
"nodeType": "Break",
"src": "1080:5:0"
}
}
]
},
"condition": {
"hexValue": "74727565",
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "827:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"id": 53,
"nodeType": "WhileStatement",
"src": "820:280:0"
},
{
"expression": {
"id": 54,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 28,
"src": "1120:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 17,
"id": 55,
"nodeType": "Return",
"src": "1113:13:0"
}
]
}
]
},
"documentation": {
"id": 11,
"nodeType": "StructuredDocumentation",
"src": "352:90:0",
"text": " @dev Converts a `uint256` to its ASCII `string` decimal representation."
},
"id": 58,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toString",
"nameLocation": "456:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 14,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 13,
"mutability": "mutable",
"name": "value",
"nameLocation": "473:5:0",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "465:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "465:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "464:15:0"
},
"returnParameters": {
"id": 17,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 16,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "503:13:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 15,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "503:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "502:15:0"
},
"scope": 228,
"src": "447:696:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 85,
"nodeType": "Block",
"src": "1313:103:0",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 72,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 70,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 61,
"src": "1354:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"hexValue": "30",
"id": 71,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1362:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1354:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "",
"id": 74,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1372:2:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
"value": ""
},
"id": 75,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1354:20:0",
"trueExpression": {
"hexValue": "2d",
"id": 73,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1366:3:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561",
"typeString": "literal_string \"-\""
},
"value": "-"
},
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
{
"arguments": [
{
"arguments": [
{
"id": 79,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 61,
"src": "1400:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"expression": {
"id": 77,
"name": "SignedMath",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1199,
"src": "1385:10:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SignedMath_$1199_$",
"typeString": "type(library SignedMath)"
}
},
"id": 78,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1396:3:0",
"memberName": "abs",
"nodeType": "MemberAccess",
"referencedDeclaration": 1198,
"src": "1385:14:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
"typeString": "function (int256) pure returns (uint256)"
}
},
"id": 80,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1385:21:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 76,
"name": "toString",
"nodeType": "Identifier",
"overloadedDeclarations": [
58,
86
],
"referencedDeclaration": 58,
"src": "1376:8:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$",
"typeString": "function (uint256) pure returns (string memory)"
}
},
"id": 81,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1376:31:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"expression": {
"id": 68,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "1337:3:0",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 69,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "1341:12:0",
"memberName": "encodePacked",
"nodeType": "MemberAccess",
"src": "1337:16:0",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
"typeString": "function () pure returns (bytes memory)"
}
},
"id": 82,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1337:71:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 67,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1330:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 66,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1330:6:0",
"typeDescriptions": {}
}
},
"id": 83,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1330:79:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 65,
"id": 84,
"nodeType": "Return",
"src": "1323:86:0"
}
]
},
"documentation": {
"id": 59,
"nodeType": "StructuredDocumentation",
"src": "1149:89:0",
"text": " @dev Converts a `int256` to its ASCII `string` decimal representation."
},
"id": 86,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toString",
"nameLocation": "1252:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 62,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 61,
"mutability": "mutable",
"name": "value",
"nameLocation": "1268:5:0",
"nodeType": "VariableDeclaration",
"scope": 86,
"src": "1261:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 60,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1261:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1260:14:0"
},
"returnParameters": {
"id": 65,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 64,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 86,
"src": "1298:13:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 63,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1298:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1297:15:0"
},
"scope": 228,
"src": "1243:173:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 105,
"nodeType": "Block",
"src": "1595:100:0",
"statements": [
{
"id": 104,
"nodeType": "UncheckedBlock",
"src": "1605:84:0",
"statements": [
{
"expression": {
"arguments": [
{
"id": 95,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 89,
"src": "1648:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 98,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 89,
"src": "1667:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 96,
"name": "Math",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1094,
"src": "1655:4:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Math_$1094_$",
"typeString": "type(library Math)"
}
},
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1660:6:0",
"memberName": "log256",
"nodeType": "MemberAccess",
"referencedDeclaration": 1054,
"src": "1655:11:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1655:18:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 100,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1676:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1655:22:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 94,
"name": "toHexString",
"nodeType": "Identifier",
"overloadedDeclarations": [
106,
182,
202
],
"referencedDeclaration": 182,
"src": "1636:11:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$",
"typeString": "function (uint256,uint256) pure returns (string memory)"
}
},
"id": 102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1636:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 93,
"id": 103,
"nodeType": "Return",
"src": "1629:49:0"
}
]
}
]
},
"documentation": {
"id": 87,
"nodeType": "StructuredDocumentation",
"src": "1422:94:0",
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation."
},
"id": 106,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toHexString",
"nameLocation": "1530:11:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 90,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 89,
"mutability": "mutable",
"name": "value",
"nameLocation": "1550:5:0",
"nodeType": "VariableDeclaration",
"scope": 106,
"src": "1542:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 88,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1542:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1541:15:0"
},
"returnParameters": {
"id": 93,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 92,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 106,
"src": "1580:13:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 91,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1580:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1579:15:0"
},
"scope": 228,
"src": "1521:174:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 181,
"nodeType": "Block",
"src": "1908:347:0",
"statements": [
{
"assignments": [
117
],
"declarations": [
{
"constant": false,
"id": 117,
"mutability": "mutable",
"name": "buffer",
"nameLocation": "1931:6:0",
"nodeType": "VariableDeclaration",
"scope": 181,
"src": "1918:19:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 116,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1918:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 126,
"initialValue": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 120,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1950:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 121,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 111,
"src": "1954:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1950:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "32",
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1963:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1950:14:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 119,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "1940:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (uint256) pure returns (bytes memory)"
},
"typeName": {
"id": 118,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1944:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
"id": 125,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1940:25:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1918:47:0"
},
{
"expression": {
"id": 131,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 127,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 117,
"src": "1975:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 129,
"indexExpression": {
"hexValue": "30",
"id": 128,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1982:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1975:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "30",
"id": 130,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1987:3:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
"typeString": "literal_string \"0\""
},
"value": "0"
},
"src": "1975:15:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 132,
"nodeType": "ExpressionStatement",
"src": "1975:15:0"
},
{
"expression": {
"id": 137,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 133,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 117,
"src": "2000:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 135,
"indexExpression": {
"hexValue": "31",
"id": 134,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2007:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2000:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "78",
"id": 136,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2012:3:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83",
"typeString": "literal_string \"x\""
},
"value": "x"
},
"src": "2000:15:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 138,
"nodeType": "ExpressionStatement",
"src": "2000:15:0"
},
{
"body": {
"id": 167,
"nodeType": "Block",
"src": "2070:83:0",
"statements": [
{
"expression": {
"id": 161,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 153,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 117,
"src": "2084:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 155,
"indexExpression": {
"id": 154,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 140,
"src": "2091:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2084:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"baseExpression": {
"id": 156,
"name": "_SYMBOLS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "2096:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
}
},
"id": 160,
"indexExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 157,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 109,
"src": "2105:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"hexValue": "307866",
"id": 158,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2113:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_15_by_1",
"typeString": "int_const 15"
},
"value": "0xf"
},
"src": "2105:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2096:21:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"src": "2084:33:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 162,
"nodeType": "ExpressionStatement",
"src": "2084:33:0"
},
{
"expression": {
"id": 165,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 163,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 109,
"src": "2131:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "34",
"id": 164,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2141:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "2131:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 166,
"nodeType": "ExpressionStatement",
"src": "2131:11:0"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 149,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 147,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 140,
"src": "2058:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "31",
"id": 148,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2062:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "2058:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 168,
"initializationExpression": {
"assignments": [
140
],
"declarations": [
{
"constant": false,
"id": 140,
"mutability": "mutable",
"name": "i",
"nameLocation": "2038:1:0",
"nodeType": "VariableDeclaration",
"scope": 168,
"src": "2030:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 139,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2030:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 146,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 145,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 143,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 141,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2042:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 142,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 111,
"src": "2046:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2042:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 144,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2055:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "2042:14:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2030:26:0"
},
"loopExpression": {
"expression": {
"id": 151,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": true,
"src": "2065:3:0",
"subExpression": {
"id": 150,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 140,
"src": "2067:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 152,
"nodeType": "ExpressionStatement",
"src": "2065:3:0"
},
"nodeType": "ForStatement",
"src": "2025:128:0"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 172,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 170,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 109,
"src": "2170:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 171,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2179:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2170:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "537472696e67733a20686578206c656e67746820696e73756666696369656e74",
"id": 173,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2182:34:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2",
"typeString": "literal_string \"Strings: hex length insufficient\""
},
"value": "Strings: hex length insufficient"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2",
"typeString": "literal_string \"Strings: hex length insufficient\""
}
],
"id": 169,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2162:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 174,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2162:55:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 175,
"nodeType": "ExpressionStatement",
"src": "2162:55:0"
},
{
"expression": {
"arguments": [
{
"id": 178,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 117,
"src": "2241:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 177,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2234:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 176,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2234:6:0",
"typeDescriptions": {}
}
},
"id": 179,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2234:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 115,
"id": 180,
"nodeType": "Return",
"src": "2227:21:0"
}
]
},
"documentation": {
"id": 107,
"nodeType": "StructuredDocumentation",
"src": "1701:112:0",
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length."
},
"id": 182,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toHexString",
"nameLocation": "1827:11:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 112,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 109,
"mutability": "mutable",
"name": "value",
"nameLocation": "1847:5:0",
"nodeType": "VariableDeclaration",
"scope": 182,
"src": "1839:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 108,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1839:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 111,
"mutability": "mutable",
"name": "length",
"nameLocation": "1862:6:0",
"nodeType": "VariableDeclaration",
"scope": 182,
"src": "1854:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 110,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1854:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1838:31:0"
},
"returnParameters": {
"id": 115,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 114,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 182,
"src": "1893:13:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 113,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1893:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1892:15:0"
},
"scope": 228,
"src": "1818:437:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 201,
"nodeType": "Block",
"src": "2480:76:0",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"id": 195,
"name": "addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 185,
"src": "2525:4:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 194,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2517:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint160_$",
"typeString": "type(uint160)"
},
"typeName": {
"id": 193,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "2517:7:0",
"typeDescriptions": {}
}
},
"id": 196,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2517:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
],
"id": 192,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2509:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 191,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2509:7:0",
"typeDescriptions": {}
}
},
"id": 197,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2509:22:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 198,
"name": "_ADDRESS_LENGTH",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "2533:15:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 190,
"name": "toHexString",
"nodeType": "Identifier",
"overloadedDeclarations": [
106,
182,
202
],
"referencedDeclaration": 182,
"src": "2497:11:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$",
"typeString": "function (uint256,uint256) pure returns (string memory)"
}
},
"id": 199,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2497:52:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 189,
"id": 200,
"nodeType": "Return",
"src": "2490:59:0"
}
]
},
"documentation": {
"id": 183,
"nodeType": "StructuredDocumentation",
"src": "2261:141:0",
"text": " @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation."
},
"id": 202,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toHexString",
"nameLocation": "2416:11:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 186,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 185,
"mutability": "mutable",
"name": "addr",
"nameLocation": "2436:4:0",
"nodeType": "VariableDeclaration",
"scope": 202,
"src": "2428:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 184,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2428:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "2427:14:0"
},
"returnParameters": {
"id": 189,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 188,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 202,
"src": "2465:13:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 187,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2465:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "2464:15:0"
},
"scope": 228,
"src": "2407:149:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 226,
"nodeType": "Block",
"src": "2711:66:0",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"id": 224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"arguments": [
{
"id": 215,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 205,
"src": "2744:1:0",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 214,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2738:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 213,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2738:5:0",
"typeDescriptions": {}
}
},
"id": 216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2738:8:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 212,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "2728:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 217,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2728:19:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"arguments": [
{
"id": 221,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 207,
"src": "2767:1:0",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 220,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2761:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 219,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2761:5:0",
"typeDescriptions": {}
}
},
"id": 222,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2761:8:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 218,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "2751:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2751:19:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "2728:42:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 211,
"id": 225,
"nodeType": "Return",
"src": "2721:49:0"
}
]
},
"documentation": {
"id": 203,
"nodeType": "StructuredDocumentation",
"src": "2562:66:0",
"text": " @dev Returns true if the two strings are equal."
},
"id": 227,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "equal",
"nameLocation": "2642:5:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 208,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 205,
"mutability": "mutable",
"name": "a",
"nameLocation": "2662:1:0",
"nodeType": "VariableDeclaration",
"scope": 227,
"src": "2648:15:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 204,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2648:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 207,
"mutability": "mutable",
"name": "b",
"nameLocation": "2679:1:0",
"nodeType": "VariableDeclaration",
"scope": 227,
"src": "2665:15:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 206,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2665:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "2647:34:0"
},
"returnParameters": {
"id": 211,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 210,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 227,
"src": "2705:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 209,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2705:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "2704:6:0"
},
"scope": 228,
"src": "2633:144:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 229,
"src": "220:2559:0",
"usedErrors": []
}
],
"src": "101:2679:0"
},
"id": 0
},
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol": {
"ast": {
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/math/Math.sol",
"exportedSymbols": {
"Math": [
1094
]
},
"id": 1095,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 230,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "103:23:1"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Math",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 231,
"nodeType": "StructuredDocumentation",
"src": "128:73:1",
"text": " @dev Standard math utilities missing in the Solidity language."
},
"fullyImplemented": true,
"id": 1094,
"linearizedBaseContracts": [
1094
],
"name": "Math",
"nameLocation": "210:4:1",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "Math.Rounding",
"id": 235,
"members": [
{
"id": 232,
"name": "Down",
"nameLocation": "245:4:1",
"nodeType": "EnumValue",
"src": "245:4:1"
},
{
"id": 233,
"name": "Up",
"nameLocation": "287:2:1",
"nodeType": "EnumValue",
"src": "287:2:1"
},
{
"id": 234,
"name": "Zero",
"nameLocation": "318:4:1",
"nodeType": "EnumValue",
"src": "318:4:1"
}
],
"name": "Rounding",
"nameLocation": "226:8:1",
"nodeType": "EnumDefinition",
"src": "221:122:1"
},
{
"body": {
"id": 252,
"nodeType": "Block",
"src": "480:37:1",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 247,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 245,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 238,
"src": "497:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 246,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 240,
"src": "501:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "497:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 249,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 240,
"src": "509:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 250,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "497:13:1",
"trueExpression": {
"id": 248,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 238,
"src": "505:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 244,
"id": 251,
"nodeType": "Return",
"src": "490:20:1"
}
]
},
"documentation": {
"id": 236,
"nodeType": "StructuredDocumentation",
"src": "349:59:1",
"text": " @dev Returns the largest of two numbers."
},
"id": 253,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nameLocation": "422:3:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 241,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 238,
"mutability": "mutable",
"name": "a",
"nameLocation": "434:1:1",
"nodeType": "VariableDeclaration",
"scope": 253,
"src": "426:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 237,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "426:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 240,
"mutability": "mutable",
"name": "b",
"nameLocation": "445:1:1",
"nodeType": "VariableDeclaration",
"scope": 253,
"src": "437:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 239,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "437:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "425:22:1"
},
"returnParameters": {
"id": 244,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 243,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 253,
"src": "471:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 242,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "471:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "470:9:1"
},
"scope": 1094,
"src": "413:104:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 270,
"nodeType": "Block",
"src": "655:37:1",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 265,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 263,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 256,
"src": "672:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 264,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 258,
"src": "676:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "672:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 267,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 258,
"src": "684:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "672:13:1",
"trueExpression": {
"id": 266,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 256,
"src": "680:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 262,
"id": 269,
"nodeType": "Return",
"src": "665:20:1"
}
]
},
"documentation": {
"id": 254,
"nodeType": "StructuredDocumentation",
"src": "523:60:1",
"text": " @dev Returns the smallest of two numbers."
},
"id": 271,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nameLocation": "597:3:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 259,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 256,
"mutability": "mutable",
"name": "a",
"nameLocation": "609:1:1",
"nodeType": "VariableDeclaration",
"scope": 271,
"src": "601:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 255,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "601:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 258,
"mutability": "mutable",
"name": "b",
"nameLocation": "620:1:1",
"nodeType": "VariableDeclaration",
"scope": 271,
"src": "612:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 257,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "612:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "600:22:1"
},
"returnParameters": {
"id": 262,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 261,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 271,
"src": "646:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 260,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "646:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "645:9:1"
},
"scope": 1094,
"src": "588:104:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 293,
"nodeType": "Block",
"src": "876:82:1",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 291,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 281,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 274,
"src": "931:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"id": 282,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 276,
"src": "935:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "931:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 284,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "930:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 290,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 287,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 285,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 274,
"src": "941:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 286,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 276,
"src": "945:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "941:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 288,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "940:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "32",
"id": 289,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "950:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "940:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "930:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 280,
"id": 292,
"nodeType": "Return",
"src": "923:28:1"
}
]
},
"documentation": {
"id": 272,
"nodeType": "StructuredDocumentation",
"src": "698:102:1",
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero."
},
"id": 294,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nameLocation": "814:7:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 277,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 274,
"mutability": "mutable",
"name": "a",
"nameLocation": "830:1:1",
"nodeType": "VariableDeclaration",
"scope": 294,
"src": "822:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 273,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "822:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 276,
"mutability": "mutable",
"name": "b",
"nameLocation": "841:1:1",
"nodeType": "VariableDeclaration",
"scope": 294,
"src": "833:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 275,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "833:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "821:22:1"
},
"returnParameters": {
"id": 280,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 279,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 294,
"src": "867:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 278,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "867:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "866:9:1"
},
"scope": 1094,
"src": "805:153:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 318,
"nodeType": "Block",
"src": "1228:123:1",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 306,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 304,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 297,
"src": "1316:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 305,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1321:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1316:6:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 313,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 310,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 308,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 297,
"src": "1330:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"hexValue": "31",
"id": 309,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1334:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1330:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 311,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1329:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 312,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 299,
"src": "1339:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1329:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 314,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1343:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1329:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 316,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1316:28:1",
"trueExpression": {
"hexValue": "30",
"id": 307,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1325:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 303,
"id": 317,
"nodeType": "Return",
"src": "1309:35:1"
}
]
},
"documentation": {
"id": 295,
"nodeType": "StructuredDocumentation",
"src": "964:188:1",
"text": " @dev Returns the ceiling of the division of two numbers.\n This differs from standard division with `/` in that it rounds up instead\n of rounding down."
},
"id": 319,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "ceilDiv",
"nameLocation": "1166:7:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 300,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 297,
"mutability": "mutable",
"name": "a",
"nameLocation": "1182:1:1",
"nodeType": "VariableDeclaration",
"scope": 319,
"src": "1174:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 296,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1174:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 299,
"mutability": "mutable",
"name": "b",
"nameLocation": "1193:1:1",
"nodeType": "VariableDeclaration",
"scope": 319,
"src": "1185:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 298,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1185:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1173:22:1"
},
"returnParameters": {
"id": 303,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 302,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 319,
"src": "1219:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 301,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1219:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1218:9:1"
},
"scope": 1094,
"src": "1157:194:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 441,
"nodeType": "Block",
"src": "1765:4115:1",
"statements": [
{
"id": 440,
"nodeType": "UncheckedBlock",
"src": "1775:4099:1",
"statements": [
{
"assignments": [
332
],
"declarations": [
{
"constant": false,
"id": 332,
"mutability": "mutable",
"name": "prod0",
"nameLocation": "2104:5:1",
"nodeType": "VariableDeclaration",
"scope": 440,
"src": "2096:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 331,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2096:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 333,
"nodeType": "VariableDeclarationStatement",
"src": "2096:13:1"
},
{
"assignments": [
335
],
"declarations": [
{
"constant": false,
"id": 335,
"mutability": "mutable",
"name": "prod1",
"nameLocation": "2176:5:1",
"nodeType": "VariableDeclaration",
"scope": 440,
"src": "2168:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 334,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2168:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 336,
"nodeType": "VariableDeclarationStatement",
"src": "2168:13:1"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "2248:157:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "2266:30:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2283:1:1"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2286:1:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2293:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "2289:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2289:6:1"
}
],
"functionName": {
"name": "mulmod",
"nodeType": "YulIdentifier",
"src": "2276:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2276:20:1"
},
"variables": [
{
"name": "mm",
"nodeType": "YulTypedName",
"src": "2270:2:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "2313:18:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2326:1:1"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2329:1:1"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "2322:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2322:9:1"
},
"variableNames": [
{
"name": "prod0",
"nodeType": "YulIdentifier",
"src": "2313:5:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "2348:43:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "mm",
"nodeType": "YulIdentifier",
"src": "2365:2:1"
},
{
"name": "prod0",
"nodeType": "YulIdentifier",
"src": "2369:5:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "2361:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2361:14:1"
},
{
"arguments": [
{
"name": "mm",
"nodeType": "YulIdentifier",
"src": "2380:2:1"
},
{
"name": "prod0",
"nodeType": "YulIdentifier",
"src": "2384:5:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "2377:2:1"
},
"nodeType": "YulFunctionCall",
"src": "2377:13:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "2357:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2357:34:1"
},
"variableNames": [
{
"name": "prod1",
"nodeType": "YulIdentifier",
"src": "2348:5:1"
}
]
}
]
},
"evmVersion": "paris",
"externalReferences": [
{
"declaration": 332,
"isOffset": false,
"isSlot": false,
"src": "2313:5:1",
"valueSize": 1
},
{
"declaration": 332,
"isOffset": false,
"isSlot": false,
"src": "2369:5:1",
"valueSize": 1
},
{
"declaration": 332,
"isOffset": false,
"isSlot": false,
"src": "2384:5:1",
"valueSize": 1
},
{
"declaration": 335,
"isOffset": false,
"isSlot": false,
"src": "2348:5:1",
"valueSize": 1
},
{
"declaration": 322,
"isOffset": false,
"isSlot": false,
"src": "2283:1:1",
"valueSize": 1
},
{
"declaration": 322,
"isOffset": false,
"isSlot": false,
"src": "2326:1:1",
"valueSize": 1
},
{
"declaration": 324,
"isOffset": false,
"isSlot": false,
"src": "2286:1:1",
"valueSize": 1
},
{
"declaration": 324,
"isOffset": false,
"isSlot": false,
"src": "2329:1:1",
"valueSize": 1
}
],
"id": 337,
"nodeType": "InlineAssembly",
"src": "2239:166:1"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 340,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 338,
"name": "prod1",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 335,
"src": "2486:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 339,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2495:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2486:10:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 346,
"nodeType": "IfStatement",
"src": "2482:368:1",
"trueBody": {
"id": 345,
"nodeType": "Block",
"src": "2498:352:1",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 343,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 341,
"name": "prod0",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 332,
"src": "2816:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 342,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "2824:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2816:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 330,
"id": 344,
"nodeType": "Return",
"src": "2809:26:1"
}
]
}
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 350,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 348,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "2960:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 349,
"name": "prod1",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 335,
"src": "2974:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2960:19:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4d6174683a206d756c446976206f766572666c6f77",
"id": 351,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2981:23:1",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_d87093691d63b122ac2c14d1b11554b287e2431cf2b03550b3be7cffb0f86851",
"typeString": "literal_string \"Math: mulDiv overflow\""
},
"value": "Math: mulDiv overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_d87093691d63b122ac2c14d1b11554b287e2431cf2b03550b3be7cffb0f86851",
"typeString": "literal_string \"Math: mulDiv overflow\""
}
],
"id": 347,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2952:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 352,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2952:53:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 353,
"nodeType": "ExpressionStatement",
"src": "2952:53:1"
},
{
"assignments": [
355
],
"declarations": [
{
"constant": false,
"id": 355,
"mutability": "mutable",
"name": "remainder",
"nameLocation": "3269:9:1",
"nodeType": "VariableDeclaration",
"scope": 440,
"src": "3261:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 354,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3261:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 356,
"nodeType": "VariableDeclarationStatement",
"src": "3261:17:1"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "3301:291:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3370:38:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "3390:1:1"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "3393:1:1"
},
{
"name": "denominator",
"nodeType": "YulIdentifier",
"src": "3396:11:1"
}
],
"functionName": {
"name": "mulmod",
"nodeType": "YulIdentifier",
"src": "3383:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3383:25:1"
},
"variableNames": [
{
"name": "remainder",
"nodeType": "YulIdentifier",
"src": "3370:9:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "3490:41:1",
"value": {
"arguments": [
{
"name": "prod1",
"nodeType": "YulIdentifier",
"src": "3503:5:1"
},
{
"arguments": [
{
"name": "remainder",
"nodeType": "YulIdentifier",
"src": "3513:9:1"
},
{
"name": "prod0",
"nodeType": "YulIdentifier",
"src": "3524:5:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "3510:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3510:20:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "3499:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3499:32:1"
},
"variableNames": [
{
"name": "prod1",
"nodeType": "YulIdentifier",
"src": "3490:5:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "3548:30:1",
"value": {
"arguments": [
{
"name": "prod0",
"nodeType": "YulIdentifier",
"src": "3561:5:1"
},
{
"name": "remainder",
"nodeType": "YulIdentifier",
"src": "3568:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "3557:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3557:21:1"
},
"variableNames": [
{
"name": "prod0",
"nodeType": "YulIdentifier",
"src": "3548:5:1"
}
]
}
]
},
"evmVersion": "paris",
"externalReferences": [
{
"declaration": 326,
"isOffset": false,
"isSlot": false,
"src": "3396:11:1",
"valueSize": 1
},
{
"declaration": 332,
"isOffset": false,
"isSlot": false,
"src": "3524:5:1",
"valueSize": 1
},
{
"declaration": 332,
"isOffset": false,
"isSlot": false,
"src": "3548:5:1",
"valueSize": 1
},
{
"declaration": 332,
"isOffset": false,
"isSlot": false,
"src": "3561:5:1",
"valueSize": 1
},
{
"declaration": 335,
"isOffset": false,
"isSlot": false,
"src": "3490:5:1",
"valueSize": 1
},
{
"declaration": 335,
"isOffset": false,
"isSlot": false,
"src": "3503:5:1",
"valueSize": 1
},
{
"declaration": 355,
"isOffset": false,
"isSlot": false,
"src": "3370:9:1",
"valueSize": 1
},
{
"declaration": 355,
"isOffset": false,
"isSlot": false,
"src": "3513:9:1",
"valueSize": 1
},
{
"declaration": 355,
"isOffset": false,
"isSlot": false,
"src": "3568:9:1",
"valueSize": 1
},
{
"declaration": 322,
"isOffset": false,
"isSlot": false,
"src": "3390:1:1",
"valueSize": 1
},
{
"declaration": 324,
"isOffset": false,
"isSlot": false,
"src": "3393:1:1",
"valueSize": 1
}
],
"id": 357,
"nodeType": "InlineAssembly",
"src": "3292:300:1"
},
{
"assignments": [
359
],
"declarations": [
{
"constant": false,
"id": 359,
"mutability": "mutable",
"name": "twos",
"nameLocation": "3907:4:1",
"nodeType": "VariableDeclaration",
"scope": 440,
"src": "3899:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 358,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3899:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 367,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 366,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 360,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "3914:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "~",
"prefix": true,
"src": "3929:12:1",
"subExpression": {
"id": 361,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "3930:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 363,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3944:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "3929:16:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 365,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "3928:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3914:32:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3899:47:1"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "3969:362:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4034:37:1",
"value": {
"arguments": [
{
"name": "denominator",
"nodeType": "YulIdentifier",
"src": "4053:11:1"
},
{
"name": "twos",
"nodeType": "YulIdentifier",
"src": "4066:4:1"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "4049:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4049:22:1"
},
"variableNames": [
{
"name": "denominator",
"nodeType": "YulIdentifier",
"src": "4034:11:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "4138:25:1",
"value": {
"arguments": [
{
"name": "prod0",
"nodeType": "YulIdentifier",
"src": "4151:5:1"
},
{
"name": "twos",
"nodeType": "YulIdentifier",
"src": "4158:4:1"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "4147:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4147:16:1"
},
"variableNames": [
{
"name": "prod0",
"nodeType": "YulIdentifier",
"src": "4138:5:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "4278:39:1",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4298:1:1",
"type": "",
"value": "0"
},
{
"name": "twos",
"nodeType": "YulIdentifier",
"src": "4301:4:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "4294:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4294:12:1"
},
{
"name": "twos",
"nodeType": "YulIdentifier",
"src": "4308:4:1"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "4290:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4290:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4315:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4286:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4286:31:1"
},
"variableNames": [
{
"name": "twos",
"nodeType": "YulIdentifier",
"src": "4278:4:1"
}
]
}
]
},
"evmVersion": "paris",
"externalReferences": [
{
"declaration": 326,
"isOffset": false,
"isSlot": false,
"src": "4034:11:1",
"valueSize": 1
},
{
"declaration": 326,
"isOffset": false,
"isSlot": false,
"src": "4053:11:1",
"valueSize": 1
},
{
"declaration": 332,
"isOffset": false,
"isSlot": false,
"src": "4138:5:1",
"valueSize": 1
},
{
"declaration": 332,
"isOffset": false,
"isSlot": false,
"src": "4151:5:1",
"valueSize": 1
},
{
"declaration": 359,
"isOffset": false,
"isSlot": false,
"src": "4066:4:1",
"valueSize": 1
},
{
"declaration": 359,
"isOffset": false,
"isSlot": false,
"src": "4158:4:1",
"valueSize": 1
},
{
"declaration": 359,
"isOffset": false,
"isSlot": false,
"src": "4278:4:1",
"valueSize": 1
},
{
"declaration": 359,
"isOffset": false,
"isSlot": false,
"src": "4301:4:1",
"valueSize": 1
},
{
"declaration": 359,
"isOffset": false,
"isSlot": false,
"src": "4308:4:1",
"valueSize": 1
}
],
"id": 368,
"nodeType": "InlineAssembly",
"src": "3960:371:1"
},
{
"expression": {
"id": 373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 369,
"name": "prod0",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 332,
"src": "4397:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "|=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 370,
"name": "prod1",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 335,
"src": "4406:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 371,
"name": "twos",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 359,
"src": "4414:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4406:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4397:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 374,
"nodeType": "ExpressionStatement",
"src": "4397:21:1"
},
{
"assignments": [
376
],
"declarations": [
{
"constant": false,
"id": 376,
"mutability": "mutable",
"name": "inverse",
"nameLocation": "4744:7:1",
"nodeType": "VariableDeclaration",
"scope": 440,
"src": "4736:15:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 375,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4736:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 383,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 382,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 379,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "33",
"id": 377,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4755:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 378,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "4759:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4755:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 380,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "4754:17:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"hexValue": "32",
"id": 381,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4774:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "4754:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4736:39:1"
},
{
"expression": {
"id": 390,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 384,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "4992:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 389,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 385,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5003:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 388,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 386,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "5007:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 387,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5021:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5007:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5003:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4992:36:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 391,
"nodeType": "ExpressionStatement",
"src": "4992:36:1"
},
{
"expression": {
"id": 398,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 392,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5061:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 397,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 393,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5072:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 396,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 394,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "5076:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 395,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5090:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5076:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5072:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5061:36:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 399,
"nodeType": "ExpressionStatement",
"src": "5061:36:1"
},
{
"expression": {
"id": 406,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 400,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5131:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 405,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 401,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5142:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 404,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 402,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "5146:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 403,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5160:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5146:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5142:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5131:36:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 407,
"nodeType": "ExpressionStatement",
"src": "5131:36:1"
},
{
"expression": {
"id": 414,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 408,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5201:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 409,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5212:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 412,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 410,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "5216:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 411,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5230:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5216:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5212:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5201:36:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 415,
"nodeType": "ExpressionStatement",
"src": "5201:36:1"
},
{
"expression": {
"id": 422,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 416,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5271:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 417,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5282:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 420,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 418,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "5286:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 419,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5300:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5286:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5282:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5271:36:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 423,
"nodeType": "ExpressionStatement",
"src": "5271:36:1"
},
{
"expression": {
"id": 430,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 424,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5342:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 429,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 425,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5353:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 428,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 426,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 326,
"src": "5357:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 427,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5371:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5357:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5353:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5342:36:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 431,
"nodeType": "ExpressionStatement",
"src": "5342:36:1"
},
{
"expression": {
"id": 436,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 432,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 329,
"src": "5812:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 435,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 433,
"name": "prod0",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 332,
"src": "5821:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 434,
"name": "inverse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "5829:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5821:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5812:24:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 437,
"nodeType": "ExpressionStatement",
"src": "5812:24:1"
},
{
"expression": {
"id": 438,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 329,
"src": "5857:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 330,
"id": 439,
"nodeType": "Return",
"src": "5850:13:1"
}
]
}
]
},
"documentation": {
"id": 320,
"nodeType": "StructuredDocumentation",
"src": "1357:305:1",
"text": " @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n with further edits by Uniswap Labs also under MIT license."
},
"id": 442,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mulDiv",
"nameLocation": "1676:6:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 327,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 322,
"mutability": "mutable",
"name": "x",
"nameLocation": "1691:1:1",
"nodeType": "VariableDeclaration",
"scope": 442,
"src": "1683:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 321,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1683:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 324,
"mutability": "mutable",
"name": "y",
"nameLocation": "1702:1:1",
"nodeType": "VariableDeclaration",
"scope": 442,
"src": "1694:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 323,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1694:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 326,
"mutability": "mutable",
"name": "denominator",
"nameLocation": "1713:11:1",
"nodeType": "VariableDeclaration",
"scope": 442,
"src": "1705:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 325,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1705:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1682:43:1"
},
"returnParameters": {
"id": 330,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 329,
"mutability": "mutable",
"name": "result",
"nameLocation": "1757:6:1",
"nodeType": "VariableDeclaration",
"scope": 442,
"src": "1749:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 328,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1749:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1748:16:1"
},
"scope": 1094,
"src": "1667:4213:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 485,
"nodeType": "Block",
"src": "6122:189:1",
"statements": [
{
"assignments": [
458
],
"declarations": [
{
"constant": false,
"id": 458,
"mutability": "mutable",
"name": "result",
"nameLocation": "6140:6:1",
"nodeType": "VariableDeclaration",
"scope": 485,
"src": "6132:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 457,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6132:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 464,
"initialValue": {
"arguments": [
{
"id": 460,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 445,
"src": "6156:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 461,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 447,
"src": "6159:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 462,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 449,
"src": "6162:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 459,
"name": "mulDiv",
"nodeType": "Identifier",
"overloadedDeclarations": [
442,
486
],
"referencedDeclaration": 442,
"src": "6149:6:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 463,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6149:25:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6132:42:1"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 476,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"id": 468,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 465,
"name": "rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 452,
"src": "6188:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 466,
"name": "Rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 235,
"src": "6200:8:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$",
"typeString": "type(enum Math.Rounding)"
}
},
"id": 467,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "6209:2:1",
"memberName": "Up",
"nodeType": "MemberAccess",
"referencedDeclaration": 233,
"src": "6200:11:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"src": "6188:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 475,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 470,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 445,
"src": "6222:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 471,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 447,
"src": "6225:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 472,
"name": "denominator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 449,
"src": "6228:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 469,
"name": "mulmod",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967280,
"src": "6215:6:1",
"typeDescriptions": {
"typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 473,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6215:25:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 474,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6243:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6215:29:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "6188:56:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 482,
"nodeType": "IfStatement",
"src": "6184:98:1",
"trueBody": {
"id": 481,
"nodeType": "Block",
"src": "6246:36:1",
"statements": [
{
"expression": {
"id": 479,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 477,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 458,
"src": "6260:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "31",
"id": 478,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6270:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "6260:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 480,
"nodeType": "ExpressionStatement",
"src": "6260:11:1"
}
]
}
},
{
"expression": {
"id": 483,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 458,
"src": "6298:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 456,
"id": 484,
"nodeType": "Return",
"src": "6291:13:1"
}
]
},
"documentation": {
"id": 443,
"nodeType": "StructuredDocumentation",
"src": "5886:121:1",
"text": " @notice Calculates x * y / denominator with full precision, following the selected rounding direction."
},
"id": 486,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mulDiv",
"nameLocation": "6021:6:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 453,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 445,
"mutability": "mutable",
"name": "x",
"nameLocation": "6036:1:1",
"nodeType": "VariableDeclaration",
"scope": 486,
"src": "6028:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 444,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6028:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 447,
"mutability": "mutable",
"name": "y",
"nameLocation": "6047:1:1",
"nodeType": "VariableDeclaration",
"scope": 486,
"src": "6039:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 446,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6039:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 449,
"mutability": "mutable",
"name": "denominator",
"nameLocation": "6058:11:1",
"nodeType": "VariableDeclaration",
"scope": 486,
"src": "6050:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 448,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6050:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 452,
"mutability": "mutable",
"name": "rounding",
"nameLocation": "6080:8:1",
"nodeType": "VariableDeclaration",
"scope": 486,
"src": "6071:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"typeName": {
"id": 451,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 450,
"name": "Rounding",
"nameLocations": [
"6071:8:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 235,
"src": "6071:8:1"
},
"referencedDeclaration": 235,
"src": "6071:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"visibility": "internal"
}
],
"src": "6027:62:1"
},
"returnParameters": {
"id": 456,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 455,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 486,
"src": "6113:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 454,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6113:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6112:9:1"
},
"scope": 1094,
"src": "6012:299:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 597,
"nodeType": "Block",
"src": "6587:1585:1",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 494,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "6601:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 495,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6606:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6601:6:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 500,
"nodeType": "IfStatement",
"src": "6597:45:1",
"trueBody": {
"id": 499,
"nodeType": "Block",
"src": "6609:33:1",
"statements": [
{
"expression": {
"hexValue": "30",
"id": 497,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6630:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 493,
"id": 498,
"nodeType": "Return",
"src": "6623:8:1"
}
]
}
},
{
"assignments": [
502
],
"declarations": [
{
"constant": false,
"id": 502,
"mutability": "mutable",
"name": "result",
"nameLocation": "7329:6:1",
"nodeType": "VariableDeclaration",
"scope": 597,
"src": "7321:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 501,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7321:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 511,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 510,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "31",
"id": 503,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7338:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"nodeType": "BinaryOperation",
"operator": "<<",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 505,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "7349:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 504,
"name": "log2",
"nodeType": "Identifier",
"overloadedDeclarations": [
766,
802
],
"referencedDeclaration": 766,
"src": "7344:4:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 506,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7344:7:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 507,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7355:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "7344:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 509,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "7343:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7338:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7321:36:1"
},
{
"id": 596,
"nodeType": "UncheckedBlock",
"src": "7758:408:1",
"statements": [
{
"expression": {
"id": 521,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 512,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7782:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 520,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 517,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 513,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7792:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 516,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 514,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "7801:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 515,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7805:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7801:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7792:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 518,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "7791:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 519,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7816:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "7791:26:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7782:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 522,
"nodeType": "ExpressionStatement",
"src": "7782:35:1"
},
{
"expression": {
"id": 532,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 523,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7831:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 531,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 528,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 524,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7841:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 527,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 525,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "7850:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 526,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7854:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7850:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7841:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 529,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "7840:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 530,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7865:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "7840:26:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7831:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 533,
"nodeType": "ExpressionStatement",
"src": "7831:35:1"
},
{
"expression": {
"id": 543,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 534,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7880:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 535,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7890:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 538,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 536,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "7899:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 537,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7903:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7899:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7890:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 540,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "7889:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 541,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7914:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "7889:26:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7880:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 544,
"nodeType": "ExpressionStatement",
"src": "7880:35:1"
},
{
"expression": {
"id": 554,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 545,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7929:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 550,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 546,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7939:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 549,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 547,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "7948:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 548,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7952:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7948:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7939:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 551,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "7938:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 552,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7963:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "7938:26:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7929:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 555,
"nodeType": "ExpressionStatement",
"src": "7929:35:1"
},
{
"expression": {
"id": 565,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 556,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7978:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 564,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 561,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 557,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "7988:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 560,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 558,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "7997:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 559,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8001:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7997:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7988:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 562,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "7987:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 563,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8012:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "7987:26:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7978:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 566,
"nodeType": "ExpressionStatement",
"src": "7978:35:1"
},
{
"expression": {
"id": 576,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 567,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8027:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 575,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 572,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 568,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8037:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 571,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 569,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "8046:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 570,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8050:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8046:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8037:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 573,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "8036:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 574,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8061:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "8036:26:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8027:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 577,
"nodeType": "ExpressionStatement",
"src": "8027:35:1"
},
{
"expression": {
"id": 587,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 578,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8076:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 586,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 583,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 579,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8086:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 582,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 580,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "8095:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 581,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8099:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8095:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8086:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 584,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "8085:21:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 585,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8110:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "8085:26:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8076:35:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 588,
"nodeType": "ExpressionStatement",
"src": "8076:35:1"
},
{
"expression": {
"arguments": [
{
"id": 590,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8136:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 593,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 591,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 489,
"src": "8144:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 592,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 502,
"src": "8148:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8144:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 589,
"name": "min",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 271,
"src": "8132:3:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8132:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 493,
"id": 595,
"nodeType": "Return",
"src": "8125:30:1"
}
]
}
]
},
"documentation": {
"id": 487,
"nodeType": "StructuredDocumentation",
"src": "6317:208:1",
"text": " @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11)."
},
"id": 598,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sqrt",
"nameLocation": "6539:4:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 490,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 489,
"mutability": "mutable",
"name": "a",
"nameLocation": "6552:1:1",
"nodeType": "VariableDeclaration",
"scope": 598,
"src": "6544:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 488,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6544:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6543:11:1"
},
"returnParameters": {
"id": 493,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 492,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 598,
"src": "6578:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 491,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6578:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6577:9:1"
},
"scope": 1094,
"src": "6530:1642:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 633,
"nodeType": "Block",
"src": "8348:161:1",
"statements": [
{
"id": 632,
"nodeType": "UncheckedBlock",
"src": "8358:145:1",
"statements": [
{
"assignments": [
610
],
"declarations": [
{
"constant": false,
"id": 610,
"mutability": "mutable",
"name": "result",
"nameLocation": "8390:6:1",
"nodeType": "VariableDeclaration",
"scope": 632,
"src": "8382:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 609,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8382:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 614,
"initialValue": {
"arguments": [
{
"id": 612,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 601,
"src": "8404:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 611,
"name": "sqrt",
"nodeType": "Identifier",
"overloadedDeclarations": [
598,
634
],
"referencedDeclaration": 598,
"src": "8399:4:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 613,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8399:7:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8382:24:1"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 630,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 615,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 610,
"src": "8427:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 625,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"id": 619,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 616,
"name": "rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 604,
"src": "8437:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 617,
"name": "Rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 235,
"src": "8449:8:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$",
"typeString": "type(enum Math.Rounding)"
}
},
"id": 618,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "8458:2:1",
"memberName": "Up",
"nodeType": "MemberAccess",
"referencedDeclaration": 233,
"src": "8449:11:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"src": "8437:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 624,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 622,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 620,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 610,
"src": "8464:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 621,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 610,
"src": "8473:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8464:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 623,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 601,
"src": "8482:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8464:19:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "8437:46:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "30",
"id": 627,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8490:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"id": 628,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "8437:54:1",
"trueExpression": {
"hexValue": "31",
"id": 626,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8486:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 629,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "8436:56:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "8427:65:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 608,
"id": 631,
"nodeType": "Return",
"src": "8420:72:1"
}
]
}
]
},
"documentation": {
"id": 599,
"nodeType": "StructuredDocumentation",
"src": "8178:89:1",
"text": " @notice Calculates sqrt(a), following the selected rounding direction."
},
"id": 634,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sqrt",
"nameLocation": "8281:4:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 605,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 601,
"mutability": "mutable",
"name": "a",
"nameLocation": "8294:1:1",
"nodeType": "VariableDeclaration",
"scope": 634,
"src": "8286:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 600,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8286:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 604,
"mutability": "mutable",
"name": "rounding",
"nameLocation": "8306:8:1",
"nodeType": "VariableDeclaration",
"scope": 634,
"src": "8297:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"typeName": {
"id": 603,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 602,
"name": "Rounding",
"nameLocations": [
"8297:8:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 235,
"src": "8297:8:1"
},
"referencedDeclaration": 235,
"src": "8297:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"visibility": "internal"
}
],
"src": "8285:30:1"
},
"returnParameters": {
"id": 608,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 607,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 634,
"src": "8339:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 606,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8339:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "8338:9:1"
},
"scope": 1094,
"src": "8272:237:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 765,
"nodeType": "Block",
"src": "8694:922:1",
"statements": [
{
"assignments": [
643
],
"declarations": [
{
"constant": false,
"id": 643,
"mutability": "mutable",
"name": "result",
"nameLocation": "8712:6:1",
"nodeType": "VariableDeclaration",
"scope": 765,
"src": "8704:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 642,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8704:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 645,
"initialValue": {
"hexValue": "30",
"id": 644,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8721:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "8704:18:1"
},
{
"id": 762,
"nodeType": "UncheckedBlock",
"src": "8732:855:1",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 650,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 648,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 646,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "8760:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "313238",
"id": 647,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8769:3:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "8760:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 649,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8775:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "8760:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 660,
"nodeType": "IfStatement",
"src": "8756:99:1",
"trueBody": {
"id": 659,
"nodeType": "Block",
"src": "8778:77:1",
"statements": [
{
"expression": {
"id": 653,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 651,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "8796:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "313238",
"id": 652,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8806:3:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "8796:13:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 654,
"nodeType": "ExpressionStatement",
"src": "8796:13:1"
},
{
"expression": {
"id": 657,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 655,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "8827:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "313238",
"id": 656,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8837:3:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "8827:13:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 658,
"nodeType": "ExpressionStatement",
"src": "8827:13:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 665,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 663,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 661,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "8872:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "3634",
"id": 662,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8881:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "8872:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 664,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8886:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "8872:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 675,
"nodeType": "IfStatement",
"src": "8868:96:1",
"trueBody": {
"id": 674,
"nodeType": "Block",
"src": "8889:75:1",
"statements": [
{
"expression": {
"id": 668,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 666,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "8907:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3634",
"id": 667,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8917:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "8907:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 669,
"nodeType": "ExpressionStatement",
"src": "8907:12:1"
},
{
"expression": {
"id": 672,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 670,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "8937:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3634",
"id": 671,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8947:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "8937:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 673,
"nodeType": "ExpressionStatement",
"src": "8937:12:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 680,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 678,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 676,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "8981:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "3332",
"id": 677,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8990:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "8981:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 679,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8995:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "8981:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 690,
"nodeType": "IfStatement",
"src": "8977:96:1",
"trueBody": {
"id": 689,
"nodeType": "Block",
"src": "8998:75:1",
"statements": [
{
"expression": {
"id": 683,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 681,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9016:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3332",
"id": 682,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9026:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "9016:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 684,
"nodeType": "ExpressionStatement",
"src": "9016:12:1"
},
{
"expression": {
"id": 687,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 685,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "9046:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3332",
"id": 686,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9056:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "9046:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 688,
"nodeType": "ExpressionStatement",
"src": "9046:12:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 695,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 693,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 691,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9090:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "3136",
"id": 692,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9099:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "9090:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 694,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9104:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "9090:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 705,
"nodeType": "IfStatement",
"src": "9086:96:1",
"trueBody": {
"id": 704,
"nodeType": "Block",
"src": "9107:75:1",
"statements": [
{
"expression": {
"id": 698,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 696,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9125:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3136",
"id": 697,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9135:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "9125:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 699,
"nodeType": "ExpressionStatement",
"src": "9125:12:1"
},
{
"expression": {
"id": 702,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 700,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "9155:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3136",
"id": 701,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9165:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "9155:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 703,
"nodeType": "ExpressionStatement",
"src": "9155:12:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 710,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 708,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 706,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9199:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "38",
"id": 707,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9208:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "9199:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 709,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9212:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "9199:14:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 720,
"nodeType": "IfStatement",
"src": "9195:93:1",
"trueBody": {
"id": 719,
"nodeType": "Block",
"src": "9215:73:1",
"statements": [
{
"expression": {
"id": 713,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 711,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9233:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "38",
"id": 712,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9243:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "9233:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 714,
"nodeType": "ExpressionStatement",
"src": "9233:11:1"
},
{
"expression": {
"id": 717,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 715,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "9262:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "38",
"id": 716,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9272:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "9262:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 718,
"nodeType": "ExpressionStatement",
"src": "9262:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 725,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 723,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 721,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9305:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "34",
"id": 722,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9314:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "9305:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 724,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9318:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "9305:14:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 735,
"nodeType": "IfStatement",
"src": "9301:93:1",
"trueBody": {
"id": 734,
"nodeType": "Block",
"src": "9321:73:1",
"statements": [
{
"expression": {
"id": 728,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 726,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9339:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "34",
"id": 727,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9349:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "9339:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 729,
"nodeType": "ExpressionStatement",
"src": "9339:11:1"
},
{
"expression": {
"id": 732,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 730,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "9368:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "34",
"id": 731,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9378:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "9368:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 733,
"nodeType": "ExpressionStatement",
"src": "9368:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 738,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 736,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9411:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "32",
"id": 737,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9420:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "9411:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 739,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9424:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "9411:14:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 750,
"nodeType": "IfStatement",
"src": "9407:93:1",
"trueBody": {
"id": 749,
"nodeType": "Block",
"src": "9427:73:1",
"statements": [
{
"expression": {
"id": 743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 741,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9445:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "32",
"id": 742,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9455:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "9445:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 744,
"nodeType": "ExpressionStatement",
"src": "9445:11:1"
},
{
"expression": {
"id": 747,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 745,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "9474:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "32",
"id": 746,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9484:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "9474:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 748,
"nodeType": "ExpressionStatement",
"src": "9474:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 755,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 753,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 751,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 637,
"src": "9517:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 752,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9526:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "9517:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 754,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9530:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "9517:14:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 761,
"nodeType": "IfStatement",
"src": "9513:64:1",
"trueBody": {
"id": 760,
"nodeType": "Block",
"src": "9533:44:1",
"statements": [
{
"expression": {
"id": 758,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 756,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "9551:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "31",
"id": 757,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9561:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "9551:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 759,
"nodeType": "ExpressionStatement",
"src": "9551:11:1"
}
]
}
}
]
},
{
"expression": {
"id": 763,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 643,
"src": "9603:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 641,
"id": 764,
"nodeType": "Return",
"src": "9596:13:1"
}
]
},
"documentation": {
"id": 635,
"nodeType": "StructuredDocumentation",
"src": "8515:113:1",
"text": " @dev Return the log in base 2, rounded down, of a positive value.\n Returns 0 if given 0."
},
"id": 766,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "log2",
"nameLocation": "8642:4:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 638,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 637,
"mutability": "mutable",
"name": "value",
"nameLocation": "8655:5:1",
"nodeType": "VariableDeclaration",
"scope": 766,
"src": "8647:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 636,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8647:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "8646:15:1"
},
"returnParameters": {
"id": 641,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 640,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 766,
"src": "8685:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 639,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8685:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "8684:9:1"
},
"scope": 1094,
"src": "8633:983:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 801,
"nodeType": "Block",
"src": "9849:165:1",
"statements": [
{
"id": 800,
"nodeType": "UncheckedBlock",
"src": "9859:149:1",
"statements": [
{
"assignments": [
778
],
"declarations": [
{
"constant": false,
"id": 778,
"mutability": "mutable",
"name": "result",
"nameLocation": "9891:6:1",
"nodeType": "VariableDeclaration",
"scope": 800,
"src": "9883:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 777,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9883:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 782,
"initialValue": {
"arguments": [
{
"id": 780,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 769,
"src": "9905:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 779,
"name": "log2",
"nodeType": "Identifier",
"overloadedDeclarations": [
766,
802
],
"referencedDeclaration": 766,
"src": "9900:4:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 781,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9900:11:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9883:28:1"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 798,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 783,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 778,
"src": "9932:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 793,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"id": 787,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 784,
"name": "rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 772,
"src": "9942:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 785,
"name": "Rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 235,
"src": "9954:8:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$",
"typeString": "type(enum Math.Rounding)"
}
},
"id": 786,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "9963:2:1",
"memberName": "Up",
"nodeType": "MemberAccess",
"referencedDeclaration": 233,
"src": "9954:11:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"src": "9942:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 792,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 790,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "31",
"id": 788,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9969:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"nodeType": "BinaryOperation",
"operator": "<<",
"rightExpression": {
"id": 789,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 778,
"src": "9974:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9969:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 791,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 769,
"src": "9983:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9969:19:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "9942:46:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "30",
"id": 795,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9995:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"id": 796,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "9942:54:1",
"trueExpression": {
"hexValue": "31",
"id": 794,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9991:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 797,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "9941:56:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "9932:65:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 776,
"id": 799,
"nodeType": "Return",
"src": "9925:72:1"
}
]
}
]
},
"documentation": {
"id": 767,
"nodeType": "StructuredDocumentation",
"src": "9622:142:1",
"text": " @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n Returns 0 if given 0."
},
"id": 802,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "log2",
"nameLocation": "9778:4:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 773,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 769,
"mutability": "mutable",
"name": "value",
"nameLocation": "9791:5:1",
"nodeType": "VariableDeclaration",
"scope": 802,
"src": "9783:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 768,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9783:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 772,
"mutability": "mutable",
"name": "rounding",
"nameLocation": "9807:8:1",
"nodeType": "VariableDeclaration",
"scope": 802,
"src": "9798:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"typeName": {
"id": 771,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 770,
"name": "Rounding",
"nameLocations": [
"9798:8:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 235,
"src": "9798:8:1"
},
"referencedDeclaration": 235,
"src": "9798:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"visibility": "internal"
}
],
"src": "9782:34:1"
},
"returnParameters": {
"id": 776,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 775,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 802,
"src": "9840:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 774,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9840:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "9839:9:1"
},
"scope": 1094,
"src": "9769:245:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 930,
"nodeType": "Block",
"src": "10201:854:1",
"statements": [
{
"assignments": [
811
],
"declarations": [
{
"constant": false,
"id": 811,
"mutability": "mutable",
"name": "result",
"nameLocation": "10219:6:1",
"nodeType": "VariableDeclaration",
"scope": 930,
"src": "10211:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 810,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10211:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 813,
"initialValue": {
"hexValue": "30",
"id": 812,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10228:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "10211:18:1"
},
{
"id": 927,
"nodeType": "UncheckedBlock",
"src": "10239:787:1",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 818,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 814,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10267:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1",
"typeString": "int_const 1000...(57 digits omitted)...0000"
},
"id": 817,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 815,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10276:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "3634",
"id": 816,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10282:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "10276:8:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1",
"typeString": "int_const 1000...(57 digits omitted)...0000"
}
},
"src": "10267:17:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 830,
"nodeType": "IfStatement",
"src": "10263:103:1",
"trueBody": {
"id": 829,
"nodeType": "Block",
"src": "10286:80:1",
"statements": [
{
"expression": {
"id": 823,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 819,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10304:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1",
"typeString": "int_const 1000...(57 digits omitted)...0000"
},
"id": 822,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 820,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10313:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "3634",
"id": 821,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10319:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "10313:8:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1",
"typeString": "int_const 1000...(57 digits omitted)...0000"
}
},
"src": "10304:17:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 824,
"nodeType": "ExpressionStatement",
"src": "10304:17:1"
},
{
"expression": {
"id": 827,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 825,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 811,
"src": "10339:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3634",
"id": 826,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10349:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "10339:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 828,
"nodeType": "ExpressionStatement",
"src": "10339:12:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 835,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 831,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10383:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1",
"typeString": "int_const 1000...(25 digits omitted)...0000"
},
"id": 834,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 832,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10392:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "3332",
"id": 833,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10398:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "10392:8:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1",
"typeString": "int_const 1000...(25 digits omitted)...0000"
}
},
"src": "10383:17:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 847,
"nodeType": "IfStatement",
"src": "10379:103:1",
"trueBody": {
"id": 846,
"nodeType": "Block",
"src": "10402:80:1",
"statements": [
{
"expression": {
"id": 840,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 836,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10420:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1",
"typeString": "int_const 1000...(25 digits omitted)...0000"
},
"id": 839,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 837,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10429:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "3332",
"id": 838,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10435:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "10429:8:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1",
"typeString": "int_const 1000...(25 digits omitted)...0000"
}
},
"src": "10420:17:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 841,
"nodeType": "ExpressionStatement",
"src": "10420:17:1"
},
{
"expression": {
"id": 844,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 842,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 811,
"src": "10455:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3332",
"id": 843,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10465:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "10455:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 845,
"nodeType": "ExpressionStatement",
"src": "10455:12:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 852,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 848,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10499:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_rational_10000000000000000_by_1",
"typeString": "int_const 10000000000000000"
},
"id": 851,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 849,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10508:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "3136",
"id": 850,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10514:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "10508:8:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10000000000000000_by_1",
"typeString": "int_const 10000000000000000"
}
},
"src": "10499:17:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 864,
"nodeType": "IfStatement",
"src": "10495:103:1",
"trueBody": {
"id": 863,
"nodeType": "Block",
"src": "10518:80:1",
"statements": [
{
"expression": {
"id": 857,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 853,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10536:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_rational_10000000000000000_by_1",
"typeString": "int_const 10000000000000000"
},
"id": 856,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 854,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10545:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "3136",
"id": 855,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10551:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "10545:8:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10000000000000000_by_1",
"typeString": "int_const 10000000000000000"
}
},
"src": "10536:17:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 858,
"nodeType": "ExpressionStatement",
"src": "10536:17:1"
},
{
"expression": {
"id": 861,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 859,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 811,
"src": "10571:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3136",
"id": 860,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10581:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "10571:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 862,
"nodeType": "ExpressionStatement",
"src": "10571:12:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 865,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10615:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_rational_100000000_by_1",
"typeString": "int_const 100000000"
},
"id": 868,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 866,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10624:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "38",
"id": 867,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10630:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "10624:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_100000000_by_1",
"typeString": "int_const 100000000"
}
},
"src": "10615:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 881,
"nodeType": "IfStatement",
"src": "10611:100:1",
"trueBody": {
"id": 880,
"nodeType": "Block",
"src": "10633:78:1",
"statements": [
{
"expression": {
"id": 874,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 870,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10651:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_rational_100000000_by_1",
"typeString": "int_const 100000000"
},
"id": 873,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 871,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10660:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "38",
"id": 872,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10666:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "10660:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_100000000_by_1",
"typeString": "int_const 100000000"
}
},
"src": "10651:16:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 875,
"nodeType": "ExpressionStatement",
"src": "10651:16:1"
},
{
"expression": {
"id": 878,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 876,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 811,
"src": "10685:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "38",
"id": 877,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10695:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "10685:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 879,
"nodeType": "ExpressionStatement",
"src": "10685:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 886,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 882,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10728:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_rational_10000_by_1",
"typeString": "int_const 10000"
},
"id": 885,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 883,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10737:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "34",
"id": 884,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10743:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "10737:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10000_by_1",
"typeString": "int_const 10000"
}
},
"src": "10728:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 898,
"nodeType": "IfStatement",
"src": "10724:100:1",
"trueBody": {
"id": 897,
"nodeType": "Block",
"src": "10746:78:1",
"statements": [
{
"expression": {
"id": 891,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 887,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10764:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_rational_10000_by_1",
"typeString": "int_const 10000"
},
"id": 890,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 888,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10773:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "34",
"id": 889,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10779:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "10773:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10000_by_1",
"typeString": "int_const 10000"
}
},
"src": "10764:16:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 892,
"nodeType": "ExpressionStatement",
"src": "10764:16:1"
},
{
"expression": {
"id": 895,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 893,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 811,
"src": "10798:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "34",
"id": 894,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10808:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "10798:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 896,
"nodeType": "ExpressionStatement",
"src": "10798:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 903,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 899,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10841:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_rational_100_by_1",
"typeString": "int_const 100"
},
"id": 902,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 900,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10850:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "32",
"id": 901,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10856:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "10850:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_100_by_1",
"typeString": "int_const 100"
}
},
"src": "10841:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 915,
"nodeType": "IfStatement",
"src": "10837:100:1",
"trueBody": {
"id": 914,
"nodeType": "Block",
"src": "10859:78:1",
"statements": [
{
"expression": {
"id": 908,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 904,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10877:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_rational_100_by_1",
"typeString": "int_const 100"
},
"id": 907,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 905,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10886:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "32",
"id": 906,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10892:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "10886:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_100_by_1",
"typeString": "int_const 100"
}
},
"src": "10877:16:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 909,
"nodeType": "ExpressionStatement",
"src": "10877:16:1"
},
{
"expression": {
"id": 912,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 910,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 811,
"src": "10911:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "32",
"id": 911,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10921:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "10911:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 913,
"nodeType": "ExpressionStatement",
"src": "10911:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 920,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 916,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "10954:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"id": 919,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 917,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10963:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "31",
"id": 918,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10969:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "10963:7:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
}
},
"src": "10954:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 926,
"nodeType": "IfStatement",
"src": "10950:66:1",
"trueBody": {
"id": 925,
"nodeType": "Block",
"src": "10972:44:1",
"statements": [
{
"expression": {
"id": 923,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 921,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 811,
"src": "10990:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "31",
"id": 922,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11000:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "10990:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 924,
"nodeType": "ExpressionStatement",
"src": "10990:11:1"
}
]
}
}
]
},
{
"expression": {
"id": 928,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 811,
"src": "11042:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 809,
"id": 929,
"nodeType": "Return",
"src": "11035:13:1"
}
]
},
"documentation": {
"id": 803,
"nodeType": "StructuredDocumentation",
"src": "10020:114:1",
"text": " @dev Return the log in base 10, rounded down, of a positive value.\n Returns 0 if given 0."
},
"id": 931,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "log10",
"nameLocation": "10148:5:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 806,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 805,
"mutability": "mutable",
"name": "value",
"nameLocation": "10162:5:1",
"nodeType": "VariableDeclaration",
"scope": 931,
"src": "10154:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 804,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10154:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "10153:15:1"
},
"returnParameters": {
"id": 809,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 808,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 931,
"src": "10192:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 807,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10192:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "10191:9:1"
},
"scope": 1094,
"src": "10139:916:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 966,
"nodeType": "Block",
"src": "11290:167:1",
"statements": [
{
"id": 965,
"nodeType": "UncheckedBlock",
"src": "11300:151:1",
"statements": [
{
"assignments": [
943
],
"declarations": [
{
"constant": false,
"id": 943,
"mutability": "mutable",
"name": "result",
"nameLocation": "11332:6:1",
"nodeType": "VariableDeclaration",
"scope": 965,
"src": "11324:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 942,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11324:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 947,
"initialValue": {
"arguments": [
{
"id": 945,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 934,
"src": "11347:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 944,
"name": "log10",
"nodeType": "Identifier",
"overloadedDeclarations": [
931,
967
],
"referencedDeclaration": 931,
"src": "11341:5:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 946,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11341:12:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11324:29:1"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 963,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 948,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 943,
"src": "11374:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 958,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"id": 952,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 949,
"name": "rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 937,
"src": "11384:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 950,
"name": "Rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 235,
"src": "11396:8:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$",
"typeString": "type(enum Math.Rounding)"
}
},
"id": 951,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "11405:2:1",
"memberName": "Up",
"nodeType": "MemberAccess",
"referencedDeclaration": 233,
"src": "11396:11:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"src": "11384:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 957,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 955,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 953,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11411:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"id": 954,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 943,
"src": "11417:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11411:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 956,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 934,
"src": "11426:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11411:20:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "11384:47:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "30",
"id": 960,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11438:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"id": 961,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "11384:55:1",
"trueExpression": {
"hexValue": "31",
"id": 959,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11434:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 962,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "11383:57:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "11374:66:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 941,
"id": 964,
"nodeType": "Return",
"src": "11367:73:1"
}
]
}
]
},
"documentation": {
"id": 932,
"nodeType": "StructuredDocumentation",
"src": "11061:143:1",
"text": " @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n Returns 0 if given 0."
},
"id": 967,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "log10",
"nameLocation": "11218:5:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 938,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 934,
"mutability": "mutable",
"name": "value",
"nameLocation": "11232:5:1",
"nodeType": "VariableDeclaration",
"scope": 967,
"src": "11224:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 933,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11224:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 937,
"mutability": "mutable",
"name": "rounding",
"nameLocation": "11248:8:1",
"nodeType": "VariableDeclaration",
"scope": 967,
"src": "11239:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"typeName": {
"id": 936,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 935,
"name": "Rounding",
"nameLocations": [
"11239:8:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 235,
"src": "11239:8:1"
},
"referencedDeclaration": 235,
"src": "11239:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"visibility": "internal"
}
],
"src": "11223:34:1"
},
"returnParameters": {
"id": 941,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 940,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 967,
"src": "11281:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 939,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11281:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "11280:9:1"
},
"scope": 1094,
"src": "11209:248:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1053,
"nodeType": "Block",
"src": "11771:600:1",
"statements": [
{
"assignments": [
976
],
"declarations": [
{
"constant": false,
"id": 976,
"mutability": "mutable",
"name": "result",
"nameLocation": "11789:6:1",
"nodeType": "VariableDeclaration",
"scope": 1053,
"src": "11781:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 975,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11781:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 978,
"initialValue": {
"hexValue": "30",
"id": 977,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11798:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "11781:18:1"
},
{
"id": 1050,
"nodeType": "UncheckedBlock",
"src": "11809:533:1",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 983,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 981,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 979,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "11837:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "313238",
"id": 980,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11846:3:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "11837:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 982,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11852:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "11837:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 993,
"nodeType": "IfStatement",
"src": "11833:98:1",
"trueBody": {
"id": 992,
"nodeType": "Block",
"src": "11855:76:1",
"statements": [
{
"expression": {
"id": 986,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 984,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "11873:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "313238",
"id": 985,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11883:3:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "11873:13:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 987,
"nodeType": "ExpressionStatement",
"src": "11873:13:1"
},
{
"expression": {
"id": 990,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 988,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 976,
"src": "11904:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3136",
"id": 989,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11914:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "11904:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 991,
"nodeType": "ExpressionStatement",
"src": "11904:12:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 998,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 996,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 994,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "11948:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "3634",
"id": 995,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11957:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "11948:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 997,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11962:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "11948:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1008,
"nodeType": "IfStatement",
"src": "11944:95:1",
"trueBody": {
"id": 1007,
"nodeType": "Block",
"src": "11965:74:1",
"statements": [
{
"expression": {
"id": 1001,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 999,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "11983:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3634",
"id": 1000,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11993:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "11983:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1002,
"nodeType": "ExpressionStatement",
"src": "11983:12:1"
},
{
"expression": {
"id": 1005,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1003,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 976,
"src": "12013:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "38",
"id": 1004,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12023:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "12013:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1006,
"nodeType": "ExpressionStatement",
"src": "12013:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1013,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1011,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1009,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "12056:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "3332",
"id": 1010,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12065:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "12056:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 1012,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12070:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "12056:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1023,
"nodeType": "IfStatement",
"src": "12052:95:1",
"trueBody": {
"id": 1022,
"nodeType": "Block",
"src": "12073:74:1",
"statements": [
{
"expression": {
"id": 1016,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1014,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "12091:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3332",
"id": 1015,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12101:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "12091:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1017,
"nodeType": "ExpressionStatement",
"src": "12091:12:1"
},
{
"expression": {
"id": 1020,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1018,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 976,
"src": "12121:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "34",
"id": 1019,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12131:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "12121:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1021,
"nodeType": "ExpressionStatement",
"src": "12121:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1028,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1024,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "12164:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "3136",
"id": 1025,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12173:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "12164:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 1027,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12178:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "12164:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1038,
"nodeType": "IfStatement",
"src": "12160:95:1",
"trueBody": {
"id": 1037,
"nodeType": "Block",
"src": "12181:74:1",
"statements": [
{
"expression": {
"id": 1031,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1029,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "12199:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3136",
"id": 1030,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12209:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "12199:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1032,
"nodeType": "ExpressionStatement",
"src": "12199:12:1"
},
{
"expression": {
"id": 1035,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1033,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 976,
"src": "12229:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "32",
"id": 1034,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12239:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "12229:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1036,
"nodeType": "ExpressionStatement",
"src": "12229:11:1"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1043,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1041,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1039,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 970,
"src": "12272:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "38",
"id": 1040,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12281:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "12272:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 1042,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12285:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "12272:14:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1049,
"nodeType": "IfStatement",
"src": "12268:64:1",
"trueBody": {
"id": 1048,
"nodeType": "Block",
"src": "12288:44:1",
"statements": [
{
"expression": {
"id": 1046,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1044,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 976,
"src": "12306:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "31",
"id": 1045,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12316:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "12306:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1047,
"nodeType": "ExpressionStatement",
"src": "12306:11:1"
}
]
}
}
]
},
{
"expression": {
"id": 1051,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 976,
"src": "12358:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 974,
"id": 1052,
"nodeType": "Return",
"src": "12351:13:1"
}
]
},
"documentation": {
"id": 968,
"nodeType": "StructuredDocumentation",
"src": "11463:240:1",
"text": " @dev Return the log in base 256, rounded down, of a positive value.\n Returns 0 if given 0.\n Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string."
},
"id": 1054,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "log256",
"nameLocation": "11717:6:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 971,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 970,
"mutability": "mutable",
"name": "value",
"nameLocation": "11732:5:1",
"nodeType": "VariableDeclaration",
"scope": 1054,
"src": "11724:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 969,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11724:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "11723:15:1"
},
"returnParameters": {
"id": 974,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 973,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1054,
"src": "11762:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 972,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11762:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "11761:9:1"
},
"scope": 1094,
"src": "11708:663:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1092,
"nodeType": "Block",
"src": "12608:174:1",
"statements": [
{
"id": 1091,
"nodeType": "UncheckedBlock",
"src": "12618:158:1",
"statements": [
{
"assignments": [
1066
],
"declarations": [
{
"constant": false,
"id": 1066,
"mutability": "mutable",
"name": "result",
"nameLocation": "12650:6:1",
"nodeType": "VariableDeclaration",
"scope": 1091,
"src": "12642:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1065,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "12642:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 1070,
"initialValue": {
"arguments": [
{
"id": 1068,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1057,
"src": "12666:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1067,
"name": "log256",
"nodeType": "Identifier",
"overloadedDeclarations": [
1054,
1093
],
"referencedDeclaration": 1054,
"src": "12659:6:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 1069,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12659:13:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12642:30:1"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1089,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1071,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1066,
"src": "12693:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1084,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"id": 1075,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1072,
"name": "rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1060,
"src": "12703:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 1073,
"name": "Rounding",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 235,
"src": "12715:8:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$",
"typeString": "type(enum Math.Rounding)"
}
},
"id": 1074,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "12724:2:1",
"memberName": "Up",
"nodeType": "MemberAccess",
"referencedDeclaration": 233,
"src": "12715:11:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"src": "12703:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1083,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1081,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "31",
"id": 1076,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12730:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"nodeType": "BinaryOperation",
"operator": "<<",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1079,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1077,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1066,
"src": "12736:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<<",
"rightExpression": {
"hexValue": "33",
"id": 1078,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12746:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"src": "12736:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1080,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "12735:13:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "12730:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 1082,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1057,
"src": "12751:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "12730:26:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "12703:53:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "30",
"id": 1086,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12763:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"id": 1087,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "12703:61:1",
"trueExpression": {
"hexValue": "31",
"id": 1085,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12759:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 1088,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "12702:63:1",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "12693:72:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1064,
"id": 1090,
"nodeType": "Return",
"src": "12686:79:1"
}
]
}
]
},
"documentation": {
"id": 1055,
"nodeType": "StructuredDocumentation",
"src": "12377:144:1",
"text": " @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n Returns 0 if given 0."
},
"id": 1093,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "log256",
"nameLocation": "12535:6:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1061,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1057,
"mutability": "mutable",
"name": "value",
"nameLocation": "12550:5:1",
"nodeType": "VariableDeclaration",
"scope": 1093,
"src": "12542:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1056,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "12542:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1060,
"mutability": "mutable",
"name": "rounding",
"nameLocation": "12566:8:1",
"nodeType": "VariableDeclaration",
"scope": 1093,
"src": "12557:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
},
"typeName": {
"id": 1059,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1058,
"name": "Rounding",
"nameLocations": [
"12557:8:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 235,
"src": "12557:8:1"
},
"referencedDeclaration": 235,
"src": "12557:8:1",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Rounding_$235",
"typeString": "enum Math.Rounding"
}
},
"visibility": "internal"
}
],
"src": "12541:34:1"
},
"returnParameters": {
"id": 1064,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1063,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1093,
"src": "12599:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1062,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "12599:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "12598:9:1"
},
"scope": 1094,
"src": "12526:256:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 1095,
"src": "202:12582:1",
"usedErrors": []
}
],
"src": "103:12682:1"
},
"id": 1
},
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol": {
"ast": {
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol",
"exportedSymbols": {
"SignedMath": [
1199
]
},
"id": 1200,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1096,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "109:23:2"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "SignedMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 1097,
"nodeType": "StructuredDocumentation",
"src": "134:80:2",
"text": " @dev Standard signed math utilities missing in the Solidity language."
},
"fullyImplemented": true,
"id": 1199,
"linearizedBaseContracts": [
1199
],
"name": "SignedMath",
"nameLocation": "223:10:2",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1114,
"nodeType": "Block",
"src": "375:37:2",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1109,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1107,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1100,
"src": "392:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 1108,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1102,
"src": "396:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "392:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 1111,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1102,
"src": "404:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"id": 1112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "392:13:2",
"trueExpression": {
"id": 1110,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1100,
"src": "400:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"functionReturnParameters": 1106,
"id": 1113,
"nodeType": "Return",
"src": "385:20:2"
}
]
},
"documentation": {
"id": 1098,
"nodeType": "StructuredDocumentation",
"src": "240:66:2",
"text": " @dev Returns the largest of two signed numbers."
},
"id": 1115,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nameLocation": "320:3:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1103,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1100,
"mutability": "mutable",
"name": "a",
"nameLocation": "331:1:2",
"nodeType": "VariableDeclaration",
"scope": 1115,
"src": "324:8:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1099,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "324:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1102,
"mutability": "mutable",
"name": "b",
"nameLocation": "341:1:2",
"nodeType": "VariableDeclaration",
"scope": 1115,
"src": "334:8:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1101,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "334:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "323:20:2"
},
"returnParameters": {
"id": 1106,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1105,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1115,
"src": "367:6:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1104,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "367:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "366:8:2"
},
"scope": 1199,
"src": "311:101:2",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1132,
"nodeType": "Block",
"src": "554:37:2",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1125,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1118,
"src": "571:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 1126,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1120,
"src": "575:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "571:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 1129,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1120,
"src": "583:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"id": 1130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "571:13:2",
"trueExpression": {
"id": 1128,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1118,
"src": "579:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"functionReturnParameters": 1124,
"id": 1131,
"nodeType": "Return",
"src": "564:20:2"
}
]
},
"documentation": {
"id": 1116,
"nodeType": "StructuredDocumentation",
"src": "418:67:2",
"text": " @dev Returns the smallest of two signed numbers."
},
"id": 1133,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nameLocation": "499:3:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1121,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1118,
"mutability": "mutable",
"name": "a",
"nameLocation": "510:1:2",
"nodeType": "VariableDeclaration",
"scope": 1133,
"src": "503:8:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1117,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "503:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1120,
"mutability": "mutable",
"name": "b",
"nameLocation": "520:1:2",
"nodeType": "VariableDeclaration",
"scope": 1133,
"src": "513:8:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1119,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "513:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "502:20:2"
},
"returnParameters": {
"id": 1124,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1123,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1133,
"src": "546:6:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1122,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "546:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "545:8:2"
},
"scope": 1199,
"src": "490:101:2",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1176,
"nodeType": "Block",
"src": "796:162:2",
"statements": [
{
"assignments": [
1144
],
"declarations": [
{
"constant": false,
"id": 1144,
"mutability": "mutable",
"name": "x",
"nameLocation": "865:1:2",
"nodeType": "VariableDeclaration",
"scope": 1176,
"src": "858:8:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1143,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "858:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"id": 1157,
"initialValue": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1147,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1145,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1136,
"src": "870:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"id": 1146,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1138,
"src": "874:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "870:5:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"id": 1148,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "869:7:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1154,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1151,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1149,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1136,
"src": "881:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 1150,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1138,
"src": "885:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "881:5:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"id": 1152,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "880:7:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "31",
"id": 1153,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "891:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "880:12:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"id": 1155,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "879:14:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "869:24:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "858:35:2"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1174,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1158,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1144,
"src": "910:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1172,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1166,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 1163,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1144,
"src": "930:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1162,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "922:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1161,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "922:7:2",
"typeDescriptions": {}
}
},
"id": 1164,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "922:10:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">>",
"rightExpression": {
"hexValue": "323535",
"id": 1165,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "936:3:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_255_by_1",
"typeString": "int_const 255"
},
"value": "255"
},
"src": "922:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1160,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "915:6:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int256_$",
"typeString": "type(int256)"
},
"typeName": {
"id": 1159,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "915:6:2",
"typeDescriptions": {}
}
},
"id": 1167,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "915:25:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1170,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1168,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1136,
"src": "944:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 1169,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1138,
"src": "948:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "944:5:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"id": 1171,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "943:7:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "915:35:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"id": 1173,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "914:37:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "910:41:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"functionReturnParameters": 1142,
"id": 1175,
"nodeType": "Return",
"src": "903:48:2"
}
]
},
"documentation": {
"id": 1134,
"nodeType": "StructuredDocumentation",
"src": "597:126:2",
"text": " @dev Returns the average of two signed numbers without overflow.\n The result is rounded towards zero."
},
"id": 1177,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nameLocation": "737:7:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1139,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1136,
"mutability": "mutable",
"name": "a",
"nameLocation": "752:1:2",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "745:8:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1135,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "745:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1138,
"mutability": "mutable",
"name": "b",
"nameLocation": "762:1:2",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "755:8:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1137,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "755:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "744:20:2"
},
"returnParameters": {
"id": 1142,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1141,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "788:6:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1140,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "788:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "787:8:2"
},
"scope": 1199,
"src": "728:230:2",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1197,
"nodeType": "Block",
"src": "1102:158:2",
"statements": [
{
"id": 1196,
"nodeType": "UncheckedBlock",
"src": "1112:142:2",
"statements": [
{
"expression": {
"arguments": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1189,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1187,
"name": "n",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1180,
"src": "1227:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "30",
"id": 1188,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1232:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1227:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 1192,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "-",
"prefix": true,
"src": "1240:2:2",
"subExpression": {
"id": 1191,
"name": "n",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1180,
"src": "1241:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"id": 1193,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1227:15:2",
"trueExpression": {
"id": 1190,
"name": "n",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1180,
"src": "1236:1:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1186,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1219:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1185,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1219:7:2",
"typeDescriptions": {}
}
},
"id": 1194,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1219:24:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1184,
"id": 1195,
"nodeType": "Return",
"src": "1212:31:2"
}
]
}
]
},
"documentation": {
"id": 1178,
"nodeType": "StructuredDocumentation",
"src": "964:78:2",
"text": " @dev Returns the absolute unsigned value of a signed value."
},
"id": 1198,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "abs",
"nameLocation": "1056:3:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1181,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1180,
"mutability": "mutable",
"name": "n",
"nameLocation": "1067:1:2",
"nodeType": "VariableDeclaration",
"scope": 1198,
"src": "1060:8:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1179,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1060:6:2",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1059:10:2"
},
"returnParameters": {
"id": 1184,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1183,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1198,
"src": "1093:7:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1182,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1093:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1092:9:2"
},
"scope": 1199,
"src": "1047:213:2",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 1200,
"src": "215:1047:2",
"usedErrors": []
}
],
"src": "109:1154:2"
},
"id": 2
}
}
}
}
{
"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": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033",
"opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DIV 0xAF ADDMOD PUSH31 0x7CFC141511C09ECB44889964DBA39C326908A011AC5C95EF25B8093164736F PUSH13 0x63430008120033000000000000 ",
"sourceMap": "220:2559:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DIV 0xAF ADDMOD PUSH31 0x7CFC141511C09ECB44889964DBA39C326908A011AC5C95EF25B8093164736F PUSH13 0x63430008120033000000000000 ",
"sourceMap": "220:2559:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"equal(string memory,string memory)": "infinite",
"toHexString(address)": "infinite",
"toHexString(uint256)": "infinite",
"toHexString(uint256,uint256)": "infinite",
"toString(int256)": "infinite",
"toString(uint256)": "infinite"
}
},
"methodIdentifiers": {}
},
"abi": []
}
{
"compiler": {
"version": "0.8.18+commit.87f61d96"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"details": "String operations.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
".deps/npm/@openzeppelin/contracts/utils/Strings.sol": "Strings"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
".deps/npm/@openzeppelin/contracts/utils/Strings.sol": {
"keccak256": "0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0",
"license": "MIT",
"urls": [
"bzz-raw://b81d9ff6559ea5c47fc573e17ece6d9ba5d6839e213e6ebc3b4c5c8fe4199d7f",
"dweb:/ipfs/QmPCW1bFisUzJkyjroY3yipwfism9RRCigCcK1hbXtVM8n"
]
},
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol": {
"keccak256": "0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3",
"license": "MIT",
"urls": [
"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c",
"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS"
]
},
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol": {
"keccak256": "0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc",
"license": "MIT",
"urls": [
"bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7",
"dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6"
]
}
},
"version": 1
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @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 up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (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; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
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.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 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.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
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 (rounding == Rounding.Up && 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 down.
*
* 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @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 v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @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), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(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) {
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] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
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 keccak256(bytes(a)) == keccak256(bytes(b));
}
}
// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);
function _sendLogPayload(bytes memory payload) private view {
uint256 payloadLength = payload.length;
address consoleAddress = CONSOLE_ADDRESS;
assembly {
let payloadStart := add(payload, 32)
let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
}
}
function log() internal view {
_sendLogPayload(abi.encodeWithSignature("log()"));
}
function logInt(int256 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(int256)", p0));
}
function logUint(uint256 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
}
function logString(string memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
}
function logBool(bool p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
}
function logAddress(address p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
}
function logBytes(bytes memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
}
function logBytes1(bytes1 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
}
function logBytes2(bytes2 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
}
function logBytes3(bytes3 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
}
function logBytes4(bytes4 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
}
function logBytes5(bytes5 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
}
function logBytes6(bytes6 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
}
function logBytes7(bytes7 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
}
function logBytes8(bytes8 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
}
function logBytes9(bytes9 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
}
function logBytes10(bytes10 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
}
function logBytes11(bytes11 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
}
function logBytes12(bytes12 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
}
function logBytes13(bytes13 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
}
function logBytes14(bytes14 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
}
function logBytes15(bytes15 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
}
function logBytes16(bytes16 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
}
function logBytes17(bytes17 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
}
function logBytes18(bytes18 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
}
function logBytes19(bytes19 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
}
function logBytes20(bytes20 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
}
function logBytes21(bytes21 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
}
function logBytes22(bytes22 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
}
function logBytes23(bytes23 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
}
function logBytes24(bytes24 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
}
function logBytes25(bytes25 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
}
function logBytes26(bytes26 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
}
function logBytes27(bytes27 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
}
function logBytes28(bytes28 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
}
function logBytes29(bytes29 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
}
function logBytes30(bytes30 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
}
function logBytes31(bytes31 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
}
function logBytes32(bytes32 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
}
function log(uint256 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
}
function log(string memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
}
function log(bool p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
}
function log(address p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
}
function log(uint256 p0, uint256 p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1));
}
function log(uint256 p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1));
}
function log(uint256 p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1));
}
function log(uint256 p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1));
}
function log(string memory p0, uint256 p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1));
}
function log(string memory p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
}
function log(string memory p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
}
function log(string memory p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
}
function log(bool p0, uint256 p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1));
}
function log(bool p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
}
function log(bool p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
}
function log(bool p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
}
function log(address p0, uint256 p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1));
}
function log(address p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
}
function log(address p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
}
function log(address p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
}
function log(uint256 p0, uint256 p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2));
}
function log(uint256 p0, uint256 p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2));
}
function log(uint256 p0, uint256 p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2));
}
function log(uint256 p0, uint256 p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2));
}
function log(uint256 p0, string memory p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2));
}
function log(uint256 p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2));
}
function log(uint256 p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2));
}
function log(uint256 p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2));
}
function log(uint256 p0, bool p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2));
}
function log(uint256 p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2));
}
function log(uint256 p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2));
}
function log(uint256 p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2));
}
function log(uint256 p0, address p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2));
}
function log(uint256 p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2));
}
function log(uint256 p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2));
}
function log(uint256 p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2));
}
function log(string memory p0, uint256 p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2));
}
function log(string memory p0, uint256 p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2));
}
function log(string memory p0, uint256 p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2));
}
function log(string memory p0, uint256 p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2));
}
function log(string memory p0, string memory p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2));
}
function log(string memory p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
}
function log(string memory p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
}
function log(string memory p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
}
function log(string memory p0, bool p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2));
}
function log(string memory p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
}
function log(string memory p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
}
function log(string memory p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
}
function log(string memory p0, address p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2));
}
function log(string memory p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
}
function log(string memory p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
}
function log(string memory p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
}
function log(bool p0, uint256 p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2));
}
function log(bool p0, uint256 p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2));
}
function log(bool p0, uint256 p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2));
}
function log(bool p0, uint256 p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2));
}
function log(bool p0, string memory p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2));
}
function log(bool p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
}
function log(bool p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
}
function log(bool p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
}
function log(bool p0, bool p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2));
}
function log(bool p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
}
function log(bool p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
}
function log(bool p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
}
function log(bool p0, address p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2));
}
function log(bool p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
}
function log(bool p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
}
function log(bool p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
}
function log(address p0, uint256 p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2));
}
function log(address p0, uint256 p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2));
}
function log(address p0, uint256 p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2));
}
function log(address p0, uint256 p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2));
}
function log(address p0, string memory p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2));
}
function log(address p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
}
function log(address p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
}
function log(address p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
}
function log(address p0, bool p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2));
}
function log(address p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
}
function log(address p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
}
function log(address p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
}
function log(address p0, address p1, uint256 p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2));
}
function log(address p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
}
function log(address p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
}
function log(address p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
}
function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint256 p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint256 p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint256 p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint256 p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, uint256 p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
return address(0);
}
}
// 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);
}
}
{
"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": {}
}
]
}
REMIX DEFAULT WORKSPACE
Remix default workspace is present when:
i. Remix loads for the very first time
ii. A new workspace is created with 'Default' template
iii. There are no files existing in the File Explorer
This workspace contains 3 directories:
1. 'contracts': Holds three contracts with increasing levels of complexity.
2. 'scripts': Contains four typescript files to deploy a contract. It is explained below.
3. 'tests': Contains one Solidity test file for 'Ballot' contract & one JS test file for 'Storage' contract.
SCRIPTS
The 'scripts' folder has four typescript files which help to deploy the 'Storage' contract using 'web3.js' and 'ethers.js' libraries.
For the deployment of any other contract, just update the contract's name from 'Storage' to the desired contract and provide constructor arguments accordingly
in the file `deploy_with_ethers.ts` or `deploy_with_web3.ts`
In the 'tests' folder there is a script containing Mocha-Chai unit tests for 'Storage' contract.
To run a script, right click on file name in the file explorer and click 'Run'. Remember, Solidity file must already be compiled.
Output from script will appear in remix terminal.
Please note, require/import is supported in a limited manner for Remix supported modules.
For now, modules supported by Remix are ethers, web3, swarmgw, chai, multihashes, remix and hardhat only for hardhat.ethers object/plugin.
For unsupported modules, an error like this will be thrown: '<module_name> module require is not supported by Remix IDE' will be shown.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@identity.com/gateway-protocol-eth/contracts/Gated.sol";
import "./MasterNodeFundCertificate.sol";
contract MasterNodeFund is Gated, MasterNodeFundCertificate {
using SafeERC20 for ERC20;
uint256 private constant MAX_FUNDS = 10000100 * (10**18);
uint256 private constant MIN_CONTRIBUTION = 150000 * (10**18);
uint256 private constant MAX_CONTRIBUTION = 10000000 * (10**18);
uint256 public currentFunds = 0;
uint256 public nftCounter = 1;
uint256 public rewardsStartTime = 0; // if this needs to be private then change it before deploying, but needs to be public for testing via test contract
uint256 private constant REWARDS_PERIOD = 2628000 seconds; // roughly a month
uint256 private constant LOCK_PERIOD = 94668408 seconds; // 3 years and 8 seconds
address private payoutAddress;
ERC20 private xdcToken;
mapping(address => Investment) public investments;
mapping(uint256 => uint256) public investmentAmounts;
struct Investment {
uint256 amount;
uint256 time;
bool claimed;
}
constructor(address gatewayTokenContract, uint256 gatekeeperNetworkSlotId, address xdcTokenAddress)
Gated(gatewayTokenContract, gatekeeperNetworkSlotId) {
payoutAddress = msg.sender;
xdcToken = ERC20(xdcTokenAddress);
}
function contribute(uint256 amount) virtual external gated {
require(currentFunds + amount <= MAX_FUNDS, "Total funds limit reached");
require(amount >= MIN_CONTRIBUTION && amount <= MAX_CONTRIBUTION, "Invalid contribution amount");
xdcToken.safeTransferFrom(msg.sender, address(this), amount);
if (investments[msg.sender].time == 0) {
_createInvestment(msg.sender, amount);
} else {
investments[msg.sender].amount += amount;
}
currentFunds += amount;
// Update rewardsStartTime if the goal is reached and rewardsStartTime is not set already
if (currentFunds >= MAX_FUNDS && rewardsStartTime == 0) {
rewardsStartTime = block.timestamp + LOCK_PERIOD;
}
}
function _createInvestment(address investor, uint256 amount) private {
investments[investor] = Investment(amount, block.timestamp, false);
_mintNFT(investor);
}
function _mintNFT(address investor) private {
uint256 tokenId = nftCounter;
mint(investor, tokenId);
nftCounter += 1;
investmentAmounts[tokenId] = investments[investor].amount;
}
function distributeMonthlyRewards(uint256 totalRewardAmount) external {
require(msg.sender == payoutAddress, "Unauthorized");
require(block.timestamp >= rewardsStartTime, "Rewards distribution not started");
xdcToken.safeTransferFrom(msg.sender, address(this), totalRewardAmount);
uint256 tokenId = 1;
while (tokenId < nftCounter) {
if (!_exists(tokenId)) {
tokenId++;
continue;
}
address holder = ownerOf(tokenId);
uint256 holderInvestment = investmentAmounts[tokenId];
uint256 holderReward = (holderInvestment * totalRewardAmount) / MAX_FUNDS;
xdcToken.safeTransfer(holder, holderReward);
tokenId++;
}
rewardsStartTime += REWARDS_PERIOD;
}
function claimInitialFunds() external {
require(block.timestamp >= investments[msg.sender].time + LOCK_PERIOD, "Lock period not ended");
require(!investments[msg.sender].claimed, "Initial funds already claimed");
uint256 claimAmount = investments[msg.sender].amount;
require(claimAmount > 0, "No investment found");
investments[msg.sender].claimed = true;
xdcToken.safeTransfer(msg.sender, claimAmount);
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract MasterNodeFundCertificate is ERC721 {
constructor() ERC721("MasterNodeFundCertificate", "MNFC") {
}
function mint(address to, uint256 tokenId) internal {
_mint(to, tokenId);
}
}
// SPDX-License-Identifier: MIT
// this should NOT ever be deployed to anything other than the test net for testing purposes only
pragma solidity ^0.8.0;
import "./MasterNodeFund.sol";
contract MasterNodeFundTest is MasterNodeFund {
uint256 public testMaxFunds;
uint256 public testMinContribution;
uint256 public testMaxContribution;
constructor(address gatewayTokenContract, uint256 gatekeeperNetworkSlotId, address xdcTokenAddress)
MasterNodeFund(gatewayTokenContract, gatekeeperNetworkSlotId, xdcTokenAddress) {
_setUpTestValues();
}
function _setUpTestValues() private {
testMaxFunds = 10 * (10**18);
testMinContribution = 1 * (10**18);
testMaxContribution = 10 * (10**18);
}
function contribute(uint256 amount) override external gated {
require(currentFunds + amount <= testMaxFunds, "Total funds limit reached");
require(amount >= testMinContribution && amount <= testMaxContribution, "Invalid contribution amount");
super.contribute(amount);
}
function progressByOneMonth() external {
rewardsStartTime /= 30 days;
}
}
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": {
"@_1239": {
"entryPoint": null,
"id": 1239,
"parameterSlots": 2,
"returnSlots": 0
},
"@_28": {
"entryPoint": null,
"id": 28,
"parameterSlots": 2,
"returnSlots": 0
},
"@_3951": {
"entryPoint": null,
"id": 3951,
"parameterSlots": 3,
"returnSlots": 0
},
"@_4247": {
"entryPoint": null,
"id": 4247,
"parameterSlots": 0,
"returnSlots": 0
},
"abi_decode_t_address_fromMemory": {
"entryPoint": 513,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_uint256_fromMemory": {
"entryPoint": 572,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_addresst_uint256t_address_fromMemory": {
"entryPoint": 595,
"id": null,
"parameterSlots": 2,
"returnSlots": 3
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"array_dataslot_t_string_storage": {
"entryPoint": 845,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_length_t_string_memory_ptr": {
"entryPoint": 687,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"clean_up_bytearray_end_slots_t_string_storage": {
"entryPoint": 1156,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"cleanup_t_address": {
"entryPoint": 467,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 435,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 536,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"clear_storage_range_t_bytes1": {
"entryPoint": 1117,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"convert_t_uint256_to_t_uint256": {
"entryPoint": 991,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage": {
"entryPoint": 1311,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"divide_by_32_ceil": {
"entryPoint": 866,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"extract_byte_array_length": {
"entryPoint": 792,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"extract_used_part_and_set_length_of_short_byte_array": {
"entryPoint": 1281,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"identity": {
"entryPoint": 981,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"mask_bytes_dynamic": {
"entryPoint": 1249,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"panic_error_0x22": {
"entryPoint": 745,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x41": {
"entryPoint": 698,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"prepare_store_t_uint256": {
"entryPoint": 1031,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 430,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"shift_left_dynamic": {
"entryPoint": 882,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"shift_right_unsigned_dynamic": {
"entryPoint": 1236,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"storage_set_to_zero_t_uint256": {
"entryPoint": 1089,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"update_byte_slice_dynamic32": {
"entryPoint": 895,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"update_storage_value_t_uint256_to_t_uint256": {
"entryPoint": 1041,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"validator_revert_t_address": {
"entryPoint": 487,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 546,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"zero_value_for_split_t_uint256": {
"entryPoint": 1084,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:7015:20",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "47:35:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "57:19:20",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "73:2:20",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "67:5:20"
},
"nodeType": "YulFunctionCall",
"src": "67:9:20"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "57:6:20"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "40:6:20",
"type": ""
}
],
"src": "7:75:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "177:28:20",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "194:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "197:1:20",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "187:6:20"
},
"nodeType": "YulFunctionCall",
"src": "187:12:20"
},
"nodeType": "YulExpressionStatement",
"src": "187:12:20"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "88:117:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "300:28:20",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "317:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "320:1:20",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "310:6:20"
},
"nodeType": "YulFunctionCall",
"src": "310:12:20"
},
"nodeType": "YulExpressionStatement",
"src": "310:12:20"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "211:117:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "379:81:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "389:65:20",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "404:5:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "411:42:20",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "400:3:20"
},
"nodeType": "YulFunctionCall",
"src": "400:54:20"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "389:7:20"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "361:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "371:7:20",
"type": ""
}
],
"src": "334:126:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "511:51:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "521:35:20",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "550:5:20"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "532:17:20"
},
"nodeType": "YulFunctionCall",
"src": "532:24:20"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "521:7:20"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "493:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "503:7:20",
"type": ""
}
],
"src": "466:96:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "611:79:20",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "668:16:20",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "677:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "680:1:20",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "670:6:20"
},
"nodeType": "YulFunctionCall",
"src": "670:12:20"
},
"nodeType": "YulExpressionStatement",
"src": "670:12:20"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "634:5:20"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "659:5:20"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "641:17:20"
},
"nodeType": "YulFunctionCall",
"src": "641:24:20"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "631:2:20"
},
"nodeType": "YulFunctionCall",
"src": "631:35:20"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "624:6:20"
},
"nodeType": "YulFunctionCall",
"src": "624:43:20"
},
"nodeType": "YulIf",
"src": "621:63:20"
}
]
},
"name": "validator_revert_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "604:5:20",
"type": ""
}
],
"src": "568:122:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "759:80:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "769:22:20",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "784:6:20"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "778:5:20"
},
"nodeType": "YulFunctionCall",
"src": "778:13:20"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "769:5:20"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "827:5:20"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nodeType": "YulIdentifier",
"src": "800:26:20"
},
"nodeType": "YulFunctionCall",
"src": "800:33:20"
},
"nodeType": "YulExpressionStatement",
"src": "800:33:20"
}
]
},
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "737:6:20",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "745:3:20",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "753:5:20",
"type": ""
}
],
"src": "696:143:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "890:32:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "900:16:20",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "911:5:20"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "900:7:20"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "872:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "882:7:20",
"type": ""
}
],
"src": "845:77:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "971:79:20",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1028:16:20",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1037:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1040:1:20",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1030:6:20"
},
"nodeType": "YulFunctionCall",
"src": "1030:12:20"
},
"nodeType": "YulExpressionStatement",
"src": "1030:12:20"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "994:5:20"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1019:5:20"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1001:17:20"
},
"nodeType": "YulFunctionCall",
"src": "1001:24:20"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "991:2:20"
},
"nodeType": "YulFunctionCall",
"src": "991:35:20"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "984:6:20"
},
"nodeType": "YulFunctionCall",
"src": "984:43:20"
},
"nodeType": "YulIf",
"src": "981:63:20"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "964:5:20",
"type": ""
}
],
"src": "928:122:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1119:80:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1129:22:20",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1144:6:20"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1138:5:20"
},
"nodeType": "YulFunctionCall",
"src": "1138:13:20"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1129:5:20"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1187:5:20"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "1160:26:20"
},
"nodeType": "YulFunctionCall",
"src": "1160:33:20"
},
"nodeType": "YulExpressionStatement",
"src": "1160:33:20"
}
]
},
"name": "abi_decode_t_uint256_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1097:6:20",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "1105:3:20",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1113:5:20",
"type": ""
}
],
"src": "1056:143:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1316:552:20",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1362:83:20",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "1364:77:20"
},
"nodeType": "YulFunctionCall",
"src": "1364:79:20"
},
"nodeType": "YulExpressionStatement",
"src": "1364:79:20"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1337:7:20"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1346:9:20"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1333:3:20"
},
"nodeType": "YulFunctionCall",
"src": "1333:23:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1358:2:20",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "1329:3:20"
},
"nodeType": "YulFunctionCall",
"src": "1329:32:20"
},
"nodeType": "YulIf",
"src": "1326:119:20"
},
{
"nodeType": "YulBlock",
"src": "1455:128:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1470:15:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1484:1:20",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1474:6:20",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1499:74:20",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1545:9:20"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1556:6:20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1541:3:20"
},
"nodeType": "YulFunctionCall",
"src": "1541:22:20"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1565:7:20"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulIdentifier",
"src": "1509:31:20"
},
"nodeType": "YulFunctionCall",
"src": "1509:64:20"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1499:6:20"
}
]
}
]
},
{
"nodeType": "YulBlock",
"src": "1593:129:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1608:16:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1622:2:20",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1612:6:20",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1638:74:20",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1684:9:20"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1695:6:20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1680:3:20"
},
"nodeType": "YulFunctionCall",
"src": "1680:22:20"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1704:7:20"
}
],
"functionName": {
"name": "abi_decode_t_uint256_fromMemory",
"nodeType": "YulIdentifier",
"src": "1648:31:20"
},
"nodeType": "YulFunctionCall",
"src": "1648:64:20"
},
"variableNames": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "1638:6:20"
}
]
}
]
},
{
"nodeType": "YulBlock",
"src": "1732:129:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1747:16:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1761:2:20",
"type": "",
"value": "64"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1751:6:20",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1777:74:20",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1823:9:20"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1834:6:20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1819:3:20"
},
"nodeType": "YulFunctionCall",
"src": "1819:22:20"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1843:7:20"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulIdentifier",
"src": "1787:31:20"
},
"nodeType": "YulFunctionCall",
"src": "1787:64:20"
},
"variableNames": [
{
"name": "value2",
"nodeType": "YulIdentifier",
"src": "1777:6:20"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_uint256t_address_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1270:9:20",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "1281:7:20",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1293:6:20",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "1301:6:20",
"type": ""
},
{
"name": "value2",
"nodeType": "YulTypedName",
"src": "1309:6:20",
"type": ""
}
],
"src": "1205:663:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1933:40:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1944:22:20",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1960:5:20"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1954:5:20"
},
"nodeType": "YulFunctionCall",
"src": "1954:12:20"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1944:6:20"
}
]
}
]
},
"name": "array_length_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1916:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1926:6:20",
"type": ""
}
],
"src": "1874:99:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2007:152:20",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2024:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2027:77:20",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2017:6:20"
},
"nodeType": "YulFunctionCall",
"src": "2017:88:20"
},
"nodeType": "YulExpressionStatement",
"src": "2017:88:20"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2121:1:20",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2124:4:20",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2114:6:20"
},
"nodeType": "YulFunctionCall",
"src": "2114:15:20"
},
"nodeType": "YulExpressionStatement",
"src": "2114:15:20"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2145:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2148:4:20",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2138:6:20"
},
"nodeType": "YulFunctionCall",
"src": "2138:15:20"
},
"nodeType": "YulExpressionStatement",
"src": "2138:15:20"
}
]
},
"name": "panic_error_0x41",
"nodeType": "YulFunctionDefinition",
"src": "1979:180:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2193:152:20",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2210:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2213:77:20",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2203:6:20"
},
"nodeType": "YulFunctionCall",
"src": "2203:88:20"
},
"nodeType": "YulExpressionStatement",
"src": "2203:88:20"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2307:1:20",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2310:4:20",
"type": "",
"value": "0x22"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2300:6:20"
},
"nodeType": "YulFunctionCall",
"src": "2300:15:20"
},
"nodeType": "YulExpressionStatement",
"src": "2300:15:20"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2331:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2334:4:20",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2324:6:20"
},
"nodeType": "YulFunctionCall",
"src": "2324:15:20"
},
"nodeType": "YulExpressionStatement",
"src": "2324:15:20"
}
]
},
"name": "panic_error_0x22",
"nodeType": "YulFunctionDefinition",
"src": "2165:180:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2402:269:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2412:22:20",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "2426:4:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2432:1:20",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "2422:3:20"
},
"nodeType": "YulFunctionCall",
"src": "2422:12:20"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2412:6:20"
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "2443:38:20",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "2473:4:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2479:1:20",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "2469:3:20"
},
"nodeType": "YulFunctionCall",
"src": "2469:12:20"
},
"variables": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulTypedName",
"src": "2447:18:20",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "2520:51:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2534:27:20",
"value": {
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2548:6:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2556:4:20",
"type": "",
"value": "0x7f"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "2544:3:20"
},
"nodeType": "YulFunctionCall",
"src": "2544:17:20"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2534:6:20"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulIdentifier",
"src": "2500:18:20"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2493:6:20"
},
"nodeType": "YulFunctionCall",
"src": "2493:26:20"
},
"nodeType": "YulIf",
"src": "2490:81:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2623:42:20",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x22",
"nodeType": "YulIdentifier",
"src": "2637:16:20"
},
"nodeType": "YulFunctionCall",
"src": "2637:18:20"
},
"nodeType": "YulExpressionStatement",
"src": "2637:18:20"
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulIdentifier",
"src": "2587:18:20"
},
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2610:6:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2618:2:20",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "2607:2:20"
},
"nodeType": "YulFunctionCall",
"src": "2607:14:20"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "2584:2:20"
},
"nodeType": "YulFunctionCall",
"src": "2584:38:20"
},
"nodeType": "YulIf",
"src": "2581:84:20"
}
]
},
"name": "extract_byte_array_length",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nodeType": "YulTypedName",
"src": "2386:4:20",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2395:6:20",
"type": ""
}
],
"src": "2351:320:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2731:87:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2741:11:20",
"value": {
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "2749:3:20"
},
"variableNames": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "2741:4:20"
}
]
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2769:1:20",
"type": "",
"value": "0"
},
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "2772:3:20"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2762:6:20"
},
"nodeType": "YulFunctionCall",
"src": "2762:14:20"
},
"nodeType": "YulExpressionStatement",
"src": "2762:14:20"
},
{
"nodeType": "YulAssignment",
"src": "2785:26:20",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2803:1:20",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2806:4:20",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "keccak256",
"nodeType": "YulIdentifier",
"src": "2793:9:20"
},
"nodeType": "YulFunctionCall",
"src": "2793:18:20"
},
"variableNames": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "2785:4:20"
}
]
}
]
},
"name": "array_dataslot_t_string_storage",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "ptr",
"nodeType": "YulTypedName",
"src": "2718:3:20",
"type": ""
}
],
"returnVariables": [
{
"name": "data",
"nodeType": "YulTypedName",
"src": "2726:4:20",
"type": ""
}
],
"src": "2677:141:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2868:49:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2878:33:20",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2896:5:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2903:2:20",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2892:3:20"
},
"nodeType": "YulFunctionCall",
"src": "2892:14:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2908:2:20",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "2888:3:20"
},
"nodeType": "YulFunctionCall",
"src": "2888:23:20"
},
"variableNames": [
{
"name": "result",
"nodeType": "YulIdentifier",
"src": "2878:6:20"
}
]
}
]
},
"name": "divide_by_32_ceil",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2851:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nodeType": "YulTypedName",
"src": "2861:6:20",
"type": ""
}
],
"src": "2824:93:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2976:54:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2986:37:20",
"value": {
"arguments": [
{
"name": "bits",
"nodeType": "YulIdentifier",
"src": "3011:4:20"
},
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "3017:5:20"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "3007:3:20"
},
"nodeType": "YulFunctionCall",
"src": "3007:16:20"
},
"variableNames": [
{
"name": "newValue",
"nodeType": "YulIdentifier",
"src": "2986:8:20"
}
]
}
]
},
"name": "shift_left_dynamic",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "bits",
"nodeType": "YulTypedName",
"src": "2951:4:20",
"type": ""
},
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2957:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nodeType": "YulTypedName",
"src": "2967:8:20",
"type": ""
}
],
"src": "2923:107:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3112:317:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "3122:35:20",
"value": {
"arguments": [
{
"name": "shiftBytes",
"nodeType": "YulIdentifier",
"src": "3143:10:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3155:1:20",
"type": "",
"value": "8"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "3139:3:20"
},
"nodeType": "YulFunctionCall",
"src": "3139:18:20"
},
"variables": [
{
"name": "shiftBits",
"nodeType": "YulTypedName",
"src": "3126:9:20",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "3166:109:20",
"value": {
"arguments": [
{
"name": "shiftBits",
"nodeType": "YulIdentifier",
"src": "3197:9:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3208:66:20",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nodeType": "YulIdentifier",
"src": "3178:18:20"
},
"nodeType": "YulFunctionCall",
"src": "3178:97:20"
},
"variables": [
{
"name": "mask",
"nodeType": "YulTypedName",
"src": "3170:4:20",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "3284:51:20",
"value": {
"arguments": [
{
"name": "shiftBits",
"nodeType": "YulIdentifier",
"src": "3315:9:20"
},
{
"name": "toInsert",
"nodeType": "YulIdentifier",
"src": "3326:8:20"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nodeType": "YulIdentifier",
"src": "3296:18:20"
},
"nodeType": "YulFunctionCall",
"src": "3296:39:20"
},
"variableNames": [
{
"name": "toInsert",
"nodeType": "YulIdentifier",
"src": "3284:8:20"
}
]
},
{
"nodeType": "YulAssignment",
"src": "3344:30:20",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "3357:5:20"
},
{
"arguments": [
{
"name": "mask",
"nodeType": "YulIdentifier",
"src": "3368:4:20"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "3364:3:20"
},
"nodeType": "YulFunctionCall",
"src": "3364:9:20"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "3353:3:20"
},
"nodeType": "YulFunctionCall",
"src": "3353:21:20"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "3344:5:20"
}
]
},
{
"nodeType": "YulAssignment",
"src": "3383:40:20",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "3396:5:20"
},
{
"arguments": [
{
"name": "toInsert",
"nodeType": "YulIdentifier",
"src": "3407:8:20"
},
{
"name": "mask",
"nodeType": "YulIdentifier",
"src": "3417:4:20"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "3403:3:20"
},
"nodeType": "YulFunctionCall",
"src": "3403:19:20"
}
],
"functionName": {
"name": "or",
"nodeType": "YulIdentifier",
"src": "3393:2:20"
},
"nodeType": "YulFunctionCall",
"src": "3393:30:20"
},
"variableNames": [
{
"name": "result",
"nodeType": "YulIdentifier",
"src": "3383:6:20"
}
]
}
]
},
"name": "update_byte_slice_dynamic32",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "3073:5:20",
"type": ""
},
{
"name": "shiftBytes",
"nodeType": "YulTypedName",
"src": "3080:10:20",
"type": ""
},
{
"name": "toInsert",
"nodeType": "YulTypedName",
"src": "3092:8:20",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nodeType": "YulTypedName",
"src": "3105:6:20",
"type": ""
}
],
"src": "3036:393:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3467:28:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3477:12:20",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "3484:5:20"
},
"variableNames": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "3477:3:20"
}
]
}
]
},
"name": "identity",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "3453:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nodeType": "YulTypedName",
"src": "3463:3:20",
"type": ""
}
],
"src": "3435:60:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3561:82:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3571:66:20",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "3629:5:20"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "3611:17:20"
},
"nodeType": "YulFunctionCall",
"src": "3611:24:20"
}
],
"functionName": {
"name": "identity",
"nodeType": "YulIdentifier",
"src": "3602:8:20"
},
"nodeType": "YulFunctionCall",
"src": "3602:34:20"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "3584:17:20"
},
"nodeType": "YulFunctionCall",
"src": "3584:53:20"
},
"variableNames": [
{
"name": "converted",
"nodeType": "YulIdentifier",
"src": "3571:9:20"
}
]
}
]
},
"name": "convert_t_uint256_to_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "3541:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "converted",
"nodeType": "YulTypedName",
"src": "3551:9:20",
"type": ""
}
],
"src": "3501:142:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3696:28:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3706:12:20",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "3713:5:20"
},
"variableNames": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "3706:3:20"
}
]
}
]
},
"name": "prepare_store_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "3682:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nodeType": "YulTypedName",
"src": "3692:3:20",
"type": ""
}
],
"src": "3649:75:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3806:193:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "3816:63:20",
"value": {
"arguments": [
{
"name": "value_0",
"nodeType": "YulIdentifier",
"src": "3871:7:20"
}
],
"functionName": {
"name": "convert_t_uint256_to_t_uint256",
"nodeType": "YulIdentifier",
"src": "3840:30:20"
},
"nodeType": "YulFunctionCall",
"src": "3840:39:20"
},
"variables": [
{
"name": "convertedValue_0",
"nodeType": "YulTypedName",
"src": "3820:16:20",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nodeType": "YulIdentifier",
"src": "3895:4:20"
},
{
"arguments": [
{
"arguments": [
{
"name": "slot",
"nodeType": "YulIdentifier",
"src": "3935:4:20"
}
],
"functionName": {
"name": "sload",
"nodeType": "YulIdentifier",
"src": "3929:5:20"
},
"nodeType": "YulFunctionCall",
"src": "3929:11:20"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "3942:6:20"
},
{
"arguments": [
{
"name": "convertedValue_0",
"nodeType": "YulIdentifier",
"src": "3974:16:20"
}
],
"functionName": {
"name": "prepare_store_t_uint256",
"nodeType": "YulIdentifier",
"src": "3950:23:20"
},
"nodeType": "YulFunctionCall",
"src": "3950:41:20"
}
],
"functionName": {
"name": "update_byte_slice_dynamic32",
"nodeType": "YulIdentifier",
"src": "3901:27:20"
},
"nodeType": "YulFunctionCall",
"src": "3901:91:20"
}
],
"functionName": {
"name": "sstore",
"nodeType": "YulIdentifier",
"src": "3888:6:20"
},
"nodeType": "YulFunctionCall",
"src": "3888:105:20"
},
"nodeType": "YulExpressionStatement",
"src": "3888:105:20"
}
]
},
"name": "update_storage_value_t_uint256_to_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nodeType": "YulTypedName",
"src": "3783:4:20",
"type": ""
},
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "3789:6:20",
"type": ""
},
{
"name": "value_0",
"nodeType": "YulTypedName",
"src": "3797:7:20",
"type": ""
}
],
"src": "3730:269:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4054:24:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4064:8:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "4071:1:20",
"type": "",
"value": "0"
},
"variableNames": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "4064:3:20"
}
]
}
]
},
"name": "zero_value_for_split_t_uint256",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "ret",
"nodeType": "YulTypedName",
"src": "4050:3:20",
"type": ""
}
],
"src": "4005:73:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4137:136:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "4147:46:20",
"value": {
"arguments": [],
"functionName": {
"name": "zero_value_for_split_t_uint256",
"nodeType": "YulIdentifier",
"src": "4161:30:20"
},
"nodeType": "YulFunctionCall",
"src": "4161:32:20"
},
"variables": [
{
"name": "zero_0",
"nodeType": "YulTypedName",
"src": "4151:6:20",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nodeType": "YulIdentifier",
"src": "4246:4:20"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "4252:6:20"
},
{
"name": "zero_0",
"nodeType": "YulIdentifier",
"src": "4260:6:20"
}
],
"functionName": {
"name": "update_storage_value_t_uint256_to_t_uint256",
"nodeType": "YulIdentifier",
"src": "4202:43:20"
},
"nodeType": "YulFunctionCall",
"src": "4202:65:20"
},
"nodeType": "YulExpressionStatement",
"src": "4202:65:20"
}
]
},
"name": "storage_set_to_zero_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nodeType": "YulTypedName",
"src": "4123:4:20",
"type": ""
},
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "4129:6:20",
"type": ""
}
],
"src": "4084:189:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4329:136:20",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "4396:63:20",
"statements": [
{
"expression": {
"arguments": [
{
"name": "start",
"nodeType": "YulIdentifier",
"src": "4440:5:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4447:1:20",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "storage_set_to_zero_t_uint256",
"nodeType": "YulIdentifier",
"src": "4410:29:20"
},
"nodeType": "YulFunctionCall",
"src": "4410:39:20"
},
"nodeType": "YulExpressionStatement",
"src": "4410:39:20"
}
]
},
"condition": {
"arguments": [
{
"name": "start",
"nodeType": "YulIdentifier",
"src": "4349:5:20"
},
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "4356:3:20"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "4346:2:20"
},
"nodeType": "YulFunctionCall",
"src": "4346:14:20"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "4361:26:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4363:22:20",
"value": {
"arguments": [
{
"name": "start",
"nodeType": "YulIdentifier",
"src": "4376:5:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4383:1:20",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4372:3:20"
},
"nodeType": "YulFunctionCall",
"src": "4372:13:20"
},
"variableNames": [
{
"name": "start",
"nodeType": "YulIdentifier",
"src": "4363:5:20"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "4343:2:20",
"statements": []
},
"src": "4339:120:20"
}
]
},
"name": "clear_storage_range_t_bytes1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "start",
"nodeType": "YulTypedName",
"src": "4317:5:20",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "4324:3:20",
"type": ""
}
],
"src": "4279:186:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4550:464:20",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "4576:431:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "4590:54:20",
"value": {
"arguments": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "4638:5:20"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nodeType": "YulIdentifier",
"src": "4606:31:20"
},
"nodeType": "YulFunctionCall",
"src": "4606:38:20"
},
"variables": [
{
"name": "dataArea",
"nodeType": "YulTypedName",
"src": "4594:8:20",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "4657:63:20",
"value": {
"arguments": [
{
"name": "dataArea",
"nodeType": "YulIdentifier",
"src": "4680:8:20"
},
{
"arguments": [
{
"name": "startIndex",
"nodeType": "YulIdentifier",
"src": "4708:10:20"
}
],
"functionName": {
"name": "divide_by_32_ceil",
"nodeType": "YulIdentifier",
"src": "4690:17:20"
},
"nodeType": "YulFunctionCall",
"src": "4690:29:20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4676:3:20"
},
"nodeType": "YulFunctionCall",
"src": "4676:44:20"
},
"variables": [
{
"name": "deleteStart",
"nodeType": "YulTypedName",
"src": "4661:11:20",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "4877:27:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4879:23:20",
"value": {
"name": "dataArea",
"nodeType": "YulIdentifier",
"src": "4894:8:20"
},
"variableNames": [
{
"name": "deleteStart",
"nodeType": "YulIdentifier",
"src": "4879:11:20"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "startIndex",
"nodeType": "YulIdentifier",
"src": "4861:10:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4873:2:20",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "4858:2:20"
},
"nodeType": "YulFunctionCall",
"src": "4858:18:20"
},
"nodeType": "YulIf",
"src": "4855:49:20"
},
{
"expression": {
"arguments": [
{
"name": "deleteStart",
"nodeType": "YulIdentifier",
"src": "4946:11:20"
},
{
"arguments": [
{
"name": "dataArea",
"nodeType": "YulIdentifier",
"src": "4963:8:20"
},
{
"arguments": [
{
"name": "len",
"nodeType": "YulIdentifier",
"src": "4991:3:20"
}
],
"functionName": {
"name": "divide_by_32_ceil",
"nodeType": "YulIdentifier",
"src": "4973:17:20"
},
"nodeType": "YulFunctionCall",
"src": "4973:22:20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4959:3:20"
},
"nodeType": "YulFunctionCall",
"src": "4959:37:20"
}
],
"functionName": {
"name": "clear_storage_range_t_bytes1",
"nodeType": "YulIdentifier",
"src": "4917:28:20"
},
"nodeType": "YulFunctionCall",
"src": "4917:80:20"
},
"nodeType": "YulExpressionStatement",
"src": "4917:80:20"
}
]
},
"condition": {
"arguments": [
{
"name": "len",
"nodeType": "YulIdentifier",
"src": "4567:3:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4572:2:20",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "4564:2:20"
},
"nodeType": "YulFunctionCall",
"src": "4564:11:20"
},
"nodeType": "YulIf",
"src": "4561:446:20"
}
]
},
"name": "clean_up_bytearray_end_slots_t_string_storage",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "array",
"nodeType": "YulTypedName",
"src": "4526:5:20",
"type": ""
},
{
"name": "len",
"nodeType": "YulTypedName",
"src": "4533:3:20",
"type": ""
},
{
"name": "startIndex",
"nodeType": "YulTypedName",
"src": "4538:10:20",
"type": ""
}
],
"src": "4471:543:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "5083:54:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "5093:37:20",
"value": {
"arguments": [
{
"name": "bits",
"nodeType": "YulIdentifier",
"src": "5118:4:20"
},
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "5124:5:20"
}
],
"functionName": {
"name": "shr",
"nodeType": "YulIdentifier",
"src": "5114:3:20"
},
"nodeType": "YulFunctionCall",
"src": "5114:16:20"
},
"variableNames": [
{
"name": "newValue",
"nodeType": "YulIdentifier",
"src": "5093:8:20"
}
]
}
]
},
"name": "shift_right_unsigned_dynamic",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "bits",
"nodeType": "YulTypedName",
"src": "5058:4:20",
"type": ""
},
{
"name": "value",
"nodeType": "YulTypedName",
"src": "5064:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nodeType": "YulTypedName",
"src": "5074:8:20",
"type": ""
}
],
"src": "5020:117:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "5194:118:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "5204:68:20",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "5253:1:20",
"type": "",
"value": "8"
},
{
"name": "bytes",
"nodeType": "YulIdentifier",
"src": "5256:5:20"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "5249:3:20"
},
"nodeType": "YulFunctionCall",
"src": "5249:13:20"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "5268:1:20",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "5264:3:20"
},
"nodeType": "YulFunctionCall",
"src": "5264:6:20"
}
],
"functionName": {
"name": "shift_right_unsigned_dynamic",
"nodeType": "YulIdentifier",
"src": "5220:28:20"
},
"nodeType": "YulFunctionCall",
"src": "5220:51:20"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "5216:3:20"
},
"nodeType": "YulFunctionCall",
"src": "5216:56:20"
},
"variables": [
{
"name": "mask",
"nodeType": "YulTypedName",
"src": "5208:4:20",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "5281:25:20",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "5295:4:20"
},
{
"name": "mask",
"nodeType": "YulIdentifier",
"src": "5301:4:20"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "5291:3:20"
},
"nodeType": "YulFunctionCall",
"src": "5291:15:20"
},
"variableNames": [
{
"name": "result",
"nodeType": "YulIdentifier",
"src": "5281:6:20"
}
]
}
]
},
"name": "mask_bytes_dynamic",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nodeType": "YulTypedName",
"src": "5171:4:20",
"type": ""
},
{
"name": "bytes",
"nodeType": "YulTypedName",
"src": "5177:5:20",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nodeType": "YulTypedName",
"src": "5187:6:20",
"type": ""
}
],
"src": "5143:169:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "5398:214:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "5531:37:20",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "5558:4:20"
},
{
"name": "len",
"nodeType": "YulIdentifier",
"src": "5564:3:20"
}
],
"functionName": {
"name": "mask_bytes_dynamic",
"nodeType": "YulIdentifier",
"src": "5539:18:20"
},
"nodeType": "YulFunctionCall",
"src": "5539:29:20"
},
"variableNames": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "5531:4:20"
}
]
},
{
"nodeType": "YulAssignment",
"src": "5577:29:20",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "5588:4:20"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "5598:1:20",
"type": "",
"value": "2"
},
{
"name": "len",
"nodeType": "YulIdentifier",
"src": "5601:3:20"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "5594:3:20"
},
"nodeType": "YulFunctionCall",
"src": "5594:11:20"
}
],
"functionName": {
"name": "or",
"nodeType": "YulIdentifier",
"src": "5585:2:20"
},
"nodeType": "YulFunctionCall",
"src": "5585:21:20"
},
"variableNames": [
{
"name": "used",
"nodeType": "YulIdentifier",
"src": "5577:4:20"
}
]
}
]
},
"name": "extract_used_part_and_set_length_of_short_byte_array",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nodeType": "YulTypedName",
"src": "5379:4:20",
"type": ""
},
{
"name": "len",
"nodeType": "YulTypedName",
"src": "5385:3:20",
"type": ""
}
],
"returnVariables": [
{
"name": "used",
"nodeType": "YulTypedName",
"src": "5393:4:20",
"type": ""
}
],
"src": "5317:295:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "5709:1303:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "5720:51:20",
"value": {
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "5767:3:20"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "5734:32:20"
},
"nodeType": "YulFunctionCall",
"src": "5734:37:20"
},
"variables": [
{
"name": "newLen",
"nodeType": "YulTypedName",
"src": "5724:6:20",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "5856:22:20",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "5858:16:20"
},
"nodeType": "YulFunctionCall",
"src": "5858:18:20"
},
"nodeType": "YulExpressionStatement",
"src": "5858:18:20"
}
]
},
"condition": {
"arguments": [
{
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "5828:6:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "5836:18:20",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "5825:2:20"
},
"nodeType": "YulFunctionCall",
"src": "5825:30:20"
},
"nodeType": "YulIf",
"src": "5822:56:20"
},
{
"nodeType": "YulVariableDeclaration",
"src": "5888:52:20",
"value": {
"arguments": [
{
"arguments": [
{
"name": "slot",
"nodeType": "YulIdentifier",
"src": "5934:4:20"
}
],
"functionName": {
"name": "sload",
"nodeType": "YulIdentifier",
"src": "5928:5:20"
},
"nodeType": "YulFunctionCall",
"src": "5928:11:20"
}
],
"functionName": {
"name": "extract_byte_array_length",
"nodeType": "YulIdentifier",
"src": "5902:25:20"
},
"nodeType": "YulFunctionCall",
"src": "5902:38:20"
},
"variables": [
{
"name": "oldLen",
"nodeType": "YulTypedName",
"src": "5892:6:20",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nodeType": "YulIdentifier",
"src": "6033:4:20"
},
{
"name": "oldLen",
"nodeType": "YulIdentifier",
"src": "6039:6:20"
},
{
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "6047:6:20"
}
],
"functionName": {
"name": "clean_up_bytearray_end_slots_t_string_storage",
"nodeType": "YulIdentifier",
"src": "5987:45:20"
},
"nodeType": "YulFunctionCall",
"src": "5987:67:20"
},
"nodeType": "YulExpressionStatement",
"src": "5987:67:20"
},
{
"nodeType": "YulVariableDeclaration",
"src": "6064:18:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "6081:1:20",
"type": "",
"value": "0"
},
"variables": [
{
"name": "srcOffset",
"nodeType": "YulTypedName",
"src": "6068:9:20",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "6092:17:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "6105:4:20",
"type": "",
"value": "0x20"
},
"variableNames": [
{
"name": "srcOffset",
"nodeType": "YulIdentifier",
"src": "6092:9:20"
}
]
},
{
"cases": [
{
"body": {
"nodeType": "YulBlock",
"src": "6156:611:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "6170:37:20",
"value": {
"arguments": [
{
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "6189:6:20"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6201:4:20",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "6197:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6197:9:20"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "6185:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6185:22:20"
},
"variables": [
{
"name": "loopEnd",
"nodeType": "YulTypedName",
"src": "6174:7:20",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "6221:51:20",
"value": {
"arguments": [
{
"name": "slot",
"nodeType": "YulIdentifier",
"src": "6267:4:20"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nodeType": "YulIdentifier",
"src": "6235:31:20"
},
"nodeType": "YulFunctionCall",
"src": "6235:37:20"
},
"variables": [
{
"name": "dstPtr",
"nodeType": "YulTypedName",
"src": "6225:6:20",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "6285:10:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "6294:1:20",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nodeType": "YulTypedName",
"src": "6289:1:20",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "6353:163:20",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dstPtr",
"nodeType": "YulIdentifier",
"src": "6378:6:20"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "6396:3:20"
},
{
"name": "srcOffset",
"nodeType": "YulIdentifier",
"src": "6401:9:20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "6392:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6392:19:20"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "6386:5:20"
},
"nodeType": "YulFunctionCall",
"src": "6386:26:20"
}
],
"functionName": {
"name": "sstore",
"nodeType": "YulIdentifier",
"src": "6371:6:20"
},
"nodeType": "YulFunctionCall",
"src": "6371:42:20"
},
"nodeType": "YulExpressionStatement",
"src": "6371:42:20"
},
{
"nodeType": "YulAssignment",
"src": "6430:24:20",
"value": {
"arguments": [
{
"name": "dstPtr",
"nodeType": "YulIdentifier",
"src": "6444:6:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6452:1:20",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "6440:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6440:14:20"
},
"variableNames": [
{
"name": "dstPtr",
"nodeType": "YulIdentifier",
"src": "6430:6:20"
}
]
},
{
"nodeType": "YulAssignment",
"src": "6471:31:20",
"value": {
"arguments": [
{
"name": "srcOffset",
"nodeType": "YulIdentifier",
"src": "6488:9:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6499:2:20",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "6484:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6484:18:20"
},
"variableNames": [
{
"name": "srcOffset",
"nodeType": "YulIdentifier",
"src": "6471:9:20"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "6319:1:20"
},
{
"name": "loopEnd",
"nodeType": "YulIdentifier",
"src": "6322:7:20"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "6316:2:20"
},
"nodeType": "YulFunctionCall",
"src": "6316:14:20"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "6331:21:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "6333:17:20",
"value": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "6342:1:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6345:4:20",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "6338:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6338:12:20"
},
"variableNames": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "6333:1:20"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "6312:3:20",
"statements": []
},
"src": "6308:208:20"
},
{
"body": {
"nodeType": "YulBlock",
"src": "6552:156:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "6570:43:20",
"value": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "6597:3:20"
},
{
"name": "srcOffset",
"nodeType": "YulIdentifier",
"src": "6602:9:20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "6593:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6593:19:20"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "6587:5:20"
},
"nodeType": "YulFunctionCall",
"src": "6587:26:20"
},
"variables": [
{
"name": "lastValue",
"nodeType": "YulTypedName",
"src": "6574:9:20",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "dstPtr",
"nodeType": "YulIdentifier",
"src": "6637:6:20"
},
{
"arguments": [
{
"name": "lastValue",
"nodeType": "YulIdentifier",
"src": "6664:9:20"
},
{
"arguments": [
{
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "6679:6:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6687:4:20",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "6675:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6675:17:20"
}
],
"functionName": {
"name": "mask_bytes_dynamic",
"nodeType": "YulIdentifier",
"src": "6645:18:20"
},
"nodeType": "YulFunctionCall",
"src": "6645:48:20"
}
],
"functionName": {
"name": "sstore",
"nodeType": "YulIdentifier",
"src": "6630:6:20"
},
"nodeType": "YulFunctionCall",
"src": "6630:64:20"
},
"nodeType": "YulExpressionStatement",
"src": "6630:64:20"
}
]
},
"condition": {
"arguments": [
{
"name": "loopEnd",
"nodeType": "YulIdentifier",
"src": "6535:7:20"
},
{
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "6544:6:20"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "6532:2:20"
},
"nodeType": "YulFunctionCall",
"src": "6532:19:20"
},
"nodeType": "YulIf",
"src": "6529:179:20"
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nodeType": "YulIdentifier",
"src": "6728:4:20"
},
{
"arguments": [
{
"arguments": [
{
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "6742:6:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6750:1:20",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "6738:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6738:14:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6754:1:20",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "6734:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6734:22:20"
}
],
"functionName": {
"name": "sstore",
"nodeType": "YulIdentifier",
"src": "6721:6:20"
},
"nodeType": "YulFunctionCall",
"src": "6721:36:20"
},
"nodeType": "YulExpressionStatement",
"src": "6721:36:20"
}
]
},
"nodeType": "YulCase",
"src": "6149:618:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "6154:1:20",
"type": "",
"value": "1"
}
},
{
"body": {
"nodeType": "YulBlock",
"src": "6784:222:20",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "6798:14:20",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "6811:1:20",
"type": "",
"value": "0"
},
"variables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "6802:5:20",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "6835:67:20",
"statements": [
{
"nodeType": "YulAssignment",
"src": "6853:35:20",
"value": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "6872:3:20"
},
{
"name": "srcOffset",
"nodeType": "YulIdentifier",
"src": "6877:9:20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "6868:3:20"
},
"nodeType": "YulFunctionCall",
"src": "6868:19:20"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "6862:5:20"
},
"nodeType": "YulFunctionCall",
"src": "6862:26:20"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "6853:5:20"
}
]
}
]
},
"condition": {
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "6828:6:20"
},
"nodeType": "YulIf",
"src": "6825:77:20"
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nodeType": "YulIdentifier",
"src": "6922:4:20"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "6981:5:20"
},
{
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "6988:6:20"
}
],
"functionName": {
"name": "extract_used_part_and_set_length_of_short_byte_array",
"nodeType": "YulIdentifier",
"src": "6928:52:20"
},
"nodeType": "YulFunctionCall",
"src": "6928:67:20"
}
],
"functionName": {
"name": "sstore",
"nodeType": "YulIdentifier",
"src": "6915:6:20"
},
"nodeType": "YulFunctionCall",
"src": "6915:81:20"
},
"nodeType": "YulExpressionStatement",
"src": "6915:81:20"
}
]
},
"nodeType": "YulCase",
"src": "6776:230:20",
"value": "default"
}
],
"expression": {
"arguments": [
{
"name": "newLen",
"nodeType": "YulIdentifier",
"src": "6129:6:20"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6137:2:20",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "6126:2:20"
},
"nodeType": "YulFunctionCall",
"src": "6126:14:20"
},
"nodeType": "YulSwitch",
"src": "6119:887:20"
}
]
},
"name": "copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nodeType": "YulTypedName",
"src": "5698:4:20",
"type": ""
},
{
"name": "src",
"nodeType": "YulTypedName",
"src": "5704:3:20",
"type": ""
}
],
"src": "5617:1395:20"
}
]
},
"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 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_addresst_uint256t_address_fromMemory(headStart, dataEnd) -> value0, value1, value2 {\n if slt(sub(dataEnd, headStart), 96) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 64\n\n value2 := abi_decode_t_address_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_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\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}\n",
"id": 20,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "6080604052600060085560016009556000600a553480156200002057600080fd5b5060405162003f1338038062003f13833981810160405281019062000046919062000253565b6040518060400160405280601981526020017f4d61737465724e6f646546756e644365727469666963617465000000000000008152506040518060400160405280600481526020017f4d4e4643000000000000000000000000000000000000000000000000000000008152508484816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600181905550505081600290816200010e91906200051f565b5080600390816200012091906200051f565b50505033600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505062000606565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001e082620001b3565b9050919050565b620001f281620001d3565b8114620001fe57600080fd5b50565b6000815190506200021281620001e7565b92915050565b6000819050919050565b6200022d8162000218565b81146200023957600080fd5b50565b6000815190506200024d8162000222565b92915050565b6000806000606084860312156200026f576200026e620001ae565b5b60006200027f8682870162000201565b935050602062000292868287016200023c565b9250506040620002a58682870162000201565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200033157607f821691505b602082108103620003475762000346620002e9565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620003b17fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000372565b620003bd868362000372565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000400620003fa620003f48462000218565b620003d5565b62000218565b9050919050565b6000819050919050565b6200041c83620003df565b620004346200042b8262000407565b8484546200037f565b825550505050565b600090565b6200044b6200043c565b6200045881848462000411565b505050565b5b8181101562000480576200047460008262000441565b6001810190506200045e565b5050565b601f821115620004cf5762000499816200034d565b620004a48462000362565b81016020851015620004b4578190505b620004cc620004c38562000362565b8301826200045d565b50505b505050565b600082821c905092915050565b6000620004f460001984600802620004d4565b1980831691505092915050565b60006200050f8383620004e1565b9150826002028217905092915050565b6200052a82620002af565b67ffffffffffffffff811115620005465762000545620002ba565b5b62000552825462000318565b6200055f82828562000484565b600060209050601f83116001811462000597576000841562000582578287015190505b6200058e858262000501565b865550620005fe565b601f198416620005a7866200034d565b60005b82811015620005d157848901518255600182019150602085019450602081019050620005aa565b86831015620005f15784890151620005ed601f891682620004e1565b8355505b6001600288020188555050505b505050505050565b6138fd80620006166000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806370a08231116100b8578063a3373a5c1161007c578063a3373a5c14610362578063b88d4fde1461036c578063c1cbbca714610388578063c87b56dd146103a4578063e574609e146103d4578063e985e9c5146103f257610137565b806370a08231146102a8578063838ca346146102d857806395d89b41146102f657806396b9886214610314578063a22cb4651461034657610137565b806323b872dd116100ff57806323b872dd14610206578063380176de1461022257806342842e0e1461023e5780636352211e1461025a5780636a7923b21461028a57610137565b806301ffc9a71461013c57806306fdde031461016c578063081812fc1461018a578063095ea7b3146101ba5780630ceb6a6e146101d6575b600080fd5b6101566004803603810190610151919061252b565b610422565b6040516101639190612573565b60405180910390f35b610174610504565b604051610181919061261e565b60405180910390f35b6101a4600480360381019061019f9190612676565b610596565b6040516101b191906126e4565b60405180910390f35b6101d460048036038101906101cf919061272b565b6105dc565b005b6101f060048036038101906101eb9190612676565b6106f3565b6040516101fd919061277a565b60405180910390f35b610220600480360381019061021b9190612795565b61070b565b005b61023c60048036038101906102379190612676565b61076b565b005b61025860048036038101906102539190612795565b61098e565b005b610274600480360381019061026f9190612676565b6109ae565b60405161028191906126e4565b60405180910390f35b610292610a34565b60405161029f919061277a565b60405180910390f35b6102c260048036038101906102bd91906127e8565b610a3a565b6040516102cf919061277a565b60405180910390f35b6102e0610af1565b6040516102ed919061277a565b60405180910390f35b6102fe610af7565b60405161030b919061261e565b60405180910390f35b61032e600480360381019061032991906127e8565b610b89565b60405161033d93929190612815565b60405180910390f35b610360600480360381019061035b9190612878565b610bc0565b005b61036a610bd6565b005b610386600480360381019061038191906129ed565b610e2f565b005b6103a2600480360381019061039d9190612676565b610e91565b005b6103be60048036038101906103b99190612676565b6111af565b6040516103cb919061261e565b60405180910390f35b6103dc611217565b6040516103e9919061277a565b60405180910390f35b61040c60048036038101906104079190612a70565b61121d565b6040516104199190612573565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104ed57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104fd57506104fc826112b1565b5b9050919050565b60606002805461051390612adf565b80601f016020809104026020016040519081016040528092919081815260200182805461053f90612adf565b801561058c5780601f106105615761010080835404028352916020019161058c565b820191906000526020600020905b81548152906001019060200180831161056f57829003601f168201915b5050505050905090565b60006105a18261131b565b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006105e7826109ae565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610657576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064e90612b82565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610676611366565b73ffffffffffffffffffffffffffffffffffffffff1614806106a557506106a48161069f611366565b61121d565b5b6106e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106db90612c14565b60405180910390fd5b6106ee838361136e565b505050565b600e6020528060005260406000206000915090505481565b61071c610716611366565b82611427565b61075b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075290612ca6565b60405180910390fd5b6107668383836114bc565b505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f290612d12565b60405180910390fd5b600a54421015610840576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083790612d7e565b60405180910390fd5b61088f333083600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117b5909392919063ffffffff16565b6000600190505b60095481101561096e576108a98161183e565b6108c05780806108b890612dcd565b915050610896565b60006108cb826109ae565b90506000600e600084815260200190815260200160002054905060006a08459a81db5f75ad10000085836108ff9190612e15565b6109099190612e86565b90506109588382600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661187f9092919063ffffffff16565b838061096390612dcd565b945050505050610896565b622819a0600a60008282546109839190612eb7565b925050819055505050565b6109a983838360405180602001604052806000815250610e2f565b505050565b6000806109ba83611905565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2290612f37565b60405180910390fd5b80915050919050565b600a5481565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610aaa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa190612fc9565b60405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60085481565b606060038054610b0690612adf565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3290612adf565b8015610b7f5780601f10610b5457610100808354040283529160200191610b7f565b820191906000526020600020905b815481529060010190602001808311610b6257829003601f168201915b5050505050905090565b600d6020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16905083565b610bd2610bcb611366565b8383611942565b5050565b6305a48678600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154610c289190612eb7565b421015610c6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6190613035565b60405180910390fd5b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff1615610cfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf1906130a1565b60405180910390fd5b6000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905060008111610d84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7b9061310d565b60405180910390fd5b6001600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160006101000a81548160ff021916908315150217905550610e2c3382600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661187f9092919063ffffffff16565b50565b610e40610e3a611366565b83611427565b610e7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7690612ca6565b60405180910390fd5b610e8b84848484611aae565b50505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663ff17e232336001546040518363ffffffff1660e01b8152600401610ef492919061312d565b602060405180830381865afa158015610f11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f35919061316b565b610f965760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040517fabd937f6000000000000000000000000000000000000000000000000000000008152600401610f8d91906126e4565b60405180910390fd5b6a08459a81db5f75ad10000082600854610fb09190612eb7565b1115610ff1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe8906131e4565b60405180910390fd5b691fc3842bd1f071c00000821015801561101657506a084595161401484a0000008211155b611055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104c90613250565b60405180910390fd5b6110a4333084600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117b5909392919063ffffffff16565b6000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154036110fd576110f83383611b0a565b611157565b81600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600082825461114f9190612eb7565b925050819055505b81600860008282546111699190612eb7565b925050819055506a08459a81db5f75ad1000006008541015801561118f57506000600a54145b156111ab576305a48678426111a49190612eb7565b600a819055505b5050565b60606111ba8261131b565b60006111c4611bab565b905060008151116111e4576040518060200160405280600081525061120f565b806111ee84611bc2565b6040516020016111ff9291906132ac565b6040516020818303038152906040525b915050919050565b60095481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6113248161183e565b611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90612f37565b60405180910390fd5b50565b600033905090565b816006600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166113e1836109ae565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611433836109ae565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806114755750611474818561121d565b5b806114b357508373ffffffffffffffffffffffffffffffffffffffff1661149b84610596565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166114dc826109ae565b73ffffffffffffffffffffffffffffffffffffffff1614611532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152990613342565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611598906133d4565b60405180910390fd5b6115ae8383836001611c90565b8273ffffffffffffffffffffffffffffffffffffffff166115ce826109ae565b73ffffffffffffffffffffffffffffffffffffffff1614611624576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161b90613342565b60405180910390fd5b6006600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46117b08383836001611c96565b505050565b611838846323b872dd60e01b8585856040516024016117d6939291906133f4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c9c565b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff1661186083611905565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6119008363a9059cbb60e01b848460405160240161189e92919061312d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c9c565b505050565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036119b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a790613477565b60405180910390fd5b80600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611aa19190612573565b60405180910390a3505050565b611ab98484846114bc565b611ac584848484611d64565b611b04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afb90613509565b60405180910390fd5b50505050565b604051806060016040528082815260200142815260200160001515815250600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff021916908315150217905550905050611ba782611eeb565b5050565b606060405180602001604052806000815250905090565b606060006001611bd184611f74565b01905060008167ffffffffffffffff811115611bf057611bef6128c2565b5b6040519080825280601f01601f191660200182016040528015611c225781602001600182028036833780820191505090505b509050600082602001820190505b600115611c85578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611c7957611c78612e57565b5b04945060008503611c30575b819350505050919050565b50505050565b50505050565b6000611cfe826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166120c79092919063ffffffff16565b9050600081511480611d20575080806020019051810190611d1f919061316b565b5b611d5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d569061359b565b60405180910390fd5b505050565b6000611d858473ffffffffffffffffffffffffffffffffffffffff166120df565b15611ede578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611dae611366565b8786866040518563ffffffff1660e01b8152600401611dd09493929190613610565b6020604051808303816000875af1925050508015611e0c57506040513d601f19601f82011682018060405250810190611e099190613671565b60015b611e8e573d8060008114611e3c576040519150601f19603f3d011682016040523d82523d6000602084013e611e41565b606091505b506000815103611e86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7d90613509565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050611ee3565b600190505b949350505050565b60006009549050611efc8282612102565b600160096000828254611f0f9190612eb7565b92505081905550600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600e6000838152602001908152602001600020819055505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611fd2577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611fc857611fc7612e57565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061200f576d04ee2d6d415b85acef8100000000838161200557612004612e57565b5b0492506020810190505b662386f26fc10000831061203e57662386f26fc10000838161203457612033612e57565b5b0492506010810190505b6305f5e1008310612067576305f5e100838161205d5761205c612e57565b5b0492506008810190505b612710831061208c57612710838161208257612081612e57565b5b0492506004810190505b606483106120af57606483816120a5576120a4612e57565b5b0492506002810190505b600a83106120be576001810190505b80915050919050565b60606120d68484600085612110565b90509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b61210c82826121dd565b5050565b606082471015612155576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214c90613710565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161217e919061376c565b60006040518083038185875af1925050503d80600081146121bb576040519150601f19603f3d011682016040523d82523d6000602084013e6121c0565b606091505b50915091506121d1878383876123fa565b92505050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361224c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612243906137cf565b60405180910390fd5b6122558161183e565b15612295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228c9061383b565b60405180910390fd5b6122a3600083836001611c90565b6122ac8161183e565b156122ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e39061383b565b60405180910390fd5b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46123f6600083836001611c96565b5050565b6060831561245c57600083510361245457612414856120df565b612453576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161244a906138a7565b60405180910390fd5b5b829050612467565b612466838361246f565b5b949350505050565b6000825111156124825781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124b6919061261e565b60405180910390fd5b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612508816124d3565b811461251357600080fd5b50565b600081359050612525816124ff565b92915050565b600060208284031215612541576125406124c9565b5b600061254f84828501612516565b91505092915050565b60008115159050919050565b61256d81612558565b82525050565b60006020820190506125886000830184612564565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125c85780820151818401526020810190506125ad565b60008484015250505050565b6000601f19601f8301169050919050565b60006125f08261258e565b6125fa8185612599565b935061260a8185602086016125aa565b612613816125d4565b840191505092915050565b6000602082019050818103600083015261263881846125e5565b905092915050565b6000819050919050565b61265381612640565b811461265e57600080fd5b50565b6000813590506126708161264a565b92915050565b60006020828403121561268c5761268b6124c9565b5b600061269a84828501612661565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126ce826126a3565b9050919050565b6126de816126c3565b82525050565b60006020820190506126f960008301846126d5565b92915050565b612708816126c3565b811461271357600080fd5b50565b600081359050612725816126ff565b92915050565b60008060408385031215612742576127416124c9565b5b600061275085828601612716565b925050602061276185828601612661565b9150509250929050565b61277481612640565b82525050565b600060208201905061278f600083018461276b565b92915050565b6000806000606084860312156127ae576127ad6124c9565b5b60006127bc86828701612716565b93505060206127cd86828701612716565b92505060406127de86828701612661565b9150509250925092565b6000602082840312156127fe576127fd6124c9565b5b600061280c84828501612716565b91505092915050565b600060608201905061282a600083018661276b565b612837602083018561276b565b6128446040830184612564565b949350505050565b61285581612558565b811461286057600080fd5b50565b6000813590506128728161284c565b92915050565b6000806040838503121561288f5761288e6124c9565b5b600061289d85828601612716565b92505060206128ae85828601612863565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128fa826125d4565b810181811067ffffffffffffffff82111715612919576129186128c2565b5b80604052505050565b600061292c6124bf565b905061293882826128f1565b919050565b600067ffffffffffffffff821115612958576129576128c2565b5b612961826125d4565b9050602081019050919050565b82818337600083830152505050565b600061299061298b8461293d565b612922565b9050828152602081018484840111156129ac576129ab6128bd565b5b6129b784828561296e565b509392505050565b600082601f8301126129d4576129d36128b8565b5b81356129e484826020860161297d565b91505092915050565b60008060008060808587031215612a0757612a066124c9565b5b6000612a1587828801612716565b9450506020612a2687828801612716565b9350506040612a3787828801612661565b925050606085013567ffffffffffffffff811115612a5857612a576124ce565b5b612a64878288016129bf565b91505092959194509250565b60008060408385031215612a8757612a866124c9565b5b6000612a9585828601612716565b9250506020612aa685828601612716565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612af757607f821691505b602082108103612b0a57612b09612ab0565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000612b6c602183612599565b9150612b7782612b10565b604082019050919050565b60006020820190508181036000830152612b9b81612b5f565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b6000612bfe603d83612599565b9150612c0982612ba2565b604082019050919050565b60006020820190508181036000830152612c2d81612bf1565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b6000612c90602d83612599565b9150612c9b82612c34565b604082019050919050565b60006020820190508181036000830152612cbf81612c83565b9050919050565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b6000612cfc600c83612599565b9150612d0782612cc6565b602082019050919050565b60006020820190508181036000830152612d2b81612cef565b9050919050565b7f5265776172647320646973747269627574696f6e206e6f742073746172746564600082015250565b6000612d68602083612599565b9150612d7382612d32565b602082019050919050565b60006020820190508181036000830152612d9781612d5b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612dd882612640565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612e0a57612e09612d9e565b5b600182019050919050565b6000612e2082612640565b9150612e2b83612640565b9250828202612e3981612640565b91508282048414831517612e5057612e4f612d9e565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612e9182612640565b9150612e9c83612640565b925082612eac57612eab612e57565b5b828204905092915050565b6000612ec282612640565b9150612ecd83612640565b9250828201905080821115612ee557612ee4612d9e565b5b92915050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000612f21601883612599565b9150612f2c82612eeb565b602082019050919050565b60006020820190508181036000830152612f5081612f14565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000612fb3602983612599565b9150612fbe82612f57565b604082019050919050565b60006020820190508181036000830152612fe281612fa6565b9050919050565b7f4c6f636b20706572696f64206e6f7420656e6465640000000000000000000000600082015250565b600061301f601583612599565b915061302a82612fe9565b602082019050919050565b6000602082019050818103600083015261304e81613012565b9050919050565b7f496e697469616c2066756e647320616c726561647920636c61696d6564000000600082015250565b600061308b601d83612599565b915061309682613055565b602082019050919050565b600060208201905081810360008301526130ba8161307e565b9050919050565b7f4e6f20696e766573746d656e7420666f756e6400000000000000000000000000600082015250565b60006130f7601383612599565b9150613102826130c1565b602082019050919050565b60006020820190508181036000830152613126816130ea565b9050919050565b600060408201905061314260008301856126d5565b61314f602083018461276b565b9392505050565b6000815190506131658161284c565b92915050565b600060208284031215613181576131806124c9565b5b600061318f84828501613156565b91505092915050565b7f546f74616c2066756e6473206c696d6974207265616368656400000000000000600082015250565b60006131ce601983612599565b91506131d982613198565b602082019050919050565b600060208201905081810360008301526131fd816131c1565b9050919050565b7f496e76616c696420636f6e747269627574696f6e20616d6f756e740000000000600082015250565b600061323a601b83612599565b915061324582613204565b602082019050919050565b600060208201905081810360008301526132698161322d565b9050919050565b600081905092915050565b60006132868261258e565b6132908185613270565b93506132a08185602086016125aa565b80840191505092915050565b60006132b8828561327b565b91506132c4828461327b565b91508190509392505050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061332c602583612599565b9150613337826132d0565b604082019050919050565b6000602082019050818103600083015261335b8161331f565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006133be602483612599565b91506133c982613362565b604082019050919050565b600060208201905081810360008301526133ed816133b1565b9050919050565b600060608201905061340960008301866126d5565b61341660208301856126d5565b613423604083018461276b565b949350505050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000613461601983612599565b915061346c8261342b565b602082019050919050565b6000602082019050818103600083015261349081613454565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b60006134f3603283612599565b91506134fe82613497565b604082019050919050565b60006020820190508181036000830152613522816134e6565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000613585602a83612599565b915061359082613529565b604082019050919050565b600060208201905081810360008301526135b481613578565b9050919050565b600081519050919050565b600082825260208201905092915050565b60006135e2826135bb565b6135ec81856135c6565b93506135fc8185602086016125aa565b613605816125d4565b840191505092915050565b600060808201905061362560008301876126d5565b61363260208301866126d5565b61363f604083018561276b565b818103606083015261365181846135d7565b905095945050505050565b60008151905061366b816124ff565b92915050565b600060208284031215613687576136866124c9565b5b60006136958482850161365c565b91505092915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006136fa602683612599565b91506137058261369e565b604082019050919050565b60006020820190508181036000830152613729816136ed565b9050919050565b600081905092915050565b6000613746826135bb565b6137508185613730565b93506137608185602086016125aa565b80840191505092915050565b6000613778828461373b565b915081905092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b60006137b9602083612599565b91506137c482613783565b602082019050919050565b600060208201905081810360008301526137e8816137ac565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000613825601c83612599565b9150613830826137ef565b602082019050919050565b6000602082019050818103600083015261385481613818565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000613891601d83612599565b915061389c8261385b565b602082019050919050565b600060208201905081810360008301526138c081613884565b905091905056fea26469706673582212205868ddf8e218b678c7dd762ec30ced50e5c26014256c5f08b3f011fb9827c2f964736f6c63430008120033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 PUSH1 0x8 SSTORE PUSH1 0x1 PUSH1 0x9 SSTORE PUSH1 0x0 PUSH1 0xA SSTORE CALLVALUE DUP1 ISZERO PUSH3 0x20 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x3F13 CODESIZE SUB DUP1 PUSH3 0x3F13 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH3 0x46 SWAP2 SWAP1 PUSH3 0x253 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x19 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D61737465724E6F646546756E64436572746966696361746500000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D4E464300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP5 DUP5 DUP2 PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH1 0x1 DUP2 SWAP1 SSTORE POP POP POP DUP2 PUSH1 0x2 SWAP1 DUP2 PUSH3 0x10E SWAP2 SWAP1 PUSH3 0x51F JUMP JUMPDEST POP DUP1 PUSH1 0x3 SWAP1 DUP2 PUSH3 0x120 SWAP2 SWAP1 PUSH3 0x51F JUMP JUMPDEST POP POP POP CALLER PUSH1 0xB PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH1 0xC PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP POP POP PUSH3 0x606 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x1E0 DUP3 PUSH3 0x1B3 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0x1F2 DUP2 PUSH3 0x1D3 JUMP JUMPDEST DUP2 EQ PUSH3 0x1FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH3 0x212 DUP2 PUSH3 0x1E7 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0x22D DUP2 PUSH3 0x218 JUMP JUMPDEST DUP2 EQ PUSH3 0x239 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH3 0x24D DUP2 PUSH3 0x222 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH3 0x26F JUMPI PUSH3 0x26E PUSH3 0x1AE JUMP JUMPDEST JUMPDE
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