-
-
Save mwaqasaslam/0be6cf327879d7c419ca9f56486525a1 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT OR Apache-2.0 | |
pragma solidity ^0.8.12; | |
interface IERC20Approve { | |
function approve(address spender, uint256 amount) external returns (bool); | |
} |
// SPDX-License-Identifier: MIT OR Apache-2.0 | |
pragma solidity ^0.8.12; | |
interface IERC20IncreaseAllowance { | |
function increaseAllowance(address spender, uint256 addedValue) external returns (bool); | |
} |
// SPDX-License-Identifier: MIT OR Apache-2.0 | |
pragma solidity ^0.8.12; | |
error BytesLibrary_Expected_Address_Not_Found(); | |
error BytesLibrary_Start_Location_Too_Large(); | |
/** | |
* @title A library for manipulation of byte arrays. | |
* @author batu-inal & HardlyDifficult | |
*/ | |
library BytesLibrary { | |
/// @notice An address is 20 bytes long | |
uint256 private constant ADDRESS_BYTES_LENGTH = 20; | |
/// @notice A signature is 4 bytes long | |
uint256 private constant SIGNATURE_BYTES_LENGTH = 4; | |
/** | |
* @dev Replace the address at the given location in a byte array if the contents at that location | |
* match the expected address. | |
*/ | |
function replaceAtIf( | |
bytes memory data, | |
uint256 startLocation, | |
address expectedAddress, | |
address newAddress | |
) internal pure { | |
unchecked { | |
if (startLocation > type(uint256).max - ADDRESS_BYTES_LENGTH) { | |
revert BytesLibrary_Start_Location_Too_Large(); | |
} | |
bytes memory expectedData = abi.encodePacked(expectedAddress); | |
bytes memory newData = abi.encodePacked(newAddress); | |
uint256 dataLocation; | |
for (uint256 i = 0; i < ADDRESS_BYTES_LENGTH; ++i) { | |
dataLocation = startLocation + i; | |
if (data[dataLocation] != expectedData[i]) { | |
revert BytesLibrary_Expected_Address_Not_Found(); | |
} | |
data[dataLocation] = newData[i]; | |
} | |
} | |
} | |
/** | |
* @dev Checks if the call data starts with the given function signature. | |
*/ | |
function startsWith(bytes memory callData, bytes4 functionSig) internal pure returns (bool) { | |
// A signature is 4 bytes long | |
if (callData.length < SIGNATURE_BYTES_LENGTH) { | |
return false; | |
} | |
return bytes4(callData) == functionSig; | |
} | |
} |
/* | |
・ | |
* ★ | |
・ 。 | |
・ ゚☆ 。 | |
* ★ ゚・。 * 。 | |
* ☆ 。・゚*.。 | |
゚ *.。☆。★ ・ | |
| |
` .-:::::-.` `-::---...``` | |
`-:` .:+ssssoooo++//:.` .-/+shhhhhhhhhhhhhyyyssooo: | |
.--::. .+ossso+/////++/:://-` .////+shhhhhhhhhhhhhhhhhhhhhy | |
`-----::. `/+////+++///+++/:--:/+/- -////+shhhhhhhhhhhhhhhhhhhhhy | |
`------:::-` `//-.``.-/+ooosso+:-.-/oso- -////+shhhhhhhhhhhhhhhhhhhhhy | |
.--------:::-` :+:.` .-/osyyyyyyso++syhyo.-////+shhhhhhhhhhhhhhhhhhhhhy | |
`-----------:::-. +o+:-.-:/oyhhhhhhdhhhhhdddy:-////+shhhhhhhhhhhhhhhhhhhhhy | |
.------------::::-- `oys+/::/+shhhhhhhdddddddddy/-////+shhhhhhhhhhhhhhhhhhhhhy | |
.--------------:::::-` +ys+////+yhhhhhhhddddddddhy:-////+yhhhhhhhhhhhhhhhhhhhhhy | |
`----------------::::::-`.ss+/:::+oyhhhhhhhhhhhhhhho`-////+shhhhhhhhhhhhhhhhhhhhhy | |
.------------------:::::::.-so//::/+osyyyhhhhhhhhhys` -////+shhhhhhhhhhhhhhhhhhhhhy | |
`.-------------------::/:::::..+o+////+oosssyyyyyyys+` .////+shhhhhhhhhhhhhhhhhhhhhy | |
.--------------------::/:::.` -+o++++++oooosssss/. `-//+shhhhhhhhhhhhhhhhhhhhyo | |
.------- ``````.......--` `-/+ooooosso+/-` `./++++///:::--...``hhhhyo | |
````` | |
* | |
・ 。 | |
・ ゚☆ 。 | |
* ★ ゚・。 * 。 | |
* ☆ 。・゚*.。 | |
゚ *.。☆。★ ・ | |
* ゚。·*・。 ゚* | |
☆゚・。°*. ゚ | |
・ ゚*。・゚★。 | |
・ *゚。 * | |
・゚*。★・ | |
☆∴。 * | |
・ 。 | |
*/ | |
// SPDX-License-Identifier: MIT OR Apache-2.0 | |
pragma solidity ^0.8.12; | |
import "./interfaces/dependencies/tokens/IERC20Approve.sol"; | |
import "./interfaces/dependencies/tokens/IERC20IncreaseAllowance.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | |
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; | |
import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/proxy/Clones.sol"; | |
import "./libraries/BytesLibrary.sol"; | |
/** | |
* @title Auto-forward ETH to a pre-determined list of addresses. | |
* @notice Deploys contracts which auto-forwards any ETH sent to it to a list of recipients | |
* considering their percent share of the payment received. | |
* ERC-20 tokens are also supported and may be split on demand by calling `splitERC20Tokens`. | |
* If another asset type is sent to this contract address such as an NFT, arbitrary calls may be made by one | |
* of the split recipients in order to recover them. | |
* @dev Uses create2 counterfactual addresses so that the destination is known from the terms of the split. | |
* @author batu-inal & HardlyDifficult | |
*/ | |
contract PercentSplitETH is Initializable { | |
using AddressUpgradeable for address payable; | |
using AddressUpgradeable for address; | |
using BytesLibrary for bytes; | |
using SafeMath for uint256; | |
/// @notice A representation of shares using 16-bits for efficient storage. | |
/// @dev This is only used internally. | |
struct ShareCompressed { | |
address payable recipient; | |
uint16 percentInBasisPoints; | |
} | |
/// @notice A representation of shares using 256-bits to ease integration. | |
struct Share { | |
address payable recipient; | |
uint256 percentInBasisPoints; | |
} | |
ShareCompressed[] private _shares; | |
uint256 private constant BASIS_POINTS = 10_000; | |
/** | |
* @notice Emitted when an ERC20 token is transferred to a recipient through this split contract. | |
* @param erc20Contract The address of the ERC20 token contract. | |
* @param account The account which received payment. | |
* @param amount The amount of ERC20 tokens sent to this recipient. | |
*/ | |
event ERC20Transferred(address indexed erc20Contract, address indexed account, uint256 amount); | |
/** | |
* @notice Emitted when ETH is transferred to a recipient through this split contract. | |
* @param account The account which received payment. | |
* @param amount The amount of ETH payment sent to this recipient. | |
*/ | |
event ETHTransferred(address indexed account, uint256 amount); | |
/** | |
* @notice Emitted when a new percent split contract is created from this factory. | |
* @param contractAddress The address of the new percent split contract. | |
*/ | |
event PercentSplitCreated(address indexed contractAddress); | |
/** | |
* @notice Emitted for each share of the split being defined. | |
* @param recipient The address of the recipient when payment to the split is received. | |
* @param percentInBasisPoints The percent of the payment received by the recipient, in basis points. | |
*/ | |
event PercentSplitShare(address indexed recipient, uint256 percentInBasisPoints); | |
/** | |
* @dev Requires that the msg.sender is one of the recipients in this split. | |
*/ | |
modifier onlyRecipient() { | |
for (uint256 i = 0; i < _shares.length; ) { | |
if (_shares[i].recipient == msg.sender) { | |
_; | |
return; | |
} | |
unchecked { | |
++i; | |
} | |
} | |
revert("Split: Can only be called by one of the recipients"); | |
} | |
// solhint-disable-next-line no-empty-blocks | |
constructor() initializer { | |
// Initialize the template to avoid confusion. | |
// https://forum.openzeppelin.com/t/uupsupgradeable-vulnerability-post-mortem/15680/6 | |
} | |
/** | |
* @notice Called once to configure the contract after the initial deployment. | |
* @dev This will be called by `createSplit` after deploying the proxy so it should never be called directly. | |
* @param shares The list of recipients and their share of the payment for the template to use. | |
*/ | |
function initialize(Share[] calldata shares) external initializer { | |
require(shares.length > 1, "Split: Too few recipients"); | |
require(shares.length < 6, "Split: Too many recipients"); | |
uint256 total; | |
unchecked { | |
// The array length cannot overflow 256 bits. | |
for (uint256 i = 0; i < shares.length; ++i) { | |
require(shares[i].percentInBasisPoints < BASIS_POINTS, "Split: Share must be less than 100%"); | |
// Require above ensures total will not overflow. | |
total += shares[i].percentInBasisPoints; | |
_shares.push( | |
ShareCompressed({ | |
recipient: shares[i].recipient, | |
percentInBasisPoints: uint16(shares[i].percentInBasisPoints) | |
}) | |
); | |
emit PercentSplitShare(shares[i].recipient, shares[i].percentInBasisPoints); | |
} | |
} | |
require(total == BASIS_POINTS, "Split: Total amount must equal 100%"); | |
} | |
/** | |
* @notice Forwards any ETH received to the recipients in this split. | |
* @dev Each recipient increases the gas required to split | |
* and contract recipients may significantly increase the gas required. | |
*/ | |
receive() external payable { | |
_splitETH(msg.value); | |
} | |
/** | |
* @notice Creates a new minimal proxy contract and initializes it with the given split terms. | |
* If the contract had already been created, its address is returned. | |
* This must be called on the original implementation and not a proxy created previously. | |
* @param shares The list of recipients and their share of the payment for this split. | |
* @return splitInstance The contract address for the split contract created. | |
*/ | |
function createSplit(Share[] calldata shares) external returns (PercentSplitETH splitInstance) { | |
bytes32 salt = keccak256(abi.encode(shares)); | |
address clone = Clones.predictDeterministicAddress(address(this), salt); | |
splitInstance = PercentSplitETH(payable(clone)); | |
if (!clone.isContract()) { | |
emit PercentSplitCreated(clone); | |
Clones.cloneDeterministic(address(this), salt); | |
splitInstance.initialize(shares); | |
} | |
} | |
/** | |
* @notice Allows the split recipients to make an arbitrary contract call. | |
* @dev This is provided to allow recovering from unexpected scenarios, | |
* such as receiving an NFT at this address. | |
* | |
* It will first attempt a fair split of ERC20 tokens before proceeding. | |
* | |
* This contract is built to split ETH payments. The ability to attempt to make other calls is here | |
* just in case other assets were also sent so that they don't get locked forever in the contract. | |
* @param target The address of the contract to call. | |
* @param callData The data to send to the `target` contract. | |
*/ | |
function proxyCall(address payable target, bytes calldata callData) external onlyRecipient { | |
require( | |
!callData.startsWith(type(IERC20Approve).interfaceId) && | |
!callData.startsWith(type(IERC20IncreaseAllowance).interfaceId), | |
"Split: ERC20 tokens must be split" | |
); | |
_splitERC20Tokens(IERC20(target)); | |
target.functionCall(callData); | |
} | |
/** | |
* @notice Allows any ETH stored by the contract to be split among recipients. | |
* @dev Normally ETH is forwarded as it comes in, but a balance in this contract | |
* is possible if it was sent before the contract was created or if self destruct was used. | |
*/ | |
function splitETH() external { | |
_splitETH(address(this).balance); | |
} | |
/** | |
* @notice Anyone can call this function to split all available tokens at the provided address between the recipients. | |
* @dev This contract is built to split ETH payments. The ability to attempt to split ERC20 tokens is here | |
* just in case tokens were also sent so that they don't get locked forever in the contract. | |
* @param erc20Contract The address of the ERC20 token contract to split tokens for. | |
*/ | |
function splitERC20Tokens(IERC20 erc20Contract) external { | |
require(_splitERC20Tokens(erc20Contract), "Split: ERC20 split failed"); | |
} | |
function _splitERC20Tokens(IERC20 erc20Contract) private returns (bool) { | |
try erc20Contract.balanceOf(address(this)) returns (uint256 balance) { | |
if (balance == 0) { | |
return false; | |
} | |
uint256 amountToSend; | |
uint256 totalSent; | |
unchecked { | |
for (uint256 i = _shares.length - 1; i != 0; i--) { | |
ShareCompressed memory share = _shares[i]; | |
bool success; | |
(success, amountToSend) = balance.tryMul(share.percentInBasisPoints); | |
if (!success) { | |
return false; | |
} | |
amountToSend /= BASIS_POINTS; | |
totalSent += amountToSend; | |
try erc20Contract.transfer(share.recipient, amountToSend) { | |
emit ERC20Transferred(address(erc20Contract), share.recipient, amountToSend); | |
} catch { | |
return false; | |
} | |
} | |
// Favor the 1st recipient if there are any rounding issues | |
amountToSend = balance - totalSent; | |
} | |
try erc20Contract.transfer(_shares[0].recipient, amountToSend) { | |
emit ERC20Transferred(address(erc20Contract), _shares[0].recipient, amountToSend); | |
} catch { | |
return false; | |
} | |
return true; | |
} catch { | |
return false; | |
} | |
} | |
function _splitETH(uint256 value) private { | |
if (value != 0) { | |
uint256 totalSent; | |
uint256 amountToSend; | |
unchecked { | |
for (uint256 i = _shares.length - 1; i != 0; i--) { | |
ShareCompressed memory share = _shares[i]; | |
amountToSend = (value * share.percentInBasisPoints) / BASIS_POINTS; | |
totalSent += amountToSend; | |
share.recipient.sendValue(amountToSend); | |
emit ETHTransferred(share.recipient, amountToSend); | |
} | |
// Favor the 1st recipient if there are any rounding issues | |
amountToSend = value - totalSent; | |
} | |
_shares[0].recipient.sendValue(amountToSend); | |
emit ETHTransferred(_shares[0].recipient, amountToSend); | |
} | |
} | |
/** | |
* @notice Returns a recipient's percent share in basis points. | |
* @param index The index of the recipient to get the share of. | |
* @return percentInBasisPoints The percent of the payment received by the recipient, in basis points. | |
*/ | |
function getPercentInBasisPointsByIndex(uint256 index) external view returns (uint256 percentInBasisPoints) { | |
percentInBasisPoints = _shares[index].percentInBasisPoints; | |
} | |
/** | |
* @notice Returns the address for the proxy contract which would represent the given split terms. | |
* @dev The contract may or may not already be deployed at the address returned. | |
* Ensure that it is deployed before sending funds to this address. | |
* @param shares The list of recipients and their share of the payment for this split. | |
* @return splitInstance The contract address for the split contract created. | |
*/ | |
function getPredictedSplitAddress(Share[] calldata shares) external view returns (address splitInstance) { | |
bytes32 salt = keccak256(abi.encode(shares)); | |
splitInstance = Clones.predictDeterministicAddress(address(this), salt); | |
} | |
/** | |
* @notice Returns how many recipients are part of this split. | |
* @return length The number of recipients in this split. | |
*/ | |
function getShareLength() external view returns (uint256 length) { | |
length = _shares.length; | |
} | |
/** | |
* @notice Returns a recipient in this split. | |
* @param index The index of the recipient to get. | |
* @return recipient The recipient at the given index. | |
*/ | |
function getShareRecipientByIndex(uint256 index) external view returns (address payable recipient) { | |
recipient = _shares[index].recipient; | |
} | |
/** | |
* @notice Returns a tuple with the terms of this split. | |
* @return shares The list of recipients and their share of the payment for this split. | |
*/ | |
function getShares() external view returns (Share[] memory shares) { | |
shares = new Share[](_shares.length); | |
for (uint256 i = 0; i < shares.length; ) { | |
shares[i] = Share({ recipient: _shares[i].recipient, percentInBasisPoints: _shares[i].percentInBasisPoints }); | |
unchecked { | |
++i; | |
} | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) | |
pragma solidity ^0.8.0; | |
import "./IAccessControlEnumerableUpgradeable.sol"; | |
import "./AccessControlUpgradeable.sol"; | |
import "../utils/structs/EnumerableSetUpgradeable.sol"; | |
import "../proxy/utils/Initializable.sol"; | |
/** | |
* @dev Extension of {AccessControl} that allows enumerating the members of each role. | |
*/ | |
abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable { | |
function __AccessControlEnumerable_init() internal onlyInitializing { | |
} | |
function __AccessControlEnumerable_init_unchained() internal onlyInitializing { | |
} | |
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; | |
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers; | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { | |
return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); | |
} | |
/** | |
* @dev Returns one of the accounts that have `role`. `index` must be a | |
* value between 0 and {getRoleMemberCount}, non-inclusive. | |
* | |
* Role bearers are not sorted in any particular way, and their ordering may | |
* change at any point. | |
* | |
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure | |
* you perform all queries on the same block. See the following | |
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] | |
* for more information. | |
*/ | |
function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { | |
return _roleMembers[role].at(index); | |
} | |
/** | |
* @dev Returns the number of accounts that have `role`. Can be used | |
* together with {getRoleMember} to enumerate all bearers of a role. | |
*/ | |
function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { | |
return _roleMembers[role].length(); | |
} | |
/** | |
* @dev Overload {_grantRole} to track enumerable memberships | |
*/ | |
function _grantRole(bytes32 role, address account) internal virtual override { | |
super._grantRole(role, account); | |
_roleMembers[role].add(account); | |
} | |
/** | |
* @dev Overload {_revokeRole} to track enumerable memberships | |
*/ | |
function _revokeRole(bytes32 role, address account) internal virtual override { | |
super._revokeRole(role, account); | |
_roleMembers[role].remove(account); | |
} | |
/** | |
* @dev This empty reserved space is put in place to allow future versions to add new | |
* variables without shifting down storage in the inheritance chain. | |
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps | |
*/ | |
uint256[49] private __gap; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) | |
pragma solidity ^0.8.0; | |
import "./IAccessControlUpgradeable.sol"; | |
import "../utils/ContextUpgradeable.sol"; | |
import "../utils/StringsUpgradeable.sol"; | |
import "../utils/introspection/ERC165Upgradeable.sol"; | |
import "../proxy/utils/Initializable.sol"; | |
/** | |
* @dev Contract module that allows children to implement role-based access | |
* control mechanisms. This is a lightweight version that doesn't allow enumerating role | |
* members except through off-chain means by accessing the contract event logs. Some | |
* applications may benefit from on-chain enumerability, for those cases see | |
* {AccessControlEnumerable}. | |
* | |
* Roles are referred to by their `bytes32` identifier. These should be exposed | |
* in the external API and be unique. The best way to achieve this is by | |
* using `public constant` hash digests: | |
* | |
* ``` | |
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); | |
* ``` | |
* | |
* Roles can be used to represent a set of permissions. To restrict access to a | |
* function call, use {hasRole}: | |
* | |
* ``` | |
* function foo() public { | |
* require(hasRole(MY_ROLE, msg.sender)); | |
* ... | |
* } | |
* ``` | |
* | |
* Roles can be granted and revoked dynamically via the {grantRole} and | |
* {revokeRole} functions. Each role has an associated admin role, and only | |
* accounts that have a role's admin role can call {grantRole} and {revokeRole}. | |
* | |
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means | |
* that only accounts with this role will be able to grant or revoke other | |
* roles. More complex role relationships can be created by using | |
* {_setRoleAdmin}. | |
* | |
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to | |
* grant and revoke this role. Extra precautions should be taken to secure | |
* accounts that have been granted it. | |
*/ | |
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { | |
function __AccessControl_init() internal onlyInitializing { | |
} | |
function __AccessControl_init_unchained() internal onlyInitializing { | |
} | |
struct RoleData { | |
mapping(address => bool) members; | |
bytes32 adminRole; | |
} | |
mapping(bytes32 => RoleData) private _roles; | |
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; | |
/** | |
* @dev Modifier that checks that an account has a specific role. Reverts | |
* with a standardized message including the required role. | |
* | |
* The format of the revert reason is given by the following regular expression: | |
* | |
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ | |
* | |
* _Available since v4.1._ | |
*/ | |
modifier onlyRole(bytes32 role) { | |
_checkRole(role); | |
_; | |
} | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { | |
return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); | |
} | |
/** | |
* @dev Returns `true` if `account` has been granted `role`. | |
*/ | |
function hasRole(bytes32 role, address account) public view virtual override returns (bool) { | |
return _roles[role].members[account]; | |
} | |
/** | |
* @dev Revert with a standard message if `_msgSender()` is missing `role`. | |
* Overriding this function changes the behavior of the {onlyRole} modifier. | |
* | |
* Format of the revert message is described in {_checkRole}. | |
* | |
* _Available since v4.6._ | |
*/ | |
function _checkRole(bytes32 role) internal view virtual { | |
_checkRole(role, _msgSender()); | |
} | |
/** | |
* @dev Revert with a standard message if `account` is missing `role`. | |
* | |
* The format of the revert reason is given by the following regular expression: | |
* | |
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ | |
*/ | |
function _checkRole(bytes32 role, address account) internal view virtual { | |
if (!hasRole(role, account)) { | |
revert( | |
string( | |
abi.encodePacked( | |
"AccessControl: account ", | |
StringsUpgradeable.toHexString(account), | |
" is missing role ", | |
StringsUpgradeable.toHexString(uint256(role), 32) | |
) | |
) | |
); | |
} | |
} | |
/** | |
* @dev Returns the admin role that controls `role`. See {grantRole} and | |
* {revokeRole}. | |
* | |
* To change a role's admin, use {_setRoleAdmin}. | |
*/ | |
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { | |
return _roles[role].adminRole; | |
} | |
/** | |
* @dev Grants `role` to `account`. | |
* | |
* If `account` had not been already granted `role`, emits a {RoleGranted} | |
* event. | |
* | |
* Requirements: | |
* | |
* - the caller must have ``role``'s admin role. | |
* | |
* May emit a {RoleGranted} event. | |
*/ | |
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { | |
_grantRole(role, account); | |
} | |
/** | |
* @dev Revokes `role` from `account`. | |
* | |
* If `account` had been granted `role`, emits a {RoleRevoked} event. | |
* | |
* Requirements: | |
* | |
* - the caller must have ``role``'s admin role. | |
* | |
* May emit a {RoleRevoked} event. | |
*/ | |
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { | |
_revokeRole(role, account); | |
} | |
/** | |
* @dev Revokes `role` from the calling account. | |
* | |
* Roles are often managed via {grantRole} and {revokeRole}: this function's | |
* purpose is to provide a mechanism for accounts to lose their privileges | |
* if they are compromised (such as when a trusted device is misplaced). | |
* | |
* If the calling account had been revoked `role`, emits a {RoleRevoked} | |
* event. | |
* | |
* Requirements: | |
* | |
* - the caller must be `account`. | |
* | |
* May emit a {RoleRevoked} event. | |
*/ | |
function renounceRole(bytes32 role, address account) public virtual override { | |
require(account == _msgSender(), "AccessControl: can only renounce roles for self"); | |
_revokeRole(role, account); | |
} | |
/** | |
* @dev Grants `role` to `account`. | |
* | |
* If `account` had not been already granted `role`, emits a {RoleGranted} | |
* event. Note that unlike {grantRole}, this function doesn't perform any | |
* checks on the calling account. | |
* | |
* May emit a {RoleGranted} event. | |
* | |
* [WARNING] | |
* ==== | |
* This function should only be called from the constructor when setting | |
* up the initial roles for the system. | |
* | |
* Using this function in any other way is effectively circumventing the admin | |
* system imposed by {AccessControl}. | |
* ==== | |
* | |
* NOTE: This function is deprecated in favor of {_grantRole}. | |
*/ | |
function _setupRole(bytes32 role, address account) internal virtual { | |
_grantRole(role, account); | |
} | |
/** | |
* @dev Sets `adminRole` as ``role``'s admin role. | |
* | |
* Emits a {RoleAdminChanged} event. | |
*/ | |
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { | |
bytes32 previousAdminRole = getRoleAdmin(role); | |
_roles[role].adminRole = adminRole; | |
emit RoleAdminChanged(role, previousAdminRole, adminRole); | |
} | |
/** | |
* @dev Grants `role` to `account`. | |
* | |
* Internal function without access restriction. | |
* | |
* May emit a {RoleGranted} event. | |
*/ | |
function _grantRole(bytes32 role, address account) internal virtual { | |
if (!hasRole(role, account)) { | |
_roles[role].members[account] = true; | |
emit RoleGranted(role, account, _msgSender()); | |
} | |
} | |
/** | |
* @dev Revokes `role` from `account`. | |
* | |
* Internal function without access restriction. | |
* | |
* May emit a {RoleRevoked} event. | |
*/ | |
function _revokeRole(bytes32 role, address account) internal virtual { | |
if (hasRole(role, account)) { | |
_roles[role].members[account] = false; | |
emit RoleRevoked(role, account, _msgSender()); | |
} | |
} | |
/** | |
* @dev This empty reserved space is put in place to allow future versions to add new | |
* variables without shifting down storage in the inheritance chain. | |
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps | |
*/ | |
uint256[49] private __gap; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) | |
pragma solidity ^0.8.0; | |
import "./IAccessControlUpgradeable.sol"; | |
/** | |
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection. | |
*/ | |
interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable { | |
/** | |
* @dev Returns one of the accounts that have `role`. `index` must be a | |
* value between 0 and {getRoleMemberCount}, non-inclusive. | |
* | |
* Role bearers are not sorted in any particular way, and their ordering may | |
* change at any point. | |
* | |
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure | |
* you perform all queries on the same block. See the following | |
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] | |
* for more information. | |
*/ | |
function getRoleMember(bytes32 role, uint256 index) external view returns (address); | |
/** | |
* @dev Returns the number of accounts that have `role`. Can be used | |
* together with {getRoleMember} to enumerate all bearers of a role. | |
*/ | |
function getRoleMemberCount(bytes32 role) external view returns (uint256); | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) | |
pragma solidity ^0.8.0; | |
/** | |
* @dev External interface of AccessControl declared to support ERC165 detection. | |
*/ | |
interface IAccessControlUpgradeable { | |
/** | |
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` | |
* | |
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite | |
* {RoleAdminChanged} not being emitted signaling this. | |
* | |
* _Available since v3.1._ | |
*/ | |
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); | |
/** | |
* @dev Emitted when `account` is granted `role`. | |
* | |
* `sender` is the account that originated the contract call, an admin role | |
* bearer except when using {AccessControl-_setupRole}. | |
*/ | |
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); | |
/** | |
* @dev Emitted when `account` is revoked `role`. | |
* | |
* `sender` is the account that originated the contract call: | |
* - if using `revokeRole`, it is the admin role bearer | |
* - if using `renounceRole`, it is the role bearer (i.e. `account`) | |
*/ | |
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); | |
/** | |
* @dev Returns `true` if `account` has been granted `role`. | |
*/ | |
function hasRole(bytes32 role, address account) external view returns (bool); | |
/** | |
* @dev Returns the admin role that controls `role`. See {grantRole} and | |
* {revokeRole}. | |
* | |
* To change a role's admin, use {AccessControl-_setRoleAdmin}. | |
*/ | |
function getRoleAdmin(bytes32 role) external view returns (bytes32); | |
/** | |
* @dev Grants `role` to `account`. | |
* | |
* If `account` had not been already granted `role`, emits a {RoleGranted} | |
* event. | |
* | |
* Requirements: | |
* | |
* - the caller must have ``role``'s admin role. | |
*/ | |
function grantRole(bytes32 role, address account) external; | |
/** | |
* @dev Revokes `role` from `account`. | |
* | |
* If `account` had been granted `role`, emits a {RoleRevoked} event. | |
* | |
* Requirements: | |
* | |
* - the caller must have ``role``'s admin role. | |
*/ | |
function revokeRole(bytes32 role, address account) external; | |
/** | |
* @dev Revokes `role` from the calling account. | |
* | |
* Roles are often managed via {grantRole} and {revokeRole}: this function's | |
* purpose is to provide a mechanism for accounts to lose their privileges | |
* if they are compromised (such as when a trusted device is misplaced). | |
* | |
* If the calling account had been granted `role`, emits a {RoleRevoked} | |
* event. | |
* | |
* Requirements: | |
* | |
* - the caller must be `account`. | |
*/ | |
function renounceRole(bytes32 role, address account) external; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) | |
pragma solidity ^0.8.0; | |
import "../utils/introspection/IERC165Upgradeable.sol"; | |
/** | |
* @dev Interface for the NFT Royalty Standard. | |
* | |
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal | |
* support for royalty payments across all NFT marketplaces and ecosystem participants. | |
* | |
* _Available since v4.5._ | |
*/ | |
interface IERC2981Upgradeable is IERC165Upgradeable { | |
/** | |
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of | |
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange. | |
*/ | |
function royaltyInfo(uint256 tokenId, uint256 salePrice) | |
external | |
view | |
returns (address receiver, uint256 royaltyAmount); | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol) | |
pragma solidity ^0.8.2; | |
import "../../utils/AddressUpgradeable.sol"; | |
/** | |
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed | |
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an | |
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer | |
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. | |
* | |
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be | |
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in | |
* case an upgrade adds a module that needs to be initialized. | |
* | |
* For example: | |
* | |
* [.hljs-theme-light.nopadding] | |
* ``` | |
* contract MyToken is ERC20Upgradeable { | |
* function initialize() initializer public { | |
* __ERC20_init("MyToken", "MTK"); | |
* } | |
* } | |
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { | |
* function initializeV2() reinitializer(2) public { | |
* __ERC20Permit_init("MyToken"); | |
* } | |
* } | |
* ``` | |
* | |
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as | |
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. | |
* | |
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure | |
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. | |
* | |
* [CAUTION] | |
* ==== | |
* Avoid leaving a contract uninitialized. | |
* | |
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation | |
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke | |
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: | |
* | |
* [.hljs-theme-light.nopadding] | |
* ``` | |
* /// @custom:oz-upgrades-unsafe-allow constructor | |
* constructor() { | |
* _disableInitializers(); | |
* } | |
* ``` | |
* ==== | |
*/ | |
abstract contract Initializable { | |
/** | |
* @dev Indicates that the contract has been initialized. | |
* @custom:oz-retyped-from bool | |
*/ | |
uint8 private _initialized; | |
/** | |
* @dev Indicates that the contract is in the process of being initialized. | |
*/ | |
bool private _initializing; | |
/** | |
* @dev Triggered when the contract has been initialized or reinitialized. | |
*/ | |
event Initialized(uint8 version); | |
/** | |
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, | |
* `onlyInitializing` functions can be used to initialize parent contracts. | |
* | |
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a | |
* constructor. | |
* | |
* Emits an {Initialized} event. | |
*/ | |
modifier initializer() { | |
bool isTopLevelCall = !_initializing; | |
require( | |
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), | |
"Initializable: contract is already initialized" | |
); | |
_initialized = 1; | |
if (isTopLevelCall) { | |
_initializing = true; | |
} | |
_; | |
if (isTopLevelCall) { | |
_initializing = false; | |
emit Initialized(1); | |
} | |
} | |
/** | |
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the | |
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be | |
* used to initialize parent contracts. | |
* | |
* A reinitializer may be used after the original initialization step. This is essential to configure modules that | |
* are added through upgrades and that require initialization. | |
* | |
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` | |
* cannot be nested. If one is invoked in the context of another, execution will revert. | |
* | |
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in | |
* a contract, executing them in the right order is up to the developer or operator. | |
* | |
* WARNING: setting the version to 255 will prevent any future reinitialization. | |
* | |
* Emits an {Initialized} event. | |
*/ | |
modifier reinitializer(uint8 version) { | |
require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); | |
_initialized = version; | |
_initializing = true; | |
_; | |
_initializing = false; | |
emit Initialized(version); | |
} | |
/** | |
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the | |
* {initializer} and {reinitializer} modifiers, directly or indirectly. | |
*/ | |
modifier onlyInitializing() { | |
require(_initializing, "Initializable: contract is not initializing"); | |
_; | |
} | |
/** | |
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. | |
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized | |
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called | |
* through proxies. | |
* | |
* Emits an {Initialized} event the first time it is successfully executed. | |
*/ | |
function _disableInitializers() internal virtual { | |
require(!_initializing, "Initializable: contract is initializing"); | |
if (_initialized < type(uint8).max) { | |
_initialized = type(uint8).max; | |
emit Initialized(type(uint8).max); | |
} | |
} | |
/** | |
* @dev Internal function that returns the initialized version. Returns `_initialized` | |
*/ | |
function _getInitializedVersion() internal view returns (uint8) { | |
return _initialized; | |
} | |
/** | |
* @dev Internal function that returns the initialized version. Returns `_initializing` | |
*/ | |
function _isInitializing() internal view returns (bool) { | |
return _initializing; | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) | |
pragma solidity ^0.8.0; | |
import "../proxy/utils/Initializable.sol"; | |
/** | |
* @dev Contract module that helps prevent reentrant calls to a function. | |
* | |
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier | |
* available, which can be applied to functions to make sure there are no nested | |
* (reentrant) calls to them. | |
* | |
* Note that because there is a single `nonReentrant` guard, functions marked as | |
* `nonReentrant` may not call one another. This can be worked around by making | |
* those functions `private`, and then adding `external` `nonReentrant` entry | |
* points to them. | |
* | |
* TIP: If you would like to learn more about reentrancy and alternative ways | |
* to protect against it, check out our blog post | |
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. | |
*/ | |
abstract contract ReentrancyGuardUpgradeable is Initializable { | |
// Booleans are more expensive than uint256 or any type that takes up a full | |
// word because each write operation emits an extra SLOAD to first read the | |
// slot's contents, replace the bits taken up by the boolean, and then write | |
// back. This is the compiler's defense against contract upgrades and | |
// pointer aliasing, and it cannot be disabled. | |
// The values being non-zero value makes deployment a bit more expensive, | |
// but in exchange the refund on every call to nonReentrant will be lower in | |
// amount. Since refunds are capped to a percentage of the total | |
// transaction's gas, it is best to keep them low in cases like this one, to | |
// increase the likelihood of the full refund coming into effect. | |
uint256 private constant _NOT_ENTERED = 1; | |
uint256 private constant _ENTERED = 2; | |
uint256 private _status; | |
function __ReentrancyGuard_init() internal onlyInitializing { | |
__ReentrancyGuard_init_unchained(); | |
} | |
function __ReentrancyGuard_init_unchained() internal onlyInitializing { | |
_status = _NOT_ENTERED; | |
} | |
/** | |
* @dev Prevents a contract from calling itself, directly or indirectly. | |
* Calling a `nonReentrant` function from another `nonReentrant` | |
* function is not supported. It is possible to prevent this from happening | |
* by making the `nonReentrant` function external, and making it call a | |
* `private` function that does the actual work. | |
*/ | |
modifier nonReentrant() { | |
_nonReentrantBefore(); | |
_; | |
_nonReentrantAfter(); | |
} | |
function _nonReentrantBefore() private { | |
// On the first call to nonReentrant, _status will be _NOT_ENTERED | |
require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); | |
// Any calls to nonReentrant after this point will fail | |
_status = _ENTERED; | |
} | |
function _nonReentrantAfter() private { | |
// By storing the original value once again, a refund is triggered (see | |
// https://eips.ethereum.org/EIPS/eip-2200) | |
_status = _NOT_ENTERED; | |
} | |
/** | |
* @dev This empty reserved space is put in place to allow future versions to add new | |
* variables without shifting down storage in the inheritance chain. | |
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps | |
*/ | |
uint256[49] private __gap; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol) | |
pragma solidity ^0.8.0; | |
import "./IERC721Upgradeable.sol"; | |
import "./IERC721ReceiverUpgradeable.sol"; | |
import "./extensions/IERC721MetadataUpgradeable.sol"; | |
import "../../utils/AddressUpgradeable.sol"; | |
import "../../utils/ContextUpgradeable.sol"; | |
import "../../utils/StringsUpgradeable.sol"; | |
import "../../utils/introspection/ERC165Upgradeable.sol"; | |
import "../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { | |
using AddressUpgradeable for address; | |
using StringsUpgradeable 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. | |
*/ | |
function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { | |
__ERC721_init_unchained(name_, symbol_); | |
} | |
function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { | |
_name = name_; | |
_symbol = symbol_; | |
} | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { | |
return | |
interfaceId == type(IERC721Upgradeable).interfaceId || | |
interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.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 = ERC721Upgradeable.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 = ERC721Upgradeable.ownerOf(tokenId); | |
_beforeTokenTransfer(owner, address(0), tokenId, 1); | |
// Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook | |
owner = ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { | |
return retval == IERC721ReceiverUpgradeable.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 { | |
if (batchSize > 1) { | |
if (from != address(0)) { | |
_balances[from] -= batchSize; | |
} | |
if (to != address(0)) { | |
_balances[to] += batchSize; | |
} | |
} | |
} | |
/** | |
* @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 This empty reserved space is put in place to allow future versions to add new | |
* variables without shifting down storage in the inheritance chain. | |
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps | |
*/ | |
uint256[44] private __gap; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) | |
pragma solidity ^0.8.0; | |
import "../ERC721Upgradeable.sol"; | |
import "./IERC721EnumerableUpgradeable.sol"; | |
import "../../../proxy/utils/Initializable.sol"; | |
/** | |
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds | |
* enumerability of all the token ids in the contract as well as all token ids owned by each | |
* account. | |
*/ | |
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { | |
function __ERC721Enumerable_init() internal onlyInitializing { | |
} | |
function __ERC721Enumerable_init_unchained() internal onlyInitializing { | |
} | |
// Mapping from owner to list of owned token IDs | |
mapping(address => mapping(uint256 => uint256)) private _ownedTokens; | |
// Mapping from token ID to index of the owner tokens list | |
mapping(uint256 => uint256) private _ownedTokensIndex; | |
// Array with all token ids, used for enumeration | |
uint256[] private _allTokens; | |
// Mapping from token id to position in the allTokens array | |
mapping(uint256 => uint256) private _allTokensIndex; | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { | |
return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); | |
} | |
/** | |
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. | |
*/ | |
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { | |
require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); | |
return _ownedTokens[owner][index]; | |
} | |
/** | |
* @dev See {IERC721Enumerable-totalSupply}. | |
*/ | |
function totalSupply() public view virtual override returns (uint256) { | |
return _allTokens.length; | |
} | |
/** | |
* @dev See {IERC721Enumerable-tokenByIndex}. | |
*/ | |
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { | |
require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); | |
return _allTokens[index]; | |
} | |
/** | |
* @dev See {ERC721-_beforeTokenTransfer}. | |
*/ | |
function _beforeTokenTransfer( | |
address from, | |
address to, | |
uint256 firstTokenId, | |
uint256 batchSize | |
) internal virtual override { | |
super._beforeTokenTransfer(from, to, firstTokenId, batchSize); | |
if (batchSize > 1) { | |
// Will only trigger during construction. Batch transferring (minting) is not available afterwards. | |
revert("ERC721Enumerable: consecutive transfers not supported"); | |
} | |
uint256 tokenId = firstTokenId; | |
if (from == address(0)) { | |
_addTokenToAllTokensEnumeration(tokenId); | |
} else if (from != to) { | |
_removeTokenFromOwnerEnumeration(from, tokenId); | |
} | |
if (to == address(0)) { | |
_removeTokenFromAllTokensEnumeration(tokenId); | |
} else if (to != from) { | |
_addTokenToOwnerEnumeration(to, tokenId); | |
} | |
} | |
/** | |
* @dev Private function to add a token to this extension's ownership-tracking data structures. | |
* @param to address representing the new owner of the given token ID | |
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address | |
*/ | |
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { | |
uint256 length = ERC721Upgradeable.balanceOf(to); | |
_ownedTokens[to][length] = tokenId; | |
_ownedTokensIndex[tokenId] = length; | |
} | |
/** | |
* @dev Private function to add a token to this extension's token tracking data structures. | |
* @param tokenId uint256 ID of the token to be added to the tokens list | |
*/ | |
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { | |
_allTokensIndex[tokenId] = _allTokens.length; | |
_allTokens.push(tokenId); | |
} | |
/** | |
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that | |
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for | |
* gas optimizations e.g. when performing a transfer operation (avoiding double writes). | |
* This has O(1) time complexity, but alters the order of the _ownedTokens array. | |
* @param from address representing the previous owner of the given token ID | |
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address | |
*/ | |
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { | |
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and | |
// then delete the last slot (swap and pop). | |
uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; | |
uint256 tokenIndex = _ownedTokensIndex[tokenId]; | |
// When the token to delete is the last token, the swap operation is unnecessary | |
if (tokenIndex != lastTokenIndex) { | |
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; | |
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token | |
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index | |
} | |
// This also deletes the contents at the last position of the array | |
delete _ownedTokensIndex[tokenId]; | |
delete _ownedTokens[from][lastTokenIndex]; | |
} | |
/** | |
* @dev Private function to remove a token from this extension's token tracking data structures. | |
* This has O(1) time complexity, but alters the order of the _allTokens array. | |
* @param tokenId uint256 ID of the token to be removed from the tokens list | |
*/ | |
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { | |
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and | |
// then delete the last slot (swap and pop). | |
uint256 lastTokenIndex = _allTokens.length - 1; | |
uint256 tokenIndex = _allTokensIndex[tokenId]; | |
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so | |
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding | |
// an 'if' statement (like in _removeTokenFromOwnerEnumeration) | |
uint256 lastTokenId = _allTokens[lastTokenIndex]; | |
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token | |
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index | |
// This also deletes the contents at the last position of the array | |
delete _allTokensIndex[tokenId]; | |
_allTokens.pop(); | |
} | |
/** | |
* @dev This empty reserved space is put in place to allow future versions to add new | |
* variables without shifting down storage in the inheritance chain. | |
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps | |
*/ | |
uint256[46] private __gap; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) | |
pragma solidity ^0.8.0; | |
import "../IERC721Upgradeable.sol"; | |
/** | |
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension | |
* @dev See https://eips.ethereum.org/EIPS/eip-721 | |
*/ | |
interface IERC721EnumerableUpgradeable is IERC721Upgradeable { | |
/** | |
* @dev Returns the total amount of tokens stored by the contract. | |
*/ | |
function totalSupply() external view returns (uint256); | |
/** | |
* @dev Returns a token ID owned by `owner` at a given `index` of its token list. | |
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens. | |
*/ | |
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); | |
/** | |
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract. | |
* Use along with {totalSupply} to enumerate all tokens. | |
*/ | |
function tokenByIndex(uint256 index) external view returns (uint256); | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) | |
pragma solidity ^0.8.0; | |
import "../IERC721Upgradeable.sol"; | |
/** | |
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension | |
* @dev See https://eips.ethereum.org/EIPS/eip-721 | |
*/ | |
interface IERC721MetadataUpgradeable is IERC721Upgradeable { | |
/** | |
* @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.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 IERC721ReceiverUpgradeable { | |
/** | |
* @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.8.0) (token/ERC721/IERC721.sol) | |
pragma solidity ^0.8.0; | |
import "../../utils/introspection/IERC165Upgradeable.sol"; | |
/** | |
* @dev Required interface of an ERC721 compliant contract. | |
*/ | |
interface IERC721Upgradeable is IERC165Upgradeable { | |
/** | |
* @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.8.0) (utils/Address.sol) | |
pragma solidity ^0.8.1; | |
/** | |
* @dev Collection of functions related to the address type | |
*/ | |
library AddressUpgradeable { | |
/** | |
* @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 | |
* ==== | |
* | |
* [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://diligence.consensys.net/posts/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.5.11/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 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); | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol) | |
pragma solidity ^0.8.0; | |
import "../proxy/utils/Initializable.sol"; | |
/** | |
* @dev Provides information about the current execution context, including the | |
* sender of the transaction and its data. While these are generally available | |
* via msg.sender and msg.data, they should not be accessed in such a direct | |
* manner, since when dealing with meta-transactions the account sending and | |
* paying for execution may not be the actual sender (as far as an application | |
* is concerned). | |
* | |
* This contract is only required for intermediate, library-like contracts. | |
*/ | |
abstract contract ContextUpgradeable is Initializable { | |
function __Context_init() internal onlyInitializing { | |
} | |
function __Context_init_unchained() internal onlyInitializing { | |
} | |
function _msgSender() internal view virtual returns (address) { | |
return msg.sender; | |
} | |
function _msgData() internal view virtual returns (bytes calldata) { | |
return msg.data; | |
} | |
/** | |
* @dev This empty reserved space is put in place to allow future versions to add new | |
* variables without shifting down storage in the inheritance chain. | |
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps | |
*/ | |
uint256[50] private __gap; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) | |
pragma solidity ^0.8.0; | |
import "./IERC165Upgradeable.sol"; | |
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { | |
function __ERC165_init() internal onlyInitializing { | |
} | |
function __ERC165_init_unchained() internal onlyInitializing { | |
} | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { | |
return interfaceId == type(IERC165Upgradeable).interfaceId; | |
} | |
/** | |
* @dev This empty reserved space is put in place to allow future versions to add new | |
* variables without shifting down storage in the inheritance chain. | |
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps | |
*/ | |
uint256[50] private __gap; | |
} |
// 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 IERC165Upgradeable { | |
/** | |
* @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.8.0) (utils/math/Math.sol) | |
pragma solidity ^0.8.0; | |
/** | |
* @dev Standard math utilities missing in the Solidity language. | |
*/ | |
library MathUpgradeable { | |
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) { | |
return prod0 / denominator; | |
} | |
// Make sure the result is less than 2^256. Also prevents denominator == 0. | |
require(denominator > prod1); | |
/////////////////////////////////////////////// | |
// 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 10, 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 * 8) < value ? 1 : 0); | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) | |
pragma solidity ^0.8.0; | |
import "./math/MathUpgradeable.sol"; | |
/** | |
* @dev String operations. | |
*/ | |
library StringsUpgradeable { | |
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 = MathUpgradeable.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 `uint256` to its ASCII `string` hexadecimal representation. | |
*/ | |
function toHexString(uint256 value) internal pure returns (string memory) { | |
unchecked { | |
return toHexString(value, MathUpgradeable.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); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) | |
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. | |
pragma solidity ^0.8.0; | |
/** | |
* @dev Library for managing | |
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive | |
* types. | |
* | |
* Sets have the following properties: | |
* | |
* - Elements are added, removed, and checked for existence in constant time | |
* (O(1)). | |
* - Elements are enumerated in O(n). No guarantees are made on the ordering. | |
* | |
* ``` | |
* contract Example { | |
* // Add the library methods | |
* using EnumerableSet for EnumerableSet.AddressSet; | |
* | |
* // Declare a set state variable | |
* EnumerableSet.AddressSet private mySet; | |
* } | |
* ``` | |
* | |
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) | |
* and `uint256` (`UintSet`) are supported. | |
* | |
* [WARNING] | |
* ==== | |
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure | |
* unusable. | |
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. | |
* | |
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an | |
* array of EnumerableSet. | |
* ==== | |
*/ | |
library EnumerableSetUpgradeable { | |
// To implement this library for multiple types with as little code | |
// repetition as possible, we write it in terms of a generic Set type with | |
// bytes32 values. | |
// The Set implementation uses private functions, and user-facing | |
// implementations (such as AddressSet) are just wrappers around the | |
// underlying Set. | |
// This means that we can only create new EnumerableSets for types that fit | |
// in bytes32. | |
struct Set { | |
// Storage of set values | |
bytes32[] _values; | |
// Position of the value in the `values` array, plus 1 because index 0 | |
// means a value is not in the set. | |
mapping(bytes32 => uint256) _indexes; | |
} | |
/** | |
* @dev Add a value to a set. O(1). | |
* | |
* Returns true if the value was added to the set, that is if it was not | |
* already present. | |
*/ | |
function _add(Set storage set, bytes32 value) private returns (bool) { | |
if (!_contains(set, value)) { | |
set._values.push(value); | |
// The value is stored at length-1, but we add 1 to all indexes | |
// and use 0 as a sentinel value | |
set._indexes[value] = set._values.length; | |
return true; | |
} else { | |
return false; | |
} | |
} | |
/** | |
* @dev Removes a value from a set. O(1). | |
* | |
* Returns true if the value was removed from the set, that is if it was | |
* present. | |
*/ | |
function _remove(Set storage set, bytes32 value) private returns (bool) { | |
// We read and store the value's index to prevent multiple reads from the same storage slot | |
uint256 valueIndex = set._indexes[value]; | |
if (valueIndex != 0) { | |
// Equivalent to contains(set, value) | |
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in | |
// the array, and then remove the last element (sometimes called as 'swap and pop'). | |
// This modifies the order of the array, as noted in {at}. | |
uint256 toDeleteIndex = valueIndex - 1; | |
uint256 lastIndex = set._values.length - 1; | |
if (lastIndex != toDeleteIndex) { | |
bytes32 lastValue = set._values[lastIndex]; | |
// Move the last value to the index where the value to delete is | |
set._values[toDeleteIndex] = lastValue; | |
// Update the index for the moved value | |
set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex | |
} | |
// Delete the slot where the moved value was stored | |
set._values.pop(); | |
// Delete the index for the deleted slot | |
delete set._indexes[value]; | |
return true; | |
} else { | |
return false; | |
} | |
} | |
/** | |
* @dev Returns true if the value is in the set. O(1). | |
*/ | |
function _contains(Set storage set, bytes32 value) private view returns (bool) { | |
return set._indexes[value] != 0; | |
} | |
/** | |
* @dev Returns the number of values on the set. O(1). | |
*/ | |
function _length(Set storage set) private view returns (uint256) { | |
return set._values.length; | |
} | |
/** | |
* @dev Returns the value stored at position `index` in the set. O(1). | |
* | |
* Note that there are no guarantees on the ordering of values inside the | |
* array, and it may change when more values are added or removed. | |
* | |
* Requirements: | |
* | |
* - `index` must be strictly less than {length}. | |
*/ | |
function _at(Set storage set, uint256 index) private view returns (bytes32) { | |
return set._values[index]; | |
} | |
/** | |
* @dev Return the entire set in an array | |
* | |
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed | |
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that | |
* this function has an unbounded cost, and using it as part of a state-changing function may render the function | |
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. | |
*/ | |
function _values(Set storage set) private view returns (bytes32[] memory) { | |
return set._values; | |
} | |
// Bytes32Set | |
struct Bytes32Set { | |
Set _inner; | |
} | |
/** | |
* @dev Add a value to a set. O(1). | |
* | |
* Returns true if the value was added to the set, that is if it was not | |
* already present. | |
*/ | |
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { | |
return _add(set._inner, value); | |
} | |
/** | |
* @dev Removes a value from a set. O(1). | |
* | |
* Returns true if the value was removed from the set, that is if it was | |
* present. | |
*/ | |
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { | |
return _remove(set._inner, value); | |
} | |
/** | |
* @dev Returns true if the value is in the set. O(1). | |
*/ | |
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { | |
return _contains(set._inner, value); | |
} | |
/** | |
* @dev Returns the number of values in the set. O(1). | |
*/ | |
function length(Bytes32Set storage set) internal view returns (uint256) { | |
return _length(set._inner); | |
} | |
/** | |
* @dev Returns the value stored at position `index` in the set. O(1). | |
* | |
* Note that there are no guarantees on the ordering of values inside the | |
* array, and it may change when more values are added or removed. | |
* | |
* Requirements: | |
* | |
* - `index` must be strictly less than {length}. | |
*/ | |
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { | |
return _at(set._inner, index); | |
} | |
/** | |
* @dev Return the entire set in an array | |
* | |
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed | |
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that | |
* this function has an unbounded cost, and using it as part of a state-changing function may render the function | |
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. | |
*/ | |
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { | |
bytes32[] memory store = _values(set._inner); | |
bytes32[] memory result; | |
/// @solidity memory-safe-assembly | |
assembly { | |
result := store | |
} | |
return result; | |
} | |
// AddressSet | |
struct AddressSet { | |
Set _inner; | |
} | |
/** | |
* @dev Add a value to a set. O(1). | |
* | |
* Returns true if the value was added to the set, that is if it was not | |
* already present. | |
*/ | |
function add(AddressSet storage set, address value) internal returns (bool) { | |
return _add(set._inner, bytes32(uint256(uint160(value)))); | |
} | |
/** | |
* @dev Removes a value from a set. O(1). | |
* | |
* Returns true if the value was removed from the set, that is if it was | |
* present. | |
*/ | |
function remove(AddressSet storage set, address value) internal returns (bool) { | |
return _remove(set._inner, bytes32(uint256(uint160(value)))); | |
} | |
/** | |
* @dev Returns true if the value is in the set. O(1). | |
*/ | |
function contains(AddressSet storage set, address value) internal view returns (bool) { | |
return _contains(set._inner, bytes32(uint256(uint160(value)))); | |
} | |
/** | |
* @dev Returns the number of values in the set. O(1). | |
*/ | |
function length(AddressSet storage set) internal view returns (uint256) { | |
return _length(set._inner); | |
} | |
/** | |
* @dev Returns the value stored at position `index` in the set. O(1). | |
* | |
* Note that there are no guarantees on the ordering of values inside the | |
* array, and it may change when more values are added or removed. | |
* | |
* Requirements: | |
* | |
* - `index` must be strictly less than {length}. | |
*/ | |
function at(AddressSet storage set, uint256 index) internal view returns (address) { | |
return address(uint160(uint256(_at(set._inner, index)))); | |
} | |
/** | |
* @dev Return the entire set in an array | |
* | |
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed | |
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that | |
* this function has an unbounded cost, and using it as part of a state-changing function may render the function | |
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. | |
*/ | |
function values(AddressSet storage set) internal view returns (address[] memory) { | |
bytes32[] memory store = _values(set._inner); | |
address[] memory result; | |
/// @solidity memory-safe-assembly | |
assembly { | |
result := store | |
} | |
return result; | |
} | |
// UintSet | |
struct UintSet { | |
Set _inner; | |
} | |
/** | |
* @dev Add a value to a set. O(1). | |
* | |
* Returns true if the value was added to the set, that is if it was not | |
* already present. | |
*/ | |
function add(UintSet storage set, uint256 value) internal returns (bool) { | |
return _add(set._inner, bytes32(value)); | |
} | |
/** | |
* @dev Removes a value from a set. O(1). | |
* | |
* Returns true if the value was removed from the set, that is if it was | |
* present. | |
*/ | |
function remove(UintSet storage set, uint256 value) internal returns (bool) { | |
return _remove(set._inner, bytes32(value)); | |
} | |
/** | |
* @dev Returns true if the value is in the set. O(1). | |
*/ | |
function contains(UintSet storage set, uint256 value) internal view returns (bool) { | |
return _contains(set._inner, bytes32(value)); | |
} | |
/** | |
* @dev Returns the number of values in the set. O(1). | |
*/ | |
function length(UintSet storage set) internal view returns (uint256) { | |
return _length(set._inner); | |
} | |
/** | |
* @dev Returns the value stored at position `index` in the set. O(1). | |
* | |
* Note that there are no guarantees on the ordering of values inside the | |
* array, and it may change when more values are added or removed. | |
* | |
* Requirements: | |
* | |
* - `index` must be strictly less than {length}. | |
*/ | |
function at(UintSet storage set, uint256 index) internal view returns (uint256) { | |
return uint256(_at(set._inner, index)); | |
} | |
/** | |
* @dev Return the entire set in an array | |
* | |
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed | |
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that | |
* this function has an unbounded cost, and using it as part of a state-changing function may render the function | |
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. | |
*/ | |
function values(UintSet storage set) internal view returns (uint256[] memory) { | |
bytes32[] memory store = _values(set._inner); | |
uint256[] memory result; | |
/// @solidity memory-safe-assembly | |
assembly { | |
result := store | |
} | |
return result; | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) | |
pragma solidity ^0.8.0; | |
import "./IAccessControl.sol"; | |
import "../utils/Context.sol"; | |
import "../utils/Strings.sol"; | |
import "../utils/introspection/ERC165.sol"; | |
/** | |
* @dev Contract module that allows children to implement role-based access | |
* control mechanisms. This is a lightweight version that doesn't allow enumerating role | |
* members except through off-chain means by accessing the contract event logs. Some | |
* applications may benefit from on-chain enumerability, for those cases see | |
* {AccessControlEnumerable}. | |
* | |
* Roles are referred to by their `bytes32` identifier. These should be exposed | |
* in the external API and be unique. The best way to achieve this is by | |
* using `public constant` hash digests: | |
* | |
* ``` | |
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); | |
* ``` | |
* | |
* Roles can be used to represent a set of permissions. To restrict access to a | |
* function call, use {hasRole}: | |
* | |
* ``` | |
* function foo() public { | |
* require(hasRole(MY_ROLE, msg.sender)); | |
* ... | |
* } | |
* ``` | |
* | |
* Roles can be granted and revoked dynamically via the {grantRole} and | |
* {revokeRole} functions. Each role has an associated admin role, and only | |
* accounts that have a role's admin role can call {grantRole} and {revokeRole}. | |
* | |
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means | |
* that only accounts with this role will be able to grant or revoke other | |
* roles. More complex role relationships can be created by using | |
* {_setRoleAdmin}. | |
* | |
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to | |
* grant and revoke this role. Extra precautions should be taken to secure | |
* accounts that have been granted it. | |
*/ | |
abstract contract AccessControl is Context, IAccessControl, ERC165 { | |
struct RoleData { | |
mapping(address => bool) members; | |
bytes32 adminRole; | |
} | |
mapping(bytes32 => RoleData) private _roles; | |
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; | |
/** | |
* @dev Modifier that checks that an account has a specific role. Reverts | |
* with a standardized message including the required role. | |
* | |
* The format of the revert reason is given by the following regular expression: | |
* | |
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ | |
* | |
* _Available since v4.1._ | |
*/ | |
modifier onlyRole(bytes32 role) { | |
_checkRole(role); | |
_; | |
} | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { | |
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); | |
} | |
/** | |
* @dev Returns `true` if `account` has been granted `role`. | |
*/ | |
function hasRole(bytes32 role, address account) public view virtual override returns (bool) { | |
return _roles[role].members[account]; | |
} | |
/** | |
* @dev Revert with a standard message if `_msgSender()` is missing `role`. | |
* Overriding this function changes the behavior of the {onlyRole} modifier. | |
* | |
* Format of the revert message is described in {_checkRole}. | |
* | |
* _Available since v4.6._ | |
*/ | |
function _checkRole(bytes32 role) internal view virtual { | |
_checkRole(role, _msgSender()); | |
} | |
/** | |
* @dev Revert with a standard message if `account` is missing `role`. | |
* | |
* The format of the revert reason is given by the following regular expression: | |
* | |
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ | |
*/ | |
function _checkRole(bytes32 role, address account) internal view virtual { | |
if (!hasRole(role, account)) { | |
revert( | |
string( | |
abi.encodePacked( | |
"AccessControl: account ", | |
Strings.toHexString(account), | |
" is missing role ", | |
Strings.toHexString(uint256(role), 32) | |
) | |
) | |
); | |
} | |
} | |
/** | |
* @dev Returns the admin role that controls `role`. See {grantRole} and | |
* {revokeRole}. | |
* | |
* To change a role's admin, use {_setRoleAdmin}. | |
*/ | |
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { | |
return _roles[role].adminRole; | |
} | |
/** | |
* @dev Grants `role` to `account`. | |
* | |
* If `account` had not been already granted `role`, emits a {RoleGranted} | |
* event. | |
* | |
* Requirements: | |
* | |
* - the caller must have ``role``'s admin role. | |
* | |
* May emit a {RoleGranted} event. | |
*/ | |
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { | |
_grantRole(role, account); | |
} | |
/** | |
* @dev Revokes `role` from `account`. | |
* | |
* If `account` had been granted `role`, emits a {RoleRevoked} event. | |
* | |
* Requirements: | |
* | |
* - the caller must have ``role``'s admin role. | |
* | |
* May emit a {RoleRevoked} event. | |
*/ | |
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { | |
_revokeRole(role, account); | |
} | |
/** | |
* @dev Revokes `role` from the calling account. | |
* | |
* Roles are often managed via {grantRole} and {revokeRole}: this function's | |
* purpose is to provide a mechanism for accounts to lose their privileges | |
* if they are compromised (such as when a trusted device is misplaced). | |
* | |
* If the calling account had been revoked `role`, emits a {RoleRevoked} | |
* event. | |
* | |
* Requirements: | |
* | |
* - the caller must be `account`. | |
* | |
* May emit a {RoleRevoked} event. | |
*/ | |
function renounceRole(bytes32 role, address account) public virtual override { | |
require(account == _msgSender(), "AccessControl: can only renounce roles for self"); | |
_revokeRole(role, account); | |
} | |
/** | |
* @dev Grants `role` to `account`. | |
* | |
* If `account` had not been already granted `role`, emits a {RoleGranted} | |
* event. Note that unlike {grantRole}, this function doesn't perform any | |
* checks on the calling account. | |
* | |
* May emit a {RoleGranted} event. | |
* | |
* [WARNING] | |
* ==== | |
* This function should only be called from the constructor when setting | |
* up the initial roles for the system. | |
* | |
* Using this function in any other way is effectively circumventing the admin | |
* system imposed by {AccessControl}. | |
* ==== | |
* | |
* NOTE: This function is deprecated in favor of {_grantRole}. | |
*/ | |
function _setupRole(bytes32 role, address account) internal virtual { | |
_grantRole(role, account); | |
} | |
/** | |
* @dev Sets `adminRole` as ``role``'s admin role. | |
* | |
* Emits a {RoleAdminChanged} event. | |
*/ | |
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { | |
bytes32 previousAdminRole = getRoleAdmin(role); | |
_roles[role].adminRole = adminRole; | |
emit RoleAdminChanged(role, previousAdminRole, adminRole); | |
} | |
/** | |
* @dev Grants `role` to `account`. | |
* | |
* Internal function without access restriction. | |
* | |
* May emit a {RoleGranted} event. | |
*/ | |
function _grantRole(bytes32 role, address account) internal virtual { | |
if (!hasRole(role, account)) { | |
_roles[role].members[account] = true; | |
emit RoleGranted(role, account, _msgSender()); | |
} | |
} | |
/** | |
* @dev Revokes `role` from `account`. | |
* | |
* Internal function without access restriction. | |
* | |
* May emit a {RoleRevoked} event. | |
*/ | |
function _revokeRole(bytes32 role, address account) internal virtual { | |
if (hasRole(role, account)) { | |
_roles[role].members[account] = false; | |
emit RoleRevoked(role, account, _msgSender()); | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) | |
pragma solidity ^0.8.0; | |
import "./IAccessControlEnumerable.sol"; | |
import "./AccessControl.sol"; | |
import "../utils/structs/EnumerableSet.sol"; | |
/** | |
* @dev Extension of {AccessControl} that allows enumerating the members of each role. | |
*/ | |
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { | |
using EnumerableSet for EnumerableSet.AddressSet; | |
mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { | |
return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); | |
} | |
/** | |
* @dev Returns one of the accounts that have `role`. `index` must be a | |
* value between 0 and {getRoleMemberCount}, non-inclusive. | |
* | |
* Role bearers are not sorted in any particular way, and their ordering may | |
* change at any point. | |
* | |
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure | |
* you perform all queries on the same block. See the following | |
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] | |
* for more information. | |
*/ | |
function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { | |
return _roleMembers[role].at(index); | |
} | |
/** | |
* @dev Returns the number of accounts that have `role`. Can be used | |
* together with {getRoleMember} to enumerate all bearers of a role. | |
*/ | |
function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { | |
return _roleMembers[role].length(); | |
} | |
/** | |
* @dev Overload {_grantRole} to track enumerable memberships | |
*/ | |
function _grantRole(bytes32 role, address account) internal virtual override { | |
super._grantRole(role, account); | |
_roleMembers[role].add(account); | |
} | |
/** | |
* @dev Overload {_revokeRole} to track enumerable memberships | |
*/ | |
function _revokeRole(bytes32 role, address account) internal virtual override { | |
super._revokeRole(role, account); | |
_roleMembers[role].remove(account); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) | |
pragma solidity ^0.8.0; | |
/** | |
* @dev External interface of AccessControl declared to support ERC165 detection. | |
*/ | |
interface IAccessControl { | |
/** | |
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` | |
* | |
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite | |
* {RoleAdminChanged} not being emitted signaling this. | |
* | |
* _Available since v3.1._ | |
*/ | |
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); | |
/** | |
* @dev Emitted when `account` is granted `role`. | |
* | |
* `sender` is the account that originated the contract call, an admin role | |
* bearer except when using {AccessControl-_setupRole}. | |
*/ | |
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); | |
/** | |
* @dev Emitted when `account` is revoked `role`. | |
* | |
* `sender` is the account that originated the contract call: | |
* - if using `revokeRole`, it is the admin role bearer | |
* - if using `renounceRole`, it is the role bearer (i.e. `account`) | |
*/ | |
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); | |
/** | |
* @dev Returns `true` if `account` has been granted `role`. | |
*/ | |
function hasRole(bytes32 role, address account) external view returns (bool); | |
/** | |
* @dev Returns the admin role that controls `role`. See {grantRole} and | |
* {revokeRole}. | |
* | |
* To change a role's admin, use {AccessControl-_setRoleAdmin}. | |
*/ | |
function getRoleAdmin(bytes32 role) external view returns (bytes32); | |
/** | |
* @dev Grants `role` to `account`. | |
* | |
* If `account` had not been already granted `role`, emits a {RoleGranted} | |
* event. | |
* | |
* Requirements: | |
* | |
* - the caller must have ``role``'s admin role. | |
*/ | |
function grantRole(bytes32 role, address account) external; | |
/** | |
* @dev Revokes `role` from `account`. | |
* | |
* If `account` had been granted `role`, emits a {RoleRevoked} event. | |
* | |
* Requirements: | |
* | |
* - the caller must have ``role``'s admin role. | |
*/ | |
function revokeRole(bytes32 role, address account) external; | |
/** | |
* @dev Revokes `role` from the calling account. | |
* | |
* Roles are often managed via {grantRole} and {revokeRole}: this function's | |
* purpose is to provide a mechanism for accounts to lose their privileges | |
* if they are compromised (such as when a trusted device is misplaced). | |
* | |
* If the calling account had been granted `role`, emits a {RoleRevoked} | |
* event. | |
* | |
* Requirements: | |
* | |
* - the caller must be `account`. | |
*/ | |
function renounceRole(bytes32 role, address account) external; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) | |
pragma solidity ^0.8.0; | |
import "./IAccessControl.sol"; | |
/** | |
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection. | |
*/ | |
interface IAccessControlEnumerable is IAccessControl { | |
/** | |
* @dev Returns one of the accounts that have `role`. `index` must be a | |
* value between 0 and {getRoleMemberCount}, non-inclusive. | |
* | |
* Role bearers are not sorted in any particular way, and their ordering may | |
* change at any point. | |
* | |
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure | |
* you perform all queries on the same block. See the following | |
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] | |
* for more information. | |
*/ | |
function getRoleMember(bytes32 role, uint256 index) external view returns (address); | |
/** | |
* @dev Returns the number of accounts that have `role`. Can be used | |
* together with {getRoleMember} to enumerate all bearers of a role. | |
*/ | |
function getRoleMemberCount(bytes32 role) external view returns (uint256); | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. | |
* | |
* By default, the owner account will be the one that deploys the contract. This | |
* can later be changed with {transferOwnership}. | |
* | |
* This module is used through inheritance. It will make available the modifier | |
* `onlyOwner`, which can be applied to your functions to restrict their use to | |
* the owner. | |
*/ | |
abstract contract Ownable is Context { | |
address private _owner; | |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | |
/** | |
* @dev Initializes the contract setting the deployer as the initial owner. | |
*/ | |
constructor() { | |
_transferOwnership(_msgSender()); | |
} | |
/** | |
* @dev Throws if called by any account other than the owner. | |
*/ | |
modifier onlyOwner() { | |
_checkOwner(); | |
_; | |
} | |
/** | |
* @dev Returns the address of the current owner. | |
*/ | |
function owner() public view virtual returns (address) { | |
return _owner; | |
} | |
/** | |
* @dev Throws if the sender is not the owner. | |
*/ | |
function _checkOwner() internal view virtual { | |
require(owner() == _msgSender(), "Ownable: caller is not the owner"); | |
} | |
/** | |
* @dev Leaves the contract without owner. It will not be possible to call | |
* `onlyOwner` functions anymore. Can only be called by the current owner. | |
* | |
* NOTE: Renouncing ownership will leave the contract without an owner, | |
* thereby removing any functionality that is only available to the owner. | |
*/ | |
function renounceOwnership() public virtual onlyOwner { | |
_transferOwnership(address(0)); | |
} | |
/** | |
* @dev Transfers ownership of the contract to a new account (`newOwner`). | |
* Can only be called by the current owner. | |
*/ | |
function transferOwnership(address newOwner) public virtual onlyOwner { | |
require(newOwner != address(0), "Ownable: new owner is the zero address"); | |
_transferOwnership(newOwner); | |
} | |
/** | |
* @dev Transfers ownership of the contract to a new account (`newOwner`). | |
* Internal function without access restriction. | |
*/ | |
function _transferOwnership(address newOwner) internal virtual { | |
address oldOwner = _owner; | |
_owner = newOwner; | |
emit OwnershipTransferred(oldOwner, newOwner); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) | |
pragma solidity ^0.8.0; | |
import "../utils/introspection/IERC165.sol"; | |
/** | |
* @dev Interface for the NFT Royalty Standard. | |
* | |
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal | |
* support for royalty payments across all NFT marketplaces and ecosystem participants. | |
* | |
* _Available since v4.5._ | |
*/ | |
interface IERC2981 is IERC165 { | |
/** | |
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of | |
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange. | |
*/ | |
function royaltyInfo(uint256 tokenId, uint256 salePrice) | |
external | |
view | |
returns (address receiver, uint256 royaltyAmount); | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol) | |
pragma solidity ^0.8.0; | |
/** | |
* @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for | |
* deploying minimal proxy contracts, also known as "clones". | |
* | |
* > To simply and cheaply clone contract functionality in an immutable way, this standard specifies | |
* > a minimal bytecode implementation that delegates all calls to a known, fixed address. | |
* | |
* The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` | |
* (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the | |
* deterministic method. | |
* | |
* _Available since v3.4._ | |
*/ | |
library Clones { | |
/** | |
* @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. | |
* | |
* This function uses the create opcode, which should never revert. | |
*/ | |
function clone(address implementation) internal returns (address instance) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
// Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes | |
// of the `implementation` address with the bytecode before the address. | |
mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) | |
// Packs the remaining 17 bytes of `implementation` with the bytecode after the address. | |
mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) | |
instance := create(0, 0x09, 0x37) | |
} | |
require(instance != address(0), "ERC1167: create failed"); | |
} | |
/** | |
* @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. | |
* | |
* This function uses the create2 opcode and a `salt` to deterministically deploy | |
* the clone. Using the same `implementation` and `salt` multiple time will revert, since | |
* the clones cannot be deployed twice at the same address. | |
*/ | |
function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
// Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes | |
// of the `implementation` address with the bytecode before the address. | |
mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) | |
// Packs the remaining 17 bytes of `implementation` with the bytecode after the address. | |
mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) | |
instance := create2(0, 0x09, 0x37, salt) | |
} | |
require(instance != address(0), "ERC1167: create2 failed"); | |
} | |
/** | |
* @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. | |
*/ | |
function predictDeterministicAddress( | |
address implementation, | |
bytes32 salt, | |
address deployer | |
) internal pure returns (address predicted) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
let ptr := mload(0x40) | |
mstore(add(ptr, 0x38), deployer) | |
mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) | |
mstore(add(ptr, 0x14), implementation) | |
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) | |
mstore(add(ptr, 0x58), salt) | |
mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) | |
predicted := keccak256(add(ptr, 0x43), 0x55) | |
} | |
} | |
/** | |
* @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. | |
*/ | |
function predictDeterministicAddress( | |
address implementation, | |
bytes32 salt | |
) internal view returns (address predicted) { | |
return predictDeterministicAddress(implementation, salt, address(this)); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which allows children to implement an emergency stop | |
* mechanism that can be triggered by an authorized account. | |
* | |
* This module is used through inheritance. It will make available the | |
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to | |
* the functions of your contract. Note that they will not be pausable by | |
* simply including this module, only once the modifiers are put in place. | |
*/ | |
abstract contract Pausable is Context { | |
/** | |
* @dev Emitted when the pause is triggered by `account`. | |
*/ | |
event Paused(address account); | |
/** | |
* @dev Emitted when the pause is lifted by `account`. | |
*/ | |
event Unpaused(address account); | |
bool private _paused; | |
/** | |
* @dev Initializes the contract in unpaused state. | |
*/ | |
constructor() { | |
_paused = false; | |
} | |
/** | |
* @dev Modifier to make a function callable only when the contract is not paused. | |
* | |
* Requirements: | |
* | |
* - The contract must not be paused. | |
*/ | |
modifier whenNotPaused() { | |
_requireNotPaused(); | |
_; | |
} | |
/** | |
* @dev Modifier to make a function callable only when the contract is paused. | |
* | |
* Requirements: | |
* | |
* - The contract must be paused. | |
*/ | |
modifier whenPaused() { | |
_requirePaused(); | |
_; | |
} | |
/** | |
* @dev Returns true if the contract is paused, and false otherwise. | |
*/ | |
function paused() public view virtual returns (bool) { | |
return _paused; | |
} | |
/** | |
* @dev Throws if the contract is paused. | |
*/ | |
function _requireNotPaused() internal view virtual { | |
require(!paused(), "Pausable: paused"); | |
} | |
/** | |
* @dev Throws if the contract is not paused. | |
*/ | |
function _requirePaused() internal view virtual { | |
require(paused(), "Pausable: not paused"); | |
} | |
/** | |
* @dev Triggers stopped state. | |
* | |
* Requirements: | |
* | |
* - The contract must not be paused. | |
*/ | |
function _pause() internal virtual whenNotPaused { | |
_paused = true; | |
emit Paused(_msgSender()); | |
} | |
/** | |
* @dev Returns to normal state. | |
* | |
* Requirements: | |
* | |
* - The contract must be paused. | |
*/ | |
function _unpause() internal virtual whenPaused { | |
_paused = false; | |
emit Unpaused(_msgSender()); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) | |
pragma solidity ^0.8.0; | |
/** | |
* @dev Contract module that helps prevent reentrant calls to a function. | |
* | |
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier | |
* available, which can be applied to functions to make sure there are no nested | |
* (reentrant) calls to them. | |
* | |
* Note that because there is a single `nonReentrant` guard, functions marked as | |
* `nonReentrant` may not call one another. This can be worked around by making | |
* those functions `private`, and then adding `external` `nonReentrant` entry | |
* points to them. | |
* | |
* TIP: If you would like to learn more about reentrancy and alternative ways | |
* to protect against it, check out our blog post | |
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. | |
*/ | |
abstract contract ReentrancyGuard { | |
// Booleans are more expensive than uint256 or any type that takes up a full | |
// word because each write operation emits an extra SLOAD to first read the | |
// slot's contents, replace the bits taken up by the boolean, and then write | |
// back. This is the compiler's defense against contract upgrades and | |
// pointer aliasing, and it cannot be disabled. | |
// The values being non-zero value makes deployment a bit more expensive, | |
// but in exchange the refund on every call to nonReentrant will be lower in | |
// amount. Since refunds are capped to a percentage of the total | |
// transaction's gas, it is best to keep them low in cases like this one, to | |
// increase the likelihood of the full refund coming into effect. | |
uint256 private constant _NOT_ENTERED = 1; | |
uint256 private constant _ENTERED = 2; | |
uint256 private _status; | |
constructor() { | |
_status = _NOT_ENTERED; | |
} | |
/** | |
* @dev Prevents a contract from calling itself, directly or indirectly. | |
* Calling a `nonReentrant` function from another `nonReentrant` | |
* function is not supported. It is possible to prevent this from happening | |
* by making the `nonReentrant` function external, and making it call a | |
* `private` function that does the actual work. | |
*/ | |
modifier nonReentrant() { | |
_nonReentrantBefore(); | |
_; | |
_nonReentrantAfter(); | |
} | |
function _nonReentrantBefore() private { | |
// On the first call to nonReentrant, _status will be _NOT_ENTERED | |
require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); | |
// Any calls to nonReentrant after this point will fail | |
_status = _ENTERED; | |
} | |
function _nonReentrantAfter() private { | |
// By storing the original value once again, a refund is triggered (see | |
// https://eips.ethereum.org/EIPS/eip-2200) | |
_status = _NOT_ENTERED; | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) | |
pragma solidity ^0.8.0; | |
import "./IERC1155.sol"; | |
import "./IERC1155Receiver.sol"; | |
import "./extensions/IERC1155MetadataURI.sol"; | |
import "../../utils/Address.sol"; | |
import "../../utils/Context.sol"; | |
import "../../utils/introspection/ERC165.sol"; | |
/** | |
* @dev Implementation of the basic standard multi-token. | |
* See https://eips.ethereum.org/EIPS/eip-1155 | |
* Originally based on code by Enjin: https://github.com/enjin/erc-1155 | |
* | |
* _Available since v3.1._ | |
*/ | |
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { | |
using Address for address; | |
// Mapping from token ID to account balances | |
mapping(uint256 => mapping(address => uint256)) private _balances; | |
// Mapping from account to operator approvals | |
mapping(address => mapping(address => bool)) private _operatorApprovals; | |
// Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json | |
string private _uri; | |
/** | |
* @dev See {_setURI}. | |
*/ | |
constructor(string memory uri_) { | |
_setURI(uri_); | |
} | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { | |
return | |
interfaceId == type(IERC1155).interfaceId || | |
interfaceId == type(IERC1155MetadataURI).interfaceId || | |
super.supportsInterface(interfaceId); | |
} | |
/** | |
* @dev See {IERC1155MetadataURI-uri}. | |
* | |
* This implementation returns the same URI for *all* token types. It relies | |
* on the token type ID substitution mechanism | |
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. | |
* | |
* Clients calling this function must replace the `\{id\}` substring with the | |
* actual token type ID. | |
*/ | |
function uri(uint256) public view virtual override returns (string memory) { | |
return _uri; | |
} | |
/** | |
* @dev See {IERC1155-balanceOf}. | |
* | |
* Requirements: | |
* | |
* - `account` cannot be the zero address. | |
*/ | |
function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { | |
require(account != address(0), "ERC1155: address zero is not a valid owner"); | |
return _balances[id][account]; | |
} | |
/** | |
* @dev See {IERC1155-balanceOfBatch}. | |
* | |
* Requirements: | |
* | |
* - `accounts` and `ids` must have the same length. | |
*/ | |
function balanceOfBatch(address[] memory accounts, uint256[] memory ids) | |
public | |
view | |
virtual | |
override | |
returns (uint256[] memory) | |
{ | |
require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); | |
uint256[] memory batchBalances = new uint256[](accounts.length); | |
for (uint256 i = 0; i < accounts.length; ++i) { | |
batchBalances[i] = balanceOf(accounts[i], ids[i]); | |
} | |
return batchBalances; | |
} | |
/** | |
* @dev See {IERC1155-setApprovalForAll}. | |
*/ | |
function setApprovalForAll(address operator, bool approved) public virtual override { | |
_setApprovalForAll(_msgSender(), operator, approved); | |
} | |
/** | |
* @dev See {IERC1155-isApprovedForAll}. | |
*/ | |
function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { | |
return _operatorApprovals[account][operator]; | |
} | |
/** | |
* @dev See {IERC1155-safeTransferFrom}. | |
*/ | |
function safeTransferFrom( | |
address from, | |
address to, | |
uint256 id, | |
uint256 amount, | |
bytes memory data | |
) public virtual override { | |
require( | |
from == _msgSender() || isApprovedForAll(from, _msgSender()), | |
"ERC1155: caller is not token owner or approved" | |
); | |
_safeTransferFrom(from, to, id, amount, data); | |
} | |
/** | |
* @dev See {IERC1155-safeBatchTransferFrom}. | |
*/ | |
function safeBatchTransferFrom( | |
address from, | |
address to, | |
uint256[] memory ids, | |
uint256[] memory amounts, | |
bytes memory data | |
) public virtual override { | |
require( | |
from == _msgSender() || isApprovedForAll(from, _msgSender()), | |
"ERC1155: caller is not token owner or approved" | |
); | |
_safeBatchTransferFrom(from, to, ids, amounts, data); | |
} | |
/** | |
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`. | |
* | |
* Emits a {TransferSingle} event. | |
* | |
* Requirements: | |
* | |
* - `to` cannot be the zero address. | |
* - `from` must have a balance of tokens of type `id` of at least `amount`. | |
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the | |
* acceptance magic value. | |
*/ | |
function _safeTransferFrom( | |
address from, | |
address to, | |
uint256 id, | |
uint256 amount, | |
bytes memory data | |
) internal virtual { | |
require(to != address(0), "ERC1155: transfer to the zero address"); | |
address operator = _msgSender(); | |
uint256[] memory ids = _asSingletonArray(id); | |
uint256[] memory amounts = _asSingletonArray(amount); | |
_beforeTokenTransfer(operator, from, to, ids, amounts, data); | |
uint256 fromBalance = _balances[id][from]; | |
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); | |
unchecked { | |
_balances[id][from] = fromBalance - amount; | |
} | |
_balances[id][to] += amount; | |
emit TransferSingle(operator, from, to, id, amount); | |
_afterTokenTransfer(operator, from, to, ids, amounts, data); | |
_doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); | |
} | |
/** | |
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. | |
* | |
* Emits a {TransferBatch} event. | |
* | |
* Requirements: | |
* | |
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the | |
* acceptance magic value. | |
*/ | |
function _safeBatchTransferFrom( | |
address from, | |
address to, | |
uint256[] memory ids, | |
uint256[] memory amounts, | |
bytes memory data | |
) internal virtual { | |
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); | |
require(to != address(0), "ERC1155: transfer to the zero address"); | |
address operator = _msgSender(); | |
_beforeTokenTransfer(operator, from, to, ids, amounts, data); | |
for (uint256 i = 0; i < ids.length; ++i) { | |
uint256 id = ids[i]; | |
uint256 amount = amounts[i]; | |
uint256 fromBalance = _balances[id][from]; | |
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); | |
unchecked { | |
_balances[id][from] = fromBalance - amount; | |
} | |
_balances[id][to] += amount; | |
} | |
emit TransferBatch(operator, from, to, ids, amounts); | |
_afterTokenTransfer(operator, from, to, ids, amounts, data); | |
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); | |
} | |
/** | |
* @dev Sets a new URI for all token types, by relying on the token type ID | |
* substitution mechanism | |
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. | |
* | |
* By this mechanism, any occurrence of the `\{id\}` substring in either the | |
* URI or any of the amounts in the JSON file at said URI will be replaced by | |
* clients with the token type ID. | |
* | |
* For example, the `https://token-cdn-domain/\{id\}.json` URI would be | |
* interpreted by clients as | |
* `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` | |
* for token type ID 0x4cce0. | |
* | |
* See {uri}. | |
* | |
* Because these URIs cannot be meaningfully represented by the {URI} event, | |
* this function emits no events. | |
*/ | |
function _setURI(string memory newuri) internal virtual { | |
_uri = newuri; | |
} | |
/** | |
* @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. | |
* | |
* Emits a {TransferSingle} event. | |
* | |
* Requirements: | |
* | |
* - `to` cannot be the zero address. | |
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the | |
* acceptance magic value. | |
*/ | |
function _mint( | |
address to, | |
uint256 id, | |
uint256 amount, | |
bytes memory data | |
) internal virtual { | |
require(to != address(0), "ERC1155: mint to the zero address"); | |
address operator = _msgSender(); | |
uint256[] memory ids = _asSingletonArray(id); | |
uint256[] memory amounts = _asSingletonArray(amount); | |
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data); | |
_balances[id][to] += amount; | |
emit TransferSingle(operator, address(0), to, id, amount); | |
_afterTokenTransfer(operator, address(0), to, ids, amounts, data); | |
_doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); | |
} | |
/** | |
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. | |
* | |
* Emits a {TransferBatch} event. | |
* | |
* Requirements: | |
* | |
* - `ids` and `amounts` must have the same length. | |
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the | |
* acceptance magic value. | |
*/ | |
function _mintBatch( | |
address to, | |
uint256[] memory ids, | |
uint256[] memory amounts, | |
bytes memory data | |
) internal virtual { | |
require(to != address(0), "ERC1155: mint to the zero address"); | |
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); | |
address operator = _msgSender(); | |
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data); | |
for (uint256 i = 0; i < ids.length; i++) { | |
_balances[ids[i]][to] += amounts[i]; | |
} | |
emit TransferBatch(operator, address(0), to, ids, amounts); | |
_afterTokenTransfer(operator, address(0), to, ids, amounts, data); | |
_doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); | |
} | |
/** | |
* @dev Destroys `amount` tokens of token type `id` from `from` | |
* | |
* Emits a {TransferSingle} event. | |
* | |
* Requirements: | |
* | |
* - `from` cannot be the zero address. | |
* - `from` must have at least `amount` tokens of token type `id`. | |
*/ | |
function _burn( | |
address from, | |
uint256 id, | |
uint256 amount | |
) internal virtual { | |
require(from != address(0), "ERC1155: burn from the zero address"); | |
address operator = _msgSender(); | |
uint256[] memory ids = _asSingletonArray(id); | |
uint256[] memory amounts = _asSingletonArray(amount); | |
_beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); | |
uint256 fromBalance = _balances[id][from]; | |
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); | |
unchecked { | |
_balances[id][from] = fromBalance - amount; | |
} | |
emit TransferSingle(operator, from, address(0), id, amount); | |
_afterTokenTransfer(operator, from, address(0), ids, amounts, ""); | |
} | |
/** | |
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. | |
* | |
* Emits a {TransferBatch} event. | |
* | |
* Requirements: | |
* | |
* - `ids` and `amounts` must have the same length. | |
*/ | |
function _burnBatch( | |
address from, | |
uint256[] memory ids, | |
uint256[] memory amounts | |
) internal virtual { | |
require(from != address(0), "ERC1155: burn from the zero address"); | |
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); | |
address operator = _msgSender(); | |
_beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); | |
for (uint256 i = 0; i < ids.length; i++) { | |
uint256 id = ids[i]; | |
uint256 amount = amounts[i]; | |
uint256 fromBalance = _balances[id][from]; | |
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); | |
unchecked { | |
_balances[id][from] = fromBalance - amount; | |
} | |
} | |
emit TransferBatch(operator, from, address(0), ids, amounts); | |
_afterTokenTransfer(operator, from, address(0), ids, amounts, ""); | |
} | |
/** | |
* @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, "ERC1155: setting approval status for self"); | |
_operatorApprovals[owner][operator] = approved; | |
emit ApprovalForAll(owner, operator, approved); | |
} | |
/** | |
* @dev Hook that is called before any token transfer. This includes minting | |
* and burning, as well as batched variants. | |
* | |
* The same hook is called on both single and batched variants. For single | |
* transfers, the length of the `ids` and `amounts` arrays will be 1. | |
* | |
* Calling conditions (for each `id` and `amount` pair): | |
* | |
* - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens | |
* of token type `id` will be transferred to `to`. | |
* - When `from` is zero, `amount` tokens of token type `id` will be minted | |
* for `to`. | |
* - when `to` is zero, `amount` of ``from``'s tokens of token type `id` | |
* will be burned. | |
* - `from` and `to` are never both zero. | |
* - `ids` and `amounts` have the same, non-zero length. | |
* | |
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. | |
*/ | |
function _beforeTokenTransfer( | |
address operator, | |
address from, | |
address to, | |
uint256[] memory ids, | |
uint256[] memory amounts, | |
bytes memory data | |
) internal virtual {} | |
/** | |
* @dev Hook that is called after any token transfer. This includes minting | |
* and burning, as well as batched variants. | |
* | |
* The same hook is called on both single and batched variants. For single | |
* transfers, the length of the `id` and `amount` arrays will be 1. | |
* | |
* Calling conditions (for each `id` and `amount` pair): | |
* | |
* - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens | |
* of token type `id` will be transferred to `to`. | |
* - When `from` is zero, `amount` tokens of token type `id` will be minted | |
* for `to`. | |
* - when `to` is zero, `amount` of ``from``'s tokens of token type `id` | |
* will be burned. | |
* - `from` and `to` are never both zero. | |
* - `ids` and `amounts` have the same, non-zero length. | |
* | |
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. | |
*/ | |
function _afterTokenTransfer( | |
address operator, | |
address from, | |
address to, | |
uint256[] memory ids, | |
uint256[] memory amounts, | |
bytes memory data | |
) internal virtual {} | |
function _doSafeTransferAcceptanceCheck( | |
address operator, | |
address from, | |
address to, | |
uint256 id, | |
uint256 amount, | |
bytes memory data | |
) private { | |
if (to.isContract()) { | |
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { | |
if (response != IERC1155Receiver.onERC1155Received.selector) { | |
revert("ERC1155: ERC1155Receiver rejected tokens"); | |
} | |
} catch Error(string memory reason) { | |
revert(reason); | |
} catch { | |
revert("ERC1155: transfer to non-ERC1155Receiver implementer"); | |
} | |
} | |
} | |
function _doSafeBatchTransferAcceptanceCheck( | |
address operator, | |
address from, | |
address to, | |
uint256[] memory ids, | |
uint256[] memory amounts, | |
bytes memory data | |
) private { | |
if (to.isContract()) { | |
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( | |
bytes4 response | |
) { | |
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { | |
revert("ERC1155: ERC1155Receiver rejected tokens"); | |
} | |
} catch Error(string memory reason) { | |
revert(reason); | |
} catch { | |
revert("ERC1155: transfer to non-ERC1155Receiver implementer"); | |
} | |
} | |
} | |
function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { | |
uint256[] memory array = new uint256[](1); | |
array[0] = element; | |
return array; | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) | |
pragma solidity ^0.8.0; | |
import "../ERC1155.sol"; | |
/** | |
* @dev Extension of ERC1155 that adds tracking of total supply per id. | |
* | |
* Useful for scenarios where Fungible and Non-fungible tokens have to be | |
* clearly identified. Note: While a totalSupply of 1 might mean the | |
* corresponding is an NFT, there is no guarantees that no other token with the | |
* same id are not going to be minted. | |
*/ | |
abstract contract ERC1155Supply is ERC1155 { | |
mapping(uint256 => uint256) private _totalSupply; | |
/** | |
* @dev Total amount of tokens in with a given id. | |
*/ | |
function totalSupply(uint256 id) public view virtual returns (uint256) { | |
return _totalSupply[id]; | |
} | |
/** | |
* @dev Indicates whether any token exist with a given id, or not. | |
*/ | |
function exists(uint256 id) public view virtual returns (bool) { | |
return ERC1155Supply.totalSupply(id) > 0; | |
} | |
/** | |
* @dev See {ERC1155-_beforeTokenTransfer}. | |
*/ | |
function _beforeTokenTransfer( | |
address operator, | |
address from, | |
address to, | |
uint256[] memory ids, | |
uint256[] memory amounts, | |
bytes memory data | |
) internal virtual override { | |
super._beforeTokenTransfer(operator, from, to, ids, amounts, data); | |
if (from == address(0)) { | |
for (uint256 i = 0; i < ids.length; ++i) { | |
_totalSupply[ids[i]] += amounts[i]; | |
} | |
} | |
if (to == address(0)) { | |
for (uint256 i = 0; i < ids.length; ++i) { | |
uint256 id = ids[i]; | |
uint256 amount = amounts[i]; | |
uint256 supply = _totalSupply[id]; | |
require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); | |
unchecked { | |
_totalSupply[id] = supply - amount; | |
} | |
} | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) | |
pragma solidity ^0.8.0; | |
import "../../../utils/Strings.sol"; | |
import "../ERC1155.sol"; | |
/** | |
* @dev ERC1155 token with storage based token URI management. | |
* Inspired by the ERC721URIStorage extension | |
* | |
* _Available since v4.6._ | |
*/ | |
abstract contract ERC1155URIStorage is ERC1155 { | |
using Strings for uint256; | |
// Optional base URI | |
string private _baseURI = ""; | |
// Optional mapping for token URIs | |
mapping(uint256 => string) private _tokenURIs; | |
/** | |
* @dev See {IERC1155MetadataURI-uri}. | |
* | |
* This implementation returns the concatenation of the `_baseURI` | |
* and the token-specific uri if the latter is set | |
* | |
* This enables the following behaviors: | |
* | |
* - if `_tokenURIs[tokenId]` is set, then the result is the concatenation | |
* of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI` | |
* is empty per default); | |
* | |
* - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()` | |
* which in most cases will contain `ERC1155._uri`; | |
* | |
* - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a | |
* uri value set, then the result is empty. | |
*/ | |
function uri(uint256 tokenId) public view virtual override returns (string memory) { | |
string memory tokenURI = _tokenURIs[tokenId]; | |
// If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked). | |
return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId); | |
} | |
/** | |
* @dev Sets `tokenURI` as the tokenURI of `tokenId`. | |
*/ | |
function _setURI(uint256 tokenId, string memory tokenURI) internal virtual { | |
_tokenURIs[tokenId] = tokenURI; | |
emit URI(uri(tokenId), tokenId); | |
} | |
/** | |
* @dev Sets `baseURI` as the `_baseURI` for all tokens | |
*/ | |
function _setBaseURI(string memory baseURI) internal virtual { | |
_baseURI = baseURI; | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) | |
pragma solidity ^0.8.0; | |
import "../IERC1155.sol"; | |
/** | |
* @dev Interface of the optional ERC1155MetadataExtension interface, as defined | |
* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. | |
* | |
* _Available since v3.1._ | |
*/ | |
interface IERC1155MetadataURI is IERC1155 { | |
/** | |
* @dev Returns the URI for token type `id`. | |
* | |
* If the `\{id\}` substring is present in the URI, it must be replaced by | |
* clients with the actual token type ID. | |
*/ | |
function uri(uint256 id) external view returns (string memory); | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) | |
pragma solidity ^0.8.0; | |
import "../../utils/introspection/IERC165.sol"; | |
/** | |
* @dev Required interface of an ERC1155 compliant contract, as defined in the | |
* https://eips.ethereum.org/EIPS/eip-1155[EIP]. | |
* | |
* _Available since v3.1._ | |
*/ | |
interface IERC1155 is IERC165 { | |
/** | |
* @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. | |
*/ | |
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); | |
/** | |
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all | |
* transfers. | |
*/ | |
event TransferBatch( | |
address indexed operator, | |
address indexed from, | |
address indexed to, | |
uint256[] ids, | |
uint256[] values | |
); | |
/** | |
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to | |
* `approved`. | |
*/ | |
event ApprovalForAll(address indexed account, address indexed operator, bool approved); | |
/** | |
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. | |
* | |
* If an {URI} event was emitted for `id`, the standard | |
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value | |
* returned by {IERC1155MetadataURI-uri}. | |
*/ | |
event URI(string value, uint256 indexed id); | |
/** | |
* @dev Returns the amount of tokens of token type `id` owned by `account`. | |
* | |
* Requirements: | |
* | |
* - `account` cannot be the zero address. | |
*/ | |
function balanceOf(address account, uint256 id) external view returns (uint256); | |
/** | |
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. | |
* | |
* Requirements: | |
* | |
* - `accounts` and `ids` must have the same length. | |
*/ | |
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) | |
external | |
view | |
returns (uint256[] memory); | |
/** | |
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, | |
* | |
* Emits an {ApprovalForAll} event. | |
* | |
* Requirements: | |
* | |
* - `operator` cannot be the caller. | |
*/ | |
function setApprovalForAll(address operator, bool approved) external; | |
/** | |
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens. | |
* | |
* See {setApprovalForAll}. | |
*/ | |
function isApprovedForAll(address account, address operator) external view returns (bool); | |
/** | |
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`. | |
* | |
* Emits a {TransferSingle} event. | |
* | |
* Requirements: | |
* | |
* - `to` cannot be the zero address. | |
* - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. | |
* - `from` must have a balance of tokens of type `id` of at least `amount`. | |
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the | |
* acceptance magic value. | |
*/ | |
function safeTransferFrom( | |
address from, | |
address to, | |
uint256 id, | |
uint256 amount, | |
bytes calldata data | |
) external; | |
/** | |
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. | |
* | |
* Emits a {TransferBatch} event. | |
* | |
* Requirements: | |
* | |
* - `ids` and `amounts` must have the same length. | |
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the | |
* acceptance magic value. | |
*/ | |
function safeBatchTransferFrom( | |
address from, | |
address to, | |
uint256[] calldata ids, | |
uint256[] calldata amounts, | |
bytes calldata data | |
) external; | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) | |
pragma solidity ^0.8.0; | |
import "../../utils/introspection/IERC165.sol"; | |
/** | |
* @dev _Available since v3.1._ | |
*/ | |
interface IERC1155Receiver is IERC165 { | |
/** | |
* @dev Handles the receipt of a single ERC1155 token type. This function is | |
* called at the end of a `safeTransferFrom` after the balance has been updated. | |
* | |
* NOTE: To accept the transfer, this must return | |
* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` | |
* (i.e. 0xf23a6e61, or its own function selector). | |
* | |
* @param operator The address which initiated the transfer (i.e. msg.sender) | |
* @param from The address which previously owned the token | |
* @param id The ID of the token being transferred | |
* @param value The amount of tokens being transferred | |
* @param data Additional data with no specified format | |
* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed | |
*/ | |
function onERC1155Received( | |
address operator, | |
address from, | |
uint256 id, | |
uint256 value, | |
bytes calldata data | |
) external returns (bytes4); | |
/** | |
* @dev Handles the receipt of a multiple ERC1155 token types. This function | |
* is called at the end of a `safeBatchTransferFrom` after the balances have | |
* been updated. | |
* | |
* NOTE: To accept the transfer(s), this must return | |
* `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` | |
* (i.e. 0xbc197c81, or its own function selector). | |
* | |
* @param operator The address which initiated the batch transfer (i.e. msg.sender) | |
* @param from The address which previously owned the token | |
* @param ids An array containing ids of each token being transferred (order and length must match values array) | |
* @param values An array containing amounts of each token being transferred (order and length must match ids array) | |
* @param data Additional data with no specified format | |
* @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed | |
*/ | |
function onERC1155BatchReceived( | |
address operator, | |
address from, | |
uint256[] calldata ids, | |
uint256[] calldata values, | |
bytes calldata data | |
) external returns (bytes4); | |
} |
// 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.8.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 { | |
if (batchSize > 1) { | |
if (from != address(0)) { | |
_balances[from] -= batchSize; | |
} | |
if (to != address(0)) { | |
_balances[to] += batchSize; | |
} | |
} | |
} | |
/** | |
* @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 {} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) | |
pragma solidity ^0.8.0; | |
import "../ERC721.sol"; | |
import "../../../utils/Context.sol"; | |
/** | |
* @title ERC721 Burnable Token | |
* @dev ERC721 Token that can be burned (destroyed). | |
*/ | |
abstract contract ERC721Burnable is Context, ERC721 { | |
/** | |
* @dev Burns `tokenId`. See {ERC721-_burn}. | |
* | |
* Requirements: | |
* | |
* - The caller must own `tokenId` or be an approved operator. | |
*/ | |
function burn(uint256 tokenId) public virtual { | |
//solhint-disable-next-line max-line-length | |
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); | |
_burn(tokenId); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) | |
pragma solidity ^0.8.0; | |
import "../ERC721.sol"; | |
import "./IERC721Enumerable.sol"; | |
/** | |
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds | |
* enumerability of all the token ids in the contract as well as all token ids owned by each | |
* account. | |
*/ | |
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { | |
// Mapping from owner to list of owned token IDs | |
mapping(address => mapping(uint256 => uint256)) private _ownedTokens; | |
// Mapping from token ID to index of the owner tokens list | |
mapping(uint256 => uint256) private _ownedTokensIndex; | |
// Array with all token ids, used for enumeration | |
uint256[] private _allTokens; | |
// Mapping from token id to position in the allTokens array | |
mapping(uint256 => uint256) private _allTokensIndex; | |
/** | |
* @dev See {IERC165-supportsInterface}. | |
*/ | |
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { | |
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); | |
} | |
/** | |
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. | |
*/ | |
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { | |
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); | |
return _ownedTokens[owner][index]; | |
} | |
/** | |
* @dev See {IERC721Enumerable-totalSupply}. | |
*/ | |
function totalSupply() public view virtual override returns (uint256) { | |
return _allTokens.length; | |
} | |
/** | |
* @dev See {IERC721Enumerable-tokenByIndex}. | |
*/ | |
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { | |
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); | |
return _allTokens[index]; | |
} | |
/** | |
* @dev See {ERC721-_beforeTokenTransfer}. | |
*/ | |
function _beforeTokenTransfer( | |
address from, | |
address to, | |
uint256 firstTokenId, | |
uint256 batchSize | |
) internal virtual override { | |
super._beforeTokenTransfer(from, to, firstTokenId, batchSize); | |
if (batchSize > 1) { | |
// Will only trigger during construction. Batch transferring (minting) is not available afterwards. | |
revert("ERC721Enumerable: consecutive transfers not supported"); | |
} | |
uint256 tokenId = firstTokenId; | |
if (from == address(0)) { | |
_addTokenToAllTokensEnumeration(tokenId); | |
} else if (from != to) { | |
_removeTokenFromOwnerEnumeration(from, tokenId); | |
} | |
if (to == address(0)) { | |
_removeTokenFromAllTokensEnumeration(tokenId); | |
} else if (to != from) { | |
_addTokenToOwnerEnumeration(to, tokenId); | |
} | |
} | |
/** | |
* @dev Private function to add a token to this extension's ownership-tracking data structures. | |
* @param to address representing the new owner of the given token ID | |
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address | |
*/ | |
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { | |
uint256 length = ERC721.balanceOf(to); | |
_ownedTokens[to][length] = tokenId; | |
_ownedTokensIndex[tokenId] = length; | |
} | |
/** | |
* @dev Private function to add a token to this extension's token tracking data structures. | |
* @param tokenId uint256 ID of the token to be added to the tokens list | |
*/ | |
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { | |
_allTokensIndex[tokenId] = _allTokens.length; | |
_allTokens.push(tokenId); | |
} | |
/** | |
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that | |
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for | |
* gas optimizations e.g. when performing a transfer operation (avoiding double writes). | |
* This has O(1) time complexity, but alters the order of the _ownedTokens array. | |
* @param from address representing the previous owner of the given token ID | |
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address | |
*/ | |
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { | |
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and | |
// then delete the last slot (swap and pop). | |
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; | |
uint256 tokenIndex = _ownedTokensIndex[tokenId]; | |
// When the token to delete is the last token, the swap operation is unnecessary | |
if (tokenIndex != lastTokenIndex) { | |
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; | |
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token | |
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index | |
} | |
// This also deletes the contents at the last position of the array | |
delete _ownedTokensIndex[tokenId]; | |
delete _ownedTokens[from][lastTokenIndex]; | |
} | |
/** | |
* @dev Private function to remove a token from this extension's token tracking data structures. | |
* This has O(1) time complexity, but alters the order of the _allTokens array. | |
* @param tokenId uint256 ID of the token to be removed from the tokens list | |
*/ | |
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { | |
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and | |
// then delete the last slot (swap and pop). | |
uint256 lastTokenIndex = _allTokens.length - 1; | |
uint256 tokenIndex = _allTokensIndex[tokenId]; | |
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so | |
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding | |
// an 'if' statement (like in _removeTokenFromOwnerEnumeration) | |
uint256 lastTokenId = _allTokens[lastTokenIndex]; | |
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token | |
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index | |
// This also deletes the contents at the last position of the array | |
delete _allTokensIndex[tokenId]; | |
_allTokens.pop(); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol) | |
pragma solidity ^0.8.0; | |
import "../ERC721.sol"; | |
/** | |
* @dev ERC721 token with storage based token URI management. | |
*/ | |
abstract contract ERC721URIStorage is ERC721 { | |
using Strings for uint256; | |
// Optional mapping for token URIs | |
mapping(uint256 => string) private _tokenURIs; | |
/** | |
* @dev See {IERC721Metadata-tokenURI}. | |
*/ | |
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { | |
_requireMinted(tokenId); | |
string memory _tokenURI = _tokenURIs[tokenId]; | |
string memory base = _baseURI(); | |
// If there is no base URI, return the token URI. | |
if (bytes(base).length == 0) { | |
return _tokenURI; | |
} | |
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). | |
if (bytes(_tokenURI).length > 0) { | |
return string(abi.encodePacked(base, _tokenURI)); | |
} | |
return super.tokenURI(tokenId); | |
} | |
/** | |
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`. | |
* | |
* Requirements: | |
* | |
* - `tokenId` must exist. | |
*/ | |
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { | |
require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); | |
_tokenURIs[tokenId] = _tokenURI; | |
} | |
/** | |
* @dev See {ERC721-_burn}. This override additionally checks to see if a | |
* token-specific URI was set for the token, and if so, it deletes the token URI from | |
* the storage mapping. | |
*/ | |
function _burn(uint256 tokenId) internal virtual override { | |
super._burn(tokenId); | |
if (bytes(_tokenURIs[tokenId]).length != 0) { | |
delete _tokenURIs[tokenId]; | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) | |
pragma solidity ^0.8.0; | |
import "../IERC721.sol"; | |
/** | |
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension | |
* @dev See https://eips.ethereum.org/EIPS/eip-721 | |
*/ | |
interface IERC721Enumerable is IERC721 { | |
/** | |
* @dev Returns the total amount of tokens stored by the contract. | |
*/ | |
function totalSupply() external view returns (uint256); | |
/** | |
* @dev Returns a token ID owned by `owner` at a given `index` of its token list. | |
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens. | |
*/ | |
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); | |
/** | |
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract. | |
* Use along with {totalSupply} to enumerate all tokens. | |
*/ | |
function tokenByIndex(uint256 index) external view returns (uint256); | |
} |
// 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.8.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.8.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 | |
* ==== | |
* | |
* [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://diligence.consensys.net/posts/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.5.11/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); | |
} | |
} | |
} |
// 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.8.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) { | |
return prod0 / denominator; | |
} | |
// Make sure the result is less than 2^256. Also prevents denominator == 0. | |
require(denominator > prod1); | |
/////////////////////////////////////////////// | |
// 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 10, 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 * 8) < value ? 1 : 0); | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) | |
pragma solidity ^0.8.0; | |
// CAUTION | |
// This version of SafeMath should only be used with Solidity 0.8 or later, | |
// because it relies on the compiler's built in overflow checks. | |
/** | |
* @dev Wrappers over Solidity's arithmetic operations. | |
* | |
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler | |
* now has built in overflow checking. | |
*/ | |
library SafeMath { | |
/** | |
* @dev Returns the addition of two unsigned integers, with an overflow flag. | |
* | |
* _Available since v3.4._ | |
*/ | |
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { | |
unchecked { | |
uint256 c = a + b; | |
if (c < a) return (false, 0); | |
return (true, c); | |
} | |
} | |
/** | |
* @dev Returns the subtraction of two unsigned integers, with an overflow flag. | |
* | |
* _Available since v3.4._ | |
*/ | |
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { | |
unchecked { | |
if (b > a) return (false, 0); | |
return (true, a - b); | |
} | |
} | |
/** | |
* @dev Returns the multiplication of two unsigned integers, with an overflow flag. | |
* | |
* _Available since v3.4._ | |
*/ | |
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { | |
unchecked { | |
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the | |
// benefit is lost if 'b' is also tested. | |
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 | |
if (a == 0) return (true, 0); | |
uint256 c = a * b; | |
if (c / a != b) return (false, 0); | |
return (true, c); | |
} | |
} | |
/** | |
* @dev Returns the division of two unsigned integers, with a division by zero flag. | |
* | |
* _Available since v3.4._ | |
*/ | |
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { | |
unchecked { | |
if (b == 0) return (false, 0); | |
return (true, a / b); | |
} | |
} | |
/** | |
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. | |
* | |
* _Available since v3.4._ | |
*/ | |
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { | |
unchecked { | |
if (b == 0) return (false, 0); | |
return (true, a % b); | |
} | |
} | |
/** | |
* @dev Returns the addition of two unsigned integers, reverting on | |
* overflow. | |
* | |
* Counterpart to Solidity's `+` operator. | |
* | |
* Requirements: | |
* | |
* - Addition cannot overflow. | |
*/ | |
function add(uint256 a, uint256 b) internal pure returns (uint256) { | |
return a + b; | |
} | |
/** | |
* @dev Returns the subtraction of two unsigned integers, reverting on | |
* overflow (when the result is negative). | |
* | |
* Counterpart to Solidity's `-` operator. | |
* | |
* Requirements: | |
* | |
* - Subtraction cannot overflow. | |
*/ | |
function sub(uint256 a, uint256 b) internal pure returns (uint256) { | |
return a - b; | |
} | |
/** | |
* @dev Returns the multiplication of two unsigned integers, reverting on | |
* overflow. | |
* | |
* Counterpart to Solidity's `*` operator. | |
* | |
* Requirements: | |
* | |
* - Multiplication cannot overflow. | |
*/ | |
function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
return a * b; | |
} | |
/** | |
* @dev Returns the integer division of two unsigned integers, reverting on | |
* division by zero. The result is rounded towards zero. | |
* | |
* Counterpart to Solidity's `/` operator. | |
* | |
* Requirements: | |
* | |
* - The divisor cannot be zero. | |
*/ | |
function div(uint256 a, uint256 b) internal pure returns (uint256) { | |
return a / b; | |
} | |
/** | |
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
* reverting when dividing by zero. | |
* | |
* Counterpart to Solidity's `%` operator. This function uses a `revert` | |
* opcode (which leaves remaining gas untouched) while Solidity uses an | |
* invalid opcode to revert (consuming all remaining gas). | |
* | |
* Requirements: | |
* | |
* - The divisor cannot be zero. | |
*/ | |
function mod(uint256 a, uint256 b) internal pure returns (uint256) { | |
return a % b; | |
} | |
/** | |
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on | |
* overflow (when the result is negative). | |
* | |
* CAUTION: This function is deprecated because it requires allocating memory for the error | |
* message unnecessarily. For custom revert reasons use {trySub}. | |
* | |
* Counterpart to Solidity's `-` operator. | |
* | |
* Requirements: | |
* | |
* - Subtraction cannot overflow. | |
*/ | |
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { | |
unchecked { | |
require(b <= a, errorMessage); | |
return a - b; | |
} | |
} | |
/** | |
* @dev Returns the integer division of two unsigned integers, reverting with custom message on | |
* division by zero. The result is rounded towards zero. | |
* | |
* Counterpart to Solidity's `/` operator. Note: this function uses a | |
* `revert` opcode (which leaves remaining gas untouched) while Solidity | |
* uses an invalid opcode to revert (consuming all remaining gas). | |
* | |
* Requirements: | |
* | |
* - The divisor cannot be zero. | |
*/ | |
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { | |
unchecked { | |
require(b > 0, errorMessage); | |
return a / b; | |
} | |
} | |
/** | |
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
* reverting with custom message when dividing by zero. | |
* | |
* CAUTION: This function is deprecated because it requires allocating memory for the error | |
* message unnecessarily. For custom revert reasons use {tryMod}. | |
* | |
* Counterpart to Solidity's `%` operator. This function uses a `revert` | |
* opcode (which leaves remaining gas untouched) while Solidity uses an | |
* invalid opcode to revert (consuming all remaining gas). | |
* | |
* Requirements: | |
* | |
* - The divisor cannot be zero. | |
*/ | |
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { | |
unchecked { | |
require(b > 0, errorMessage); | |
return a % b; | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) | |
pragma solidity ^0.8.0; | |
import "./math/Math.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 `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); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) | |
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. | |
pragma solidity ^0.8.0; | |
/** | |
* @dev Library for managing | |
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive | |
* types. | |
* | |
* Sets have the following properties: | |
* | |
* - Elements are added, removed, and checked for existence in constant time | |
* (O(1)). | |
* - Elements are enumerated in O(n). No guarantees are made on the ordering. | |
* | |
* ``` | |
* contract Example { | |
* // Add the library methods | |
* using EnumerableSet for EnumerableSet.AddressSet; | |
* | |
* // Declare a set state variable | |
* EnumerableSet.AddressSet private mySet; | |
* } | |
* ``` | |
* | |
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) | |
* and `uint256` (`UintSet`) are supported. | |
* | |
* [WARNING] | |
* ==== | |
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure | |
* unusable. | |
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. | |
* | |
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an | |
* array of EnumerableSet. | |
* ==== | |
*/ | |
library EnumerableSet { | |
// To implement this library for multiple types with as little code | |
// repetition as possible, we write it in terms of a generic Set type with | |
// bytes32 values. | |
// The Set implementation uses private functions, and user-facing | |
// implementations (such as AddressSet) are just wrappers around the | |
// underlying Set. | |
// This means that we can only create new EnumerableSets for types that fit | |
// in bytes32. | |
struct Set { | |
// Storage of set values | |
bytes32[] _values; | |
// Position of the value in the `values` array, plus 1 because index 0 | |
// means a value is not in the set. | |
mapping(bytes32 => uint256) _indexes; | |
} | |
/** | |
* @dev Add a value to a set. O(1). | |
* | |
* Returns true if the value was added to the set, that is if it was not | |
* already present. | |
*/ | |
function _add(Set storage set, bytes32 value) private returns (bool) { | |
if (!_contains(set, value)) { | |
set._values.push(value); | |
// The value is stored at length-1, but we add 1 to all indexes | |
// and use 0 as a sentinel value | |
set._indexes[value] = set._values.length; | |
return true; | |
} else { | |
return false; | |
} | |
} | |
/** | |
* @dev Removes a value from a set. O(1). | |
* | |
* Returns true if the value was removed from the set, that is if it was | |
* present. | |
*/ | |
function _remove(Set storage set, bytes32 value) private returns (bool) { | |
// We read and store the value's index to prevent multiple reads from the same storage slot | |
uint256 valueIndex = set._indexes[value]; | |
if (valueIndex != 0) { | |
// Equivalent to contains(set, value) | |
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in | |
// the array, and then remove the last element (sometimes called as 'swap and pop'). | |
// This modifies the order of the array, as noted in {at}. | |
uint256 toDeleteIndex = valueIndex - 1; | |
uint256 lastIndex = set._values.length - 1; | |
if (lastIndex != toDeleteIndex) { | |
bytes32 lastValue = set._values[lastIndex]; | |
// Move the last value to the index where the value to delete is | |
set._values[toDeleteIndex] = lastValue; | |
// Update the index for the moved value | |
set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex | |
} | |
// Delete the slot where the moved value was stored | |
set._values.pop(); | |
// Delete the index for the deleted slot | |
delete set._indexes[value]; | |
return true; | |
} else { | |
return false; | |
} | |
} | |
/** | |
* @dev Returns true if the value is in the set. O(1). | |
*/ | |
function _contains(Set storage set, bytes32 value) private view returns (bool) { | |
return set._indexes[value] != 0; | |
} | |
/** | |
* @dev Returns the number of values on the set. O(1). | |
*/ | |
function _length(Set storage set) private view returns (uint256) { | |
return set._values.length; | |
} | |
/** | |
* @dev Returns the value stored at position `index` in the set. O(1). | |
* | |
* Note that there are no guarantees on the ordering of values inside the | |
* array, and it may change when more values are added or removed. | |
* | |
* Requirements: | |
* | |
* - `index` must be strictly less than {length}. | |
*/ | |
function _at(Set storage set, uint256 index) private view returns (bytes32) { | |
return set._values[index]; | |
} | |
/** | |
* @dev Return the entire set in an array | |
* | |
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed | |
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that | |
* this function has an unbounded cost, and using it as part of a state-changing function may render the function | |
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. | |
*/ | |
function _values(Set storage set) private view returns (bytes32[] memory) { | |
return set._values; | |
} | |
// Bytes32Set | |
struct Bytes32Set { | |
Set _inner; | |
} | |
/** | |
* @dev Add a value to a set. O(1). | |
* | |
* Returns true if the value was added to the set, that is if it was not | |
* already present. | |
*/ | |
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { | |
return _add(set._inner, value); | |
} | |
/** | |
* @dev Removes a value from a set. O(1). | |
* | |
* Returns true if the value was removed from the set, that is if it was | |
* present. | |
*/ | |
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { | |
return _remove(set._inner, value); | |
} | |
/** | |
* @dev Returns true if the value is in the set. O(1). | |
*/ | |
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { | |
return _contains(set._inner, value); | |
} | |
/** | |
* @dev Returns the number of values in the set. O(1). | |
*/ | |
function length(Bytes32Set storage set) internal view returns (uint256) { | |
return _length(set._inner); | |
} | |
/** | |
* @dev Returns the value stored at position `index` in the set. O(1). | |
* | |
* Note that there are no guarantees on the ordering of values inside the | |
* array, and it may change when more values are added or removed. | |
* | |
* Requirements: | |
* | |
* - `index` must be strictly less than {length}. | |
*/ | |
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { | |
return _at(set._inner, index); | |
} | |
/** | |
* @dev Return the entire set in an array | |
* | |
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed | |
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that | |
* this function has an unbounded cost, and using it as part of a state-changing function may render the function | |
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. | |
*/ | |
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { | |
bytes32[] memory store = _values(set._inner); | |
bytes32[] memory result; | |
/// @solidity memory-safe-assembly | |
assembly { | |
result := store | |
} | |
return result; | |
} | |
// AddressSet | |
struct AddressSet { | |
Set _inner; | |
} | |
/** | |
* @dev Add a value to a set. O(1). | |
* | |
* Returns true if the value was added to the set, that is if it was not | |
* already present. | |
*/ | |
function add(AddressSet storage set, address value) internal returns (bool) { | |
return _add(set._inner, bytes32(uint256(uint160(value)))); | |
} | |
/** | |
* @dev Removes a value from a set. O(1). | |
* | |
* Returns true if the value was removed from the set, that is if it was | |
* present. | |
*/ | |
function remove(AddressSet storage set, address value) internal returns (bool) { | |
return _remove(set._inner, bytes32(uint256(uint160(value)))); | |
} | |
/** | |
* @dev Returns true if the value is in the set. O(1). | |
*/ | |
function contains(AddressSet storage set, address value) internal view returns (bool) { | |
return _contains(set._inner, bytes32(uint256(uint160(value)))); | |
} | |
/** | |
* @dev Returns the number of values in the set. O(1). | |
*/ | |
function length(AddressSet storage set) internal view returns (uint256) { | |
return _length(set._inner); | |
} | |
/** | |
* @dev Returns the value stored at position `index` in the set. O(1). | |
* | |
* Note that there are no guarantees on the ordering of values inside the | |
* array, and it may change when more values are added or removed. | |
* | |
* Requirements: | |
* | |
* - `index` must be strictly less than {length}. | |
*/ | |
function at(AddressSet storage set, uint256 index) internal view returns (address) { | |
return address(uint160(uint256(_at(set._inner, index)))); | |
} | |
/** | |
* @dev Return the entire set in an array | |
* | |
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed | |
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that | |
* this function has an unbounded cost, and using it as part of a state-changing function may render the function | |
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. | |
*/ | |
function values(AddressSet storage set) internal view returns (address[] memory) { | |
bytes32[] memory store = _values(set._inner); | |
address[] memory result; | |
/// @solidity memory-safe-assembly | |
assembly { | |
result := store | |
} | |
return result; | |
} | |
// UintSet | |
struct UintSet { | |
Set _inner; | |
} | |
/** | |
* @dev Add a value to a set. O(1). | |
* | |
* Returns true if the value was added to the set, that is if it was not | |
* already present. | |
*/ | |
function add(UintSet storage set, uint256 value) internal returns (bool) { | |
return _add(set._inner, bytes32(value)); | |
} | |
/** | |
* @dev Removes a value from a set. O(1). | |
* | |
* Returns true if the value was removed from the set, that is if it was | |
* present. | |
*/ | |
function remove(UintSet storage set, uint256 value) internal returns (bool) { | |
return _remove(set._inner, bytes32(value)); | |
} | |
/** | |
* @dev Returns true if the value is in the set. O(1). | |
*/ | |
function contains(UintSet storage set, uint256 value) internal view returns (bool) { | |
return _contains(set._inner, bytes32(value)); | |
} | |
/** | |
* @dev Returns the number of values in the set. O(1). | |
*/ | |
function length(UintSet storage set) internal view returns (uint256) { | |
return _length(set._inner); | |
} | |
/** | |
* @dev Returns the value stored at position `index` in the set. O(1). | |
* | |
* Note that there are no guarantees on the ordering of values inside the | |
* array, and it may change when more values are added or removed. | |
* | |
* Requirements: | |
* | |
* - `index` must be strictly less than {length}. | |
*/ | |
function at(UintSet storage set, uint256 index) internal view returns (uint256) { | |
return uint256(_at(set._inner, index)); | |
} | |
/** | |
* @dev Return the entire set in an array | |
* | |
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed | |
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that | |
* this function has an unbounded cost, and using it as part of a state-changing function may render the function | |
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. | |
*/ | |
function values(UintSet storage set) internal view returns (uint256[] memory) { | |
bytes32[] memory store = _values(set._inner); | |
uint256[] memory result; | |
/// @solidity memory-safe-assembly | |
assembly { | |
result := store | |
} | |
return result; | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. | |
* | |
* By default, the owner account will be the one that deploys the contract. This | |
* can later be changed with {transferOwnership}. | |
* | |
* This module is used through inheritance. It will make available the modifier | |
* `onlyOwner`, which can be applied to your functions to restrict their use to | |
* the owner. | |
*/ | |
abstract contract Ownable is Context { | |
address private _owner; | |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | |
/** | |
* @dev Initializes the contract setting the deployer as the initial owner. | |
*/ | |
constructor() { | |
_transferOwnership(_msgSender()); | |
} | |
/** | |
* @dev Throws if called by any account other than the owner. | |
*/ | |
modifier onlyOwner() { | |
_checkOwner(); | |
_; | |
} | |
/** | |
* @dev Returns the address of the current owner. | |
*/ | |
function owner() public view virtual returns (address) { | |
return _owner; | |
} | |
/** | |
* @dev Throws if the sender is not the owner. | |
*/ | |
function _checkOwner() internal view virtual { | |
require(owner() == _msgSender(), "Ownable: caller is not the owner"); | |
} | |
/** | |
* @dev Leaves the contract without owner. It will not be possible to call | |
* `onlyOwner` functions anymore. Can only be called by the current owner. | |
* | |
* NOTE: Renouncing ownership will leave the contract without an owner, | |
* thereby removing any functionality that is only available to the owner. | |
*/ | |
function renounceOwnership() public virtual onlyOwner { | |
_transferOwnership(address(0)); | |
} | |
/** | |
* @dev Transfers ownership of the contract to a new account (`newOwner`). | |
* Can only be called by the current owner. | |
*/ | |
function transferOwnership(address newOwner) public virtual onlyOwner { | |
require(newOwner != address(0), "Ownable: new owner is the zero address"); | |
_transferOwnership(newOwner); | |
} | |
/** | |
* @dev Transfers ownership of the contract to a new account (`newOwner`). | |
* Internal function without access restriction. | |
*/ | |
function _transferOwnership(address newOwner) internal virtual { | |
address oldOwner = _owner; | |
_owner = newOwner; | |
emit OwnershipTransferred(oldOwner, newOwner); | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.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 { | |
if (batchSize > 1) { | |
if (from != address(0)) { | |
_balances[from] -= batchSize; | |
} | |
if (to != address(0)) { | |
_balances[to] += batchSize; | |
} | |
} | |
} | |
/** | |
* @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 {} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol) | |
pragma solidity ^0.8.0; | |
import "../ERC721.sol"; | |
/** | |
* @dev ERC721 token with storage based token URI management. | |
*/ | |
abstract contract ERC721URIStorage is ERC721 { | |
using Strings for uint256; | |
// Optional mapping for token URIs | |
mapping(uint256 => string) private _tokenURIs; | |
/** | |
* @dev See {IERC721Metadata-tokenURI}. | |
*/ | |
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { | |
_requireMinted(tokenId); | |
string memory _tokenURI = _tokenURIs[tokenId]; | |
string memory base = _baseURI(); | |
// If there is no base URI, return the token URI. | |
if (bytes(base).length == 0) { | |
return _tokenURI; | |
} | |
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). | |
if (bytes(_tokenURI).length > 0) { | |
return string(abi.encodePacked(base, _tokenURI)); | |
} | |
return super.tokenURI(tokenId); | |
} | |
/** | |
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`. | |
* | |
* Requirements: | |
* | |
* - `tokenId` must exist. | |
*/ | |
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { | |
require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); | |
_tokenURIs[tokenId] = _tokenURI; | |
} | |
/** | |
* @dev See {ERC721-_burn}. This override additionally checks to see if a | |
* token-specific URI was set for the token, and if so, it deletes the token URI from | |
* the storage mapping. | |
*/ | |
function _burn(uint256 tokenId) internal virtual override { | |
super._burn(tokenId); | |
if (bytes(_tokenURIs[tokenId]).length != 0) { | |
delete _tokenURIs[tokenId]; | |
} | |
} | |
} |
// 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.8.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.8.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 | |
* ==== | |
* | |
* [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://diligence.consensys.net/posts/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.5.11/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); | |
} | |
} | |
} |
// 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/Counters.sol) | |
pragma solidity ^0.8.0; | |
/** | |
* @title Counters | |
* @author Matt Condon (@shrugs) | |
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number | |
* of elements in a mapping, issuing ERC721 ids, or counting request ids. | |
* | |
* Include with `using Counters for Counters.Counter;` | |
*/ | |
library Counters { | |
struct Counter { | |
// This variable should never be directly accessed by users of the library: interactions must be restricted to | |
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add | |
// this feature: see https://github.com/ethereum/solidity/issues/4637 | |
uint256 _value; // default: 0 | |
} | |
function current(Counter storage counter) internal view returns (uint256) { | |
return counter._value; | |
} | |
function increment(Counter storage counter) internal { | |
unchecked { | |
counter._value += 1; | |
} | |
} | |
function decrement(Counter storage counter) internal { | |
uint256 value = counter._value; | |
require(value > 0, "Counter: decrement overflow"); | |
unchecked { | |
counter._value = value - 1; | |
} | |
} | |
function reset(Counter storage counter) internal { | |
counter._value = 0; | |
} | |
} |
// 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.8.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) { | |
return prod0 / denominator; | |
} | |
// Make sure the result is less than 2^256. Also prevents denominator == 0. | |
require(denominator > prod1); | |
/////////////////////////////////////////////// | |
// 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 10, 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 * 8) < value ? 1 : 0); | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) | |
pragma solidity ^0.8.0; | |
import "./math/Math.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 `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); | |
} | |
} |
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 OR Apache-2.0 | |
pragma solidity ^0.8.12; | |
contract A { | |
uint256 val; | |
function set(uint256 _val) private returns (uint256) { | |
val = _val; | |
return val; | |
} | |
} |
{ | |
"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": "6080604052348015600e575f80fd5b50603e80601a5f395ff3fe60806040525f80fdfea26469706673582212202f187a75c0ecc510110bb975fcbdfb3c3b0bd72c03fa985719b04a01c25cc76a64736f6c63430008150033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xE JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH1 0x3E DUP1 PUSH1 0x1A PUSH0 CODECOPY PUSH0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2F XOR PUSH27 0x75C0ECC510110BB975FCBDFB3C3B0BD72C03FA985719B04A01C25C 0xC7 PUSH11 0x64736F6C63430008150033 ", | |
"sourceMap": "73:136:0:-:0;;;;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"functionDebugData": {}, | |
"generatedSources": [], | |
"immutableReferences": {}, | |
"linkReferences": {}, | |
"object": "60806040525f80fdfea26469706673582212202f187a75c0ecc510110bb975fcbdfb3c3b0bd72c03fa985719b04a01c25cc76a64736f6c63430008150033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2F XOR PUSH27 0x75C0ECC510110BB975FCBDFB3C3B0BD72C03FA985719B04A01C25C 0xC7 PUSH11 0x64736F6C63430008150033 ", | |
"sourceMap": "73:136:0:-:0;;;;;" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "12400", | |
"executionCost": "64", | |
"totalCost": "12464" | |
}, | |
"internal": { | |
"set(uint256)": "infinite" | |
} | |
}, | |
"methodIdentifiers": {} | |
}, | |
"abi": [] | |
} |
{ | |
"compiler": { | |
"version": "0.8.21+commit.d9974bed" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"A.sol": "A" | |
}, | |
"evmVersion": "shanghai", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": true, | |
"runs": 100000 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"A.sol": { | |
"keccak256": "0xd38169c6603564ebc42ba93e41683c79d460af8629b565a8f5f0b380d23feacb", | |
"license": "MIT OR Apache-2.0", | |
"urls": [ | |
"bzz-raw://bd8b33c25f144f591f92d216ec4b96e8769bd16734392801e3cec53b7a778385", | |
"dweb:/ipfs/Qmd7Xw51XFfEUy96WWiJ4Xu5gAHgrXpN6adaEUDU33GpHH" | |
] | |
} | |
}, | |
"version": 1 | |
} |
// SPDX-License-Identifier: MIT OR Apache-2.0 | |
pragma solidity ^0.8.12; | |
import "./A.sol"; | |
contract B is A { | |
function setValue(uint256 _val) external returns (uint256) { | |
return set(_val); | |
} | |
} |
// SPDX-License-Identifier: MIT OR Apache-2.0 | |
pragma solidity ^0.8.12; | |
error BytesLibrary_Expected_Address_Not_Found(); | |
error BytesLibrary_Start_Location_Too_Large(); | |
/** | |
* @title A library for manipulation of byte arrays. | |
* @author batu-inal & HardlyDifficult | |
*/ | |
library BytesLibrary { | |
/// @notice An address is 20 bytes long | |
uint256 private constant ADDRESS_BYTES_LENGTH = 20; | |
/// @notice A signature is 4 bytes long | |
uint256 private constant SIGNATURE_BYTES_LENGTH = 4; | |
/** | |
* @dev Replace the address at the given location in a byte array if the contents at that location | |
* match the expected address. | |
*/ | |
function replaceAtIf( | |
bytes memory data, | |
uint256 startLocation, | |
address expectedAddress, | |
address newAddress | |
) internal pure { | |
unchecked { | |
if (startLocation > type(uint256).max - ADDRESS_BYTES_LENGTH) { | |
revert BytesLibrary_Start_Location_Too_Large(); | |
} | |
bytes memory expectedData = abi.encodePacked(expectedAddress); | |
bytes memory newData = abi.encodePacked(newAddress); | |
uint256 dataLocation; | |
for (uint256 i = 0; i < ADDRESS_BYTES_LENGTH; ++i) { | |
dataLocation = startLocation + i; | |
if (data[dataLocation] != expectedData[i]) { | |
revert BytesLibrary_Expected_Address_Not_Found(); | |
} | |
data[dataLocation] = newData[i]; | |
} | |
} | |
} | |
/** | |
* @dev Checks if the call data starts with the given function signature. | |
*/ | |
function startsWith(bytes memory callData, bytes4 functionSig) internal pure returns (bool) { | |
// A signature is 4 bytes long | |
if (callData.length < SIGNATURE_BYTES_LENGTH) { | |
return false; | |
} | |
return bytes4(callData) == functionSig; | |
} | |
} |
// SPDX-License-Identifier: Apache-2.0 | |
pragma solidity ^0.8.11; | |
interface IMultiTrack { | |
enum TrackAccess { | |
None, | |
PreviewOnly, | |
FullAccess | |
} | |
// Track struct to hold information for individual music tracks | |
struct MusicTrack { | |
string name; | |
string artist; | |
uint256 durationInSeconds; | |
string mixName; | |
string[] collaborators; | |
string lyrics; | |
string thumbnailArtUri; | |
string trackNumber; | |
string trackTitle; | |
} | |
struct MusicNFTItem { | |
string title; | |
string genre; | |
string coverArtUrl; | |
string[] coverArtOptions; // Array of URLs for multiple cover art options based on rarity | |
string composerName; | |
uint256 releaseDate; | |
uint256 totalSupply; | |
uint256 numberOfTracks; | |
uint256 numberOfBonusTracks; | |
uint256 nextTrackId; | |
string[] trackNumbers; | |
string[] trackTitles; | |
mapping(uint256 => MusicTrack) tracks; | |
} | |
} |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; // Import the correct ERC-1155 interface | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; // Import the OpenZeppelin ERC-1155 implementation | |
contract MusicNFT is ERC1155 { | |
// Track struct to hold information for individual music tracks | |
struct MusicTrack { | |
// string name; | |
// string artist; | |
// uint256 durationInSeconds; | |
// string mixName; | |
string[] collaborators; | |
// string lyrics; | |
// string thumbnailArtUri; | |
string trackNumber; | |
// string trackTitle; | |
} | |
// NFT struct to represent a collection of music tracks | |
struct MusicNFTItem { | |
// string title; | |
// string genre; | |
// string coverArtUrl; | |
string[] coverArtOptions; // Array of URLs for multiple cover art options based on rarity | |
string composerName; | |
// uint256 releaseDate; | |
// uint256 totalSupply; | |
uint256 numberOfTracks; | |
// uint256 numberOfBonusTracks; | |
uint256 nextTrackId; | |
string[] trackNumbers; | |
// string[] trackTitles; | |
mapping(uint256 => MusicTrack) tracks; | |
} | |
mapping(uint256 => MusicNFTItem) private _nfts; | |
// mapping(uint256 => mapping(address => TrackAccess)) private _trackAccessControl; | |
// mapping(uint256 => mapping(address => bool)) private _validKeys; | |
// mapping(uint256 => bool) private _nftCreators; | |
enum TrackAccess { None, PreviewOnly, FullAccess } | |
constructor() ERC1155("") { | |
// Set the base URI for metadata | |
_setURI("https://your-metadata-api-url/"); | |
} | |
// Modifier to check if the sender is the creator of the NFT | |
// modifier onlyNFTCreator(uint256 nftId) { | |
// require(_nftCreators[nftId] == msg.sender, "You are not the creator of this NFT"); | |
// _; | |
// } | |
// Function to create a new multi-track NFT | |
function createNFT(uint256 nftId, uint256 rarityLevel, MusicNFTItem items, // Added rarityLevel parameter | |
uint256 bonusTrackId // Added bonusTrackId parameter | |
) external | |
// onlyNFTCreator(nftId) | |
{ | |
// require(trackNumbers.length == trackTitles.length, "Mismatch between track numbers and track titles"); | |
// require(trackNumbers.length == trackNames.length, "Mismatch between track numbers and track names"); | |
// require(trackNumbers.length == artists.length, "Mismatch between track numbers and artists"); | |
// require(trackNumbers.length == durations.length, "Mismatch between track numbers and durations"); | |
// require(trackNumbers.length == mixNames.length, "Mismatch between track numbers and mix names"); | |
// require(trackNumbers.length == collaborators.length, "Mismatch between track numbers and collaborators"); | |
// require(trackNumbers.length == lyrics.length, "Mismatch between track numbers and lyrics"); | |
// require(trackNumbers.length == thumbnailArtUris.length, "Mismatch between track numbers and thumbnail art URIs"); | |
// Create the NFT with track properties | |
// _nfts[nftId].title = nftTitle; | |
// _nfts[nftId].genre = nftGenre; | |
// _nfts[nftId].coverArtUrl = nftCoverArtUrl; | |
_nfts[nftId].coverArtOptions = coverArtOptions; | |
// _nfts[nftId].composerName = composer; | |
// _nfts[nftId].releaseDate = releaseDate; | |
// _nfts[nftId].totalSupply = 1; // Start with only one NFT | |
_nfts[nftId].numberOfTracks = trackNumbers.length; | |
_nfts[nftId].nextTrackId = 1; | |
// _nfts[nftId].numberOfBonusTracks = 0; // Initialize to zero | |
for (uint256 i = 0; i < trackNumbers.length; i++) { | |
uint256 trackId = _nfts[nftId].nextTrackId + i; | |
_nfts[nftId].tracks[trackId] = MusicTrack({ | |
name: trackNames[i], | |
artist: artists[i], | |
durationInSeconds: durations[i], | |
mixName: mixNames[i], | |
collaborators: collaborators[i], | |
lyrics: lyrics[i], | |
thumbnailArtUri: thumbnailArtUris[i], | |
trackNumber: trackNumbers[i], | |
trackTitle: trackTitles[i] | |
}); | |
// Mint the track as an ERC1155 token | |
_mint(msg.sender, trackId, 1, ""); | |
} | |
// Set the multi-track title for the NFT | |
_nfts[nftId].title = nftTitle; | |
_nfts[nftId].genre = nftGenre; | |
_nfts[nftId].coverArtUrl = nftCoverArtUrl; | |
_nfts[nftId].composerName = composer; | |
_nfts[nftId].releaseDate = releaseDate; | |
// Customize traits based on rarity level | |
if (rarityLevel >= 10) { | |
require(coverArtOptions.length > rarityLevel, "Not enough cover art options for this rarity level"); | |
_nfts[nftId].coverArtUrl = coverArtOptions[rarityLevel]; | |
} | |
// Mint additional NFTs based on rarity level (totalSupply might be edited) | |
for (uint256 i = 1; i < rarityLevel; i++) { | |
for (uint256 j = 0; j < trackNumbers.length; j++) { | |
uint256 trackId = _nfts[nftId].nextTrackId + j; | |
MusicTrack memory track = _nfts[nftId].tracks[trackId]; | |
_nfts[nftId + i].tracks[trackId] = track; | |
_mint(msg.sender, trackId, 1, ""); | |
_nfts[nftId + i].totalSupply++; | |
} | |
// Set custom traits for NFTs of different rarity levels here | |
// For example, you can set different cover art URLs for each rarity level | |
if (i >= 10) { | |
require(coverArtOptions.length > i, "Not enough cover art options for this rarity level"); | |
_nfts[nftId + i].coverArtUrl = coverArtOptions[i]; | |
} | |
} | |
// Mint bonus track for 10% of NFTs | |
if (rarityLevel == 10 && _nfts[nftId].numberOfBonusTracks < _nfts[nftId].totalSupply / 10) { | |
uint256 trackId = _nfts[nftId].nextTrackId + bonusTrackId; | |
MusicTrack memory bonusTrack = _nfts[nftId].tracks[trackId]; | |
_nfts[nftId].tracks[trackId] = bonusTrack; | |
_mint(msg.sender, trackId, 1, ""); // Mint the bonus track | |
_nfts[nftId].totalSupply++; // Increase the total supply for the bonus track | |
_nfts[nftId].numberOfBonusTracks++; // Increase the number of bonus tracks for the NFT | |
} | |
_nfts[nftId].nextTrackId += trackNumbers.length; | |
_nftCreators[nftId] = msg.sender; | |
} | |
// // Function to set the access level for a track and media player | |
// function setTrackAccess(uint256 nftId, address mediaPlayer, TrackAccess access) external onlyNFTCreator(nftId) { | |
// _trackAccessControl[nftId][mediaPlayer] = access; | |
// } | |
// // Function to get the access level for a track and media player | |
// function getTrackAccess(uint256 nftId, address mediaPlayer) external view returns (TrackAccess) { | |
// return _trackAccessControl[nftId][mediaPlayer]; | |
// } | |
// // Function to set a valid key for a track and media player | |
// function setValidKey(uint256 nftId, address mediaPlayer) external onlyNFTCreator(nftId) { | |
// _validKeys[nftId][mediaPlayer] = true; | |
// } | |
// // Function to check if a media player holds a valid key for a track | |
// function hasValidKey(uint256 nftId, address mediaPlayer) external view returns (bool) { | |
// return _validKeys[nftId][mediaPlayer]; | |
// } | |
// // Function to play the audio track | |
// function playTrack(uint256 nftId) external view { | |
// TrackAccess access = _trackAccessControl[nftId][msg.sender]; | |
// bool hasValidKey = _validKeys[nftId][msg.sender]; | |
// // Check if the media player is one of the "partner media players" or holds a valid key | |
// require(access == TrackAccess.FullAccess || hasValidKey, "Invalid access to play the track"); | |
// // DRM logic to play the full track audio | |
// } | |
// // Function to play the audio track preview | |
// function playTrackPreview(uint256 nftId) external view { | |
// TrackAccess access = _trackAccessControl[nftId][msg.sender]; | |
// bool hasValidKey = _validKeys[nftId][msg.sender]; | |
// // Check if the media player is one of the "partner media players" or holds a valid key | |
// require(access == TrackAccess.FullAccess || access == TrackAccess.PreviewOnly || hasValidKey, "Invalid access to play the track preview"); | |
// // DRM logic to play the 20s track preview | |
// } | |
// ... | |
} |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract NFTCreationManager { | |
struct NFTCreationData { | |
uint256 nftId; | |
string nftTitle; | |
string nftGenre; | |
string nftCoverArtUrl; | |
string composer; | |
uint256 releaseDate; | |
string[] trackNames; | |
string[] artists; | |
uint256[] durations; | |
string[] mixNames; | |
string[] lyrics; | |
string[] thumbnailArtUris; | |
uint256 rarityLevel; | |
uint256 bonusTrackId; | |
} | |
NFTCreationData[] public nftCreationQueue; | |
function queueNFTCreation( | |
uint256 nftId, | |
string memory nftTitle, | |
string memory nftGenre, | |
string memory nftCoverArtUrl, | |
string memory composer, | |
uint256 releaseDate, | |
string[] memory trackNames, | |
string[] memory artists, | |
uint256[] memory durations, | |
string[] memory mixNames, | |
string[] memory lyrics, | |
string[] memory thumbnailArtUris, | |
uint256 rarityLevel, | |
uint256 bonusTrackId | |
) external { | |
nftCreationQueue.push( | |
NFTCreationData({ | |
nftId: nftId, | |
nftTitle: nftTitle, | |
nftGenre: nftGenre, | |
nftCoverArtUrl: nftCoverArtUrl, | |
composer: composer, | |
releaseDate: releaseDate, | |
trackNames: trackNames, | |
artists: artists, | |
durations: durations, | |
mixNames: mixNames, | |
lyrics: lyrics, | |
thumbnailArtUris: thumbnailArtUris, | |
rarityLevel: rarityLevel, | |
bonusTrackId: bonusTrackId | |
}) | |
); | |
} | |
function finalizeNFTCreation(uint256 index) external { | |
NFTCreationData storage data = nftCreationQueue[index]; | |
MusicNFT musicNFT = MusicNFT(/* address of your MusicNFT contract */); | |
musicNFT.createNFT( | |
data.nftId, | |
data.nftTitle, | |
data.nftGenre, | |
data.nftCoverArtUrl, | |
data.composer, | |
data.releaseDate, | |
data.trackNames, | |
data.artists, | |
data.durations, | |
data.mixNames, | |
data.lyrics, | |
data.thumbnailArtUris, | |
data.rarityLevel, | |
data.bonusTrackId | |
); | |
} | |
} |
// SPDX-License-Identifier: MIT OR Apache-2.0 | |
pragma solidity ^0.8.12; | |
// import "./interfaces/dependencies/tokens/IERC20Approve.sol"; | |
// import "./interfaces/dependencies/tokens/IERC20IncreaseAllowance.sol"; | |
// import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | |
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; | |
import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/proxy/Clones.sol"; | |
import "./BytesLibrary.sol"; | |
/** | |
* @title Auto-forward ETH to a pre-determined list of addresses. | |
* @notice Deploys contracts which auto-forwards any ETH sent to it to a list of recipients | |
* considering their percent share of the payment received. | |
* ERC-20 tokens are also supported and may be split on demand by calling `splitERC20Tokens`. | |
* If another asset type is sent to this contract address such as an NFT, arbitrary calls may be made by one | |
* of the split recipients in order to recover them. | |
* @dev Uses create2 counterfactual addresses so that the destination is known from the terms of the split. | |
* @author batu-inal & HardlyDifficult | |
*/ | |
contract PercentSplitETH is Initializable { | |
using AddressUpgradeable for address payable; | |
using AddressUpgradeable for address; | |
using BytesLibrary for bytes; | |
using SafeMath for uint256; | |
/// @notice A representation of shares using 16-bits for efficient storage. | |
/// @dev This is only used internally. | |
struct ShareCompressed { | |
address payable recipient; | |
uint16 percentInBasisPoints; | |
} | |
/// @notice A representation of shares using 256-bits to ease integration. | |
struct Share { | |
address payable recipient; | |
uint256 percentInBasisPoints; | |
} | |
ShareCompressed[] private _shares; | |
uint256 private constant BASIS_POINTS = 10_000; | |
/** | |
* @notice Emitted when an ERC20 token is transferred to a recipient through this split contract. | |
* @param erc20Contract The address of the ERC20 token contract. | |
* @param account The account which received payment. | |
* @param amount The amount of ERC20 tokens sent to this recipient. | |
*/ | |
event ERC20Transferred(address indexed erc20Contract, address indexed account, uint256 amount); | |
/** | |
* @notice Emitted when ETH is transferred to a recipient through this split contract. | |
* @param account The account which received payment. | |
* @param amount The amount of ETH payment sent to this recipient. | |
*/ | |
event ETHTransferred(address indexed account, uint256 amount); | |
/** | |
* @notice Emitted when a new percent split contract is created from this factory. | |
* @param contractAddress The address of the new percent split contract. | |
*/ | |
event PercentSplitCreated(address indexed contractAddress); | |
/** | |
* @notice Emitted for each share of the split being defined. | |
* @param recipient The address of the recipient when payment to the split is received. | |
* @param percentInBasisPoints The percent of the payment received by the recipient, in basis points. | |
*/ | |
event PercentSplitShare(address indexed recipient, uint256 percentInBasisPoints); | |
/** | |
* @dev Requires that the msg.sender is one of the recipients in this split. | |
*/ | |
modifier onlyRecipient() { | |
for (uint256 i = 0; i < _shares.length; ) { | |
if (_shares[i].recipient == msg.sender) { | |
_; | |
return; | |
} | |
unchecked { | |
++i; | |
} | |
} | |
revert("Split: Can only be called by one of the recipients"); | |
} | |
// solhint-disable-next-line no-empty-blocks | |
constructor() initializer { | |
// Initialize the template to avoid confusion. | |
// https://forum.openzeppelin.com/t/uupsupgradeable-vulnerability-post-mortem/15680/6 | |
} | |
/** | |
* @notice Called once to configure the contract after the initial deployment. | |
* @dev This will be called by `createSplit` after deploying the proxy so it should never be called directly. | |
* @param shares The list of recipients and their share of the payment for the template to use. | |
*/ | |
function initialize(Share[] calldata shares) external initializer { | |
require(shares.length > 1, "Split: Too few recipients"); | |
require(shares.length < 6, "Split: Too many recipients"); | |
uint256 total; | |
unchecked { | |
// The array length cannot overflow 256 bits. | |
for (uint256 i = 0; i < shares.length; ++i) { | |
require(shares[i].percentInBasisPoints < BASIS_POINTS, "Split: Share must be less than 100%"); | |
// Require above ensures total will not overflow. | |
total += shares[i].percentInBasisPoints; | |
_shares.push( | |
ShareCompressed({ | |
recipient: shares[i].recipient, | |
percentInBasisPoints: uint16(shares[i].percentInBasisPoints) | |
}) | |
); | |
emit PercentSplitShare(shares[i].recipient, shares[i].percentInBasisPoints); | |
} | |
} | |
require(total == BASIS_POINTS, "Split: Total amount must equal 100%"); | |
} | |
/** | |
* @notice Forwards any ETH received to the recipients in this split. | |
* @dev Each recipient increases the gas required to split | |
* and contract recipients may significantly increase the gas required. | |
*/ | |
receive() external payable { | |
_splitETH(msg.value); | |
} | |
/** | |
* @notice Creates a new minimal proxy contract and initializes it with the given split terms. | |
* If the contract had already been created, its address is returned. | |
* This must be called on the original implementation and not a proxy created previously. | |
* @param shares The list of recipients and their share of the payment for this split. | |
* @return splitInstance The contract address for the split contract created. | |
*/ | |
function createSplit(Share[] calldata shares) external returns (PercentSplitETH splitInstance) { | |
bytes32 salt = keccak256(abi.encode(shares)); | |
address clone = Clones.predictDeterministicAddress(address(this), salt); | |
splitInstance = PercentSplitETH(payable(clone)); | |
if (!clone.isContract()) { | |
emit PercentSplitCreated(clone); | |
Clones.cloneDeterministic(address(this), salt); | |
splitInstance.initialize(shares); | |
} | |
} | |
// /** | |
// * @notice Allows the split recipients to make an arbitrary contract call. | |
// * @dev This is provided to allow recovering from unexpected scenarios, | |
// * such as receiving an NFT at this address. | |
// * | |
// * It will first attempt a fair split of ERC20 tokens before proceeding. | |
// * | |
// * This contract is built to split ETH payments. The ability to attempt to make other calls is here | |
// * just in case other assets were also sent so that they don't get locked forever in the contract. | |
// * @param target The address of the contract to call. | |
// * @param callData The data to send to the `target` contract. | |
// */ | |
// function proxyCall(address payable target, bytes calldata callData) external onlyRecipient { | |
// require( | |
// !callData.startsWith(type(IERC20Approve).interfaceId) && | |
// !callData.startsWith(type(IERC20IncreaseAllowance).interfaceId), | |
// "Split: ERC20 tokens must be split" | |
// ); | |
// _splitERC20Tokens(IERC20(target)); | |
// target.functionCall(callData); | |
// } | |
/** | |
* @notice Allows any ETH stored by the contract to be split among recipients. | |
* @dev Normally ETH is forwarded as it comes in, but a balance in this contract | |
* is possible if it was sent before the contract was created or if self destruct was used. | |
*/ | |
function splitETH() external { | |
_splitETH(address(this).balance); | |
} | |
// /** | |
// * @notice Anyone can call this function to split all available tokens at the provided address between the recipients. | |
// * @dev This contract is built to split ETH payments. The ability to attempt to split ERC20 tokens is here | |
// * just in case tokens were also sent so that they don't get locked forever in the contract. | |
// * @param erc20Contract The address of the ERC20 token contract to split tokens for. | |
// */ | |
// function splitERC20Tokens(IERC20 erc20Contract) external { | |
// require(_splitERC20Tokens(erc20Contract), "Split: ERC20 split failed"); | |
// } | |
// function _splitERC20Tokens(IERC20 erc20Contract) private returns (bool) { | |
// try erc20Contract.balanceOf(address(this)) returns (uint256 balance) { | |
// if (balance == 0) { | |
// return false; | |
// } | |
// uint256 amountToSend; | |
// uint256 totalSent; | |
// unchecked { | |
// for (uint256 i = _shares.length - 1; i != 0; i--) { | |
// ShareCompressed memory share = _shares[i]; | |
// bool success; | |
// (success, amountToSend) = balance.tryMul(share.percentInBasisPoints); | |
// if (!success) { | |
// return false; | |
// } | |
// amountToSend /= BASIS_POINTS; | |
// totalSent += amountToSend; | |
// try erc20Contract.transfer(share.recipient, amountToSend) { | |
// emit ERC20Transferred(address(erc20Contract), share.recipient, amountToSend); | |
// } catch { | |
// return false; | |
// } | |
// } | |
// // Favor the 1st recipient if there are any rounding issues | |
// amountToSend = balance - totalSent; | |
// } | |
// try erc20Contract.transfer(_shares[0].recipient, amountToSend) { | |
// emit ERC20Transferred(address(erc20Contract), _shares[0].recipient, amountToSend); | |
// } catch { | |
// return false; | |
// } | |
// return true; | |
// } catch { | |
// return false; | |
// } | |
// } | |
function _splitETH(uint256 value) private { | |
if (value != 0) { | |
uint256 totalSent; | |
uint256 amountToSend; | |
unchecked { | |
for (uint256 i = _shares.length - 1; i != 0; i--) { | |
ShareCompressed memory share = _shares[i]; | |
amountToSend = (value * share.percentInBasisPoints) / BASIS_POINTS; | |
totalSent += amountToSend; | |
share.recipient.sendValue(amountToSend); | |
emit ETHTransferred(share.recipient, amountToSend); | |
} | |
// Favor the 1st recipient if there are any rounding issues | |
amountToSend = value - totalSent; | |
} | |
_shares[0].recipient.sendValue(amountToSend); | |
emit ETHTransferred(_shares[0].recipient, amountToSend); | |
} | |
} | |
/** | |
* @notice Returns a recipient's percent share in basis points. | |
* @param index The index of the recipient to get the share of. | |
* @return percentInBasisPoints The percent of the payment received by the recipient, in basis points. | |
*/ | |
function getPercentInBasisPointsByIndex(uint256 index) external view returns (uint256 percentInBasisPoints) { | |
percentInBasisPoints = _shares[index].percentInBasisPoints; | |
} | |
/** | |
* @notice Returns the address for the proxy contract which would represent the given split terms. | |
* @dev The contract may or may not already be deployed at the address returned. | |
* Ensure that it is deployed before sending funds to this address. | |
* @param shares The list of recipients and their share of the payment for this split. | |
* @return splitInstance The contract address for the split contract created. | |
*/ | |
function getPredictedSplitAddress(Share[] calldata shares) external view returns (address splitInstance) { | |
bytes32 salt = keccak256(abi.encode(shares)); | |
splitInstance = Clones.predictDeterministicAddress(address(this), salt); | |
} | |
/** | |
* @notice Returns how many recipients are part of this split. | |
* @return length The number of recipients in this split. | |
*/ | |
function getShareLength() external view returns (uint256 length) { | |
length = _shares.length; | |
} | |
/** | |
* @notice Returns a recipient in this split. | |
* @param index The index of the recipient to get. | |
* @return recipient The recipient at the given index. | |
*/ | |
function getShareRecipientByIndex(uint256 index) external view returns (address payable recipient) { | |
recipient = _shares[index].recipient; | |
} | |
/** | |
* @notice Returns a tuple with the terms of this split. | |
* @return shares The list of recipients and their share of the payment for this split. | |
*/ | |
function getShares() external view returns (Share[] memory shares) { | |
shares = new Share[](_shares.length); | |
for (uint256 i = 0; i < shares.length; ) { | |
shares[i] = Share({ recipient: _shares[i].recipient, percentInBasisPoints: _shares[i].percentInBasisPoints }); | |
unchecked { | |
++i; | |
} | |
} | |
} | |
} |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
contract MusicNFT is ERC1155 { | |
struct MusicTrack { | |
string name; | |
string artist; | |
uint256 durationInSeconds; | |
string mixName; | |
string[] collaborators; | |
string lyrics; | |
string thumbnailArtUri; | |
string trackNumber; | |
string trackTitle; | |
} | |
struct MusicNFTItem { | |
string title; | |
string genre; | |
string coverArtUrl; | |
string[] coverArtOptions; | |
string composerName; | |
uint256 releaseDate; | |
uint256 totalSupply; | |
uint256 numberOfTracks; | |
uint256 numberOfBonusTracks; | |
uint256 nextTrackId; | |
string[] trackNumbers; | |
string[] trackTitles; | |
} | |
mapping(uint256 => MusicNFTItem) private _nfts; | |
mapping(uint256 => mapping(uint256 => MusicTrack)) private _tracks; | |
mapping(uint256 => mapping(address => TrackAccess)) private _trackAccessControl; | |
mapping(uint256 => mapping(address => bool)) private _validKeys; | |
mapping(uint256 => bool) private _nftCreators; | |
enum TrackAccess { None, PreviewOnly, FullAccess } | |
constructor() ERC1155("") { | |
_setURI("https://your-metadata-api-url/"); | |
} | |
modifier onlyNFTCreator(uint256 nftId) { | |
require(_nftCreators[nftId] == true, "You are not the creator of this NFT"); | |
_; | |
} | |
function createNFT( | |
uint256 nftId, | |
MusicNFTItem memory nftItem, | |
MusicTrack[] memory tracks, | |
uint256 rarityLevel, | |
uint256 bonusTrackId | |
) external { | |
require(nftItem.trackNumbers.length == nftItem.trackTitles.length, "Mismatch between track numbers and track titles"); | |
require(nftItem.trackNumbers.length == tracks.length, "Mismatch between track numbers and track data"); | |
MusicNFTItem storage nftData = _nfts[nftId]; | |
nftData.title = nftItem.title; | |
nftData.genre = nftItem.genre; | |
nftData.coverArtUrl = nftItem.coverArtUrl; | |
nftData.composerName = nftItem.composerName; | |
nftData.releaseDate = nftItem.releaseDate; | |
nftData.totalSupply = 1; | |
nftData.nextTrackId = 1; | |
for (uint256 i = 0; i < nftItem.trackNumbers.length; i++) { | |
uint256 trackId = nftData.nextTrackId + i; | |
_tracks[nftId][trackId] = tracks[i]; | |
nftData.trackNumbers.push(tracks[i].trackNumber); | |
nftData.trackTitles.push(tracks[i].trackTitle); | |
nftData.numberOfTracks++; | |
nftData.nextTrackId++; | |
} | |
if (rarityLevel >= 10 && nftItem.coverArtOptions.length > rarityLevel) { | |
nftData.coverArtUrl = nftItem.coverArtOptions[rarityLevel]; | |
} | |
for (uint256 i = 1; i < rarityLevel; i++) { | |
for (uint256 j = 0; j < nftData.trackNumbers.length; j++) { | |
uint256 trackId = nftData.nextTrackId + j; | |
_tracks[nftId + i][trackId] = _tracks[nftId][trackId]; | |
_mint(msg.sender, trackId, 1, ""); | |
nftData.totalSupply++; | |
} | |
if (i >= 10 && nftData.coverArtOptions.length > i) { | |
nftData.coverArtOptions[i] = nftItem.coverArtOptions[i]; | |
} | |
} | |
if (rarityLevel == 10 && nftData.numberOfBonusTracks < nftData.totalSupply / 10) { | |
uint256 trackId = nftData.nextTrackId + bonusTrackId; | |
_tracks[nftId][trackId] = tracks[bonusTrackId]; | |
_mint(msg.sender, trackId, 1, ""); | |
nftData.totalSupply++; | |
nftData.numberOfBonusTracks++; | |
} | |
_nftCreators[nftId] = true; | |
} | |
function addMusicTrack( | |
uint256 nftId, | |
uint256 trackId, | |
MusicTrack memory track | |
) internal { | |
_tracks[nftId][trackId] = track; | |
_mint(msg.sender, trackId, 1, ""); | |
} | |
// Other functions... | |
} |
{ | |
"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": { | |
"@_175": { | |
"entryPoint": null, | |
"id": 175, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"@_23": { | |
"entryPoint": null, | |
"id": 23, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"@_2872": { | |
"entryPoint": null, | |
"id": 2872, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"@_msgSender_1685": { | |
"entryPoint": 202, | |
"id": 1685, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
}, | |
"@_transferOwnership_111": { | |
"entryPoint": 210, | |
"id": 111, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"array_dataslot_t_string_storage": { | |
"entryPoint": 566, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"array_length_t_string_memory_ptr": { | |
"entryPoint": 408, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"clean_up_bytearray_end_slots_t_string_storage": { | |
"entryPoint": 887, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"cleanup_t_uint256": { | |
"entryPoint": 702, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"clear_storage_range_t_bytes1": { | |
"entryPoint": 848, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"convert_t_uint256_to_t_uint256": { | |
"entryPoint": 722, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage": { | |
"entryPoint": 1042, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"divide_by_32_ceil": { | |
"entryPoint": 587, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"extract_byte_array_length": { | |
"entryPoint": 513, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"extract_used_part_and_set_length_of_short_byte_array": { | |
"entryPoint": 1012, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"identity": { | |
"entryPoint": 712, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"mask_bytes_dynamic": { | |
"entryPoint": 980, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"panic_error_0x22": { | |
"entryPoint": 466, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"panic_error_0x41": { | |
"entryPoint": 419, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"prepare_store_t_uint256": { | |
"entryPoint": 762, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"shift_left_dynamic": { | |
"entryPoint": 603, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"shift_right_unsigned_dynamic": { | |
"entryPoint": 967, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"storage_set_to_zero_t_uint256": { | |
"entryPoint": 820, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"update_byte_slice_dynamic32": { | |
"entryPoint": 616, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 1 | |
}, | |
"update_storage_value_t_uint256_to_t_uint256": { | |
"entryPoint": 772, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"zero_value_for_split_t_uint256": { | |
"entryPoint": 815, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
} | |
}, | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:5231:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "66:40:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "77:22:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "93:5:14" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "87:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "87:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "77:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "49:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "59:6:14", | |
"type": "" | |
} | |
], | |
"src": "7:99:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "140:152:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "157:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "160:77:14", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "150:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "150:88:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "150:88:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "254:1:14", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "257:4:14", | |
"type": "", | |
"value": "0x41" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "247:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "247:15:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "247:15:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "278:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "281:4:14", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "271:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "271:15:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "271:15:14" | |
} | |
] | |
}, | |
"name": "panic_error_0x41", | |
"nodeType": "YulFunctionDefinition", | |
"src": "112:180:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "326:152:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "343:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "346:77:14", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "336:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "336:88:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "336:88:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "440:1:14", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "443:4:14", | |
"type": "", | |
"value": "0x22" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "433:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "433:15:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "433:15:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "464:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "467:4:14", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "457:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "457:15:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "457:15:14" | |
} | |
] | |
}, | |
"name": "panic_error_0x22", | |
"nodeType": "YulFunctionDefinition", | |
"src": "298:180:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "535:269:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "545:22:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "559:4:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "565:1:14", | |
"type": "", | |
"value": "2" | |
} | |
], | |
"functionName": { | |
"name": "div", | |
"nodeType": "YulIdentifier", | |
"src": "555:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "555:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "545:6:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "576:38:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "606:4:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "612:1:14", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "602:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "602:12:14" | |
}, | |
"variables": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulTypedName", | |
"src": "580:18:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "653:51:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "667:27:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "681:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "689:4:14", | |
"type": "", | |
"value": "0x7f" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "677:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "677:17:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "667:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "633:18:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "626:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "626:26:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "623:81:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "756:42:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x22", | |
"nodeType": "YulIdentifier", | |
"src": "770:16:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "770:18:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "770:18:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "720:18:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "743:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "751:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "740:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "740:14:14" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "717:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "717:38:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "714:84:14" | |
} | |
] | |
}, | |
"name": "extract_byte_array_length", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "519:4:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "528:6:14", | |
"type": "" | |
} | |
], | |
"src": "484:320:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "864:87:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "874:11:14", | |
"value": { | |
"name": "ptr", | |
"nodeType": "YulIdentifier", | |
"src": "882:3:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "874:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "902:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"name": "ptr", | |
"nodeType": "YulIdentifier", | |
"src": "905:3:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "895:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "895:14:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "895:14:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "918:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "936:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "939:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "keccak256", | |
"nodeType": "YulIdentifier", | |
"src": "926:9:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "926:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "918:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_dataslot_t_string_storage", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "ptr", | |
"nodeType": "YulTypedName", | |
"src": "851:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "859:4:14", | |
"type": "" | |
} | |
], | |
"src": "810:141:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1001:49:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1011:33:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1029:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1036:2:14", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1025:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1025:14:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1041:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "div", | |
"nodeType": "YulIdentifier", | |
"src": "1021:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1021:23:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "1011:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "divide_by_32_ceil", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "984:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "994:6:14", | |
"type": "" | |
} | |
], | |
"src": "957:93:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1109:54:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1119:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "bits", | |
"nodeType": "YulIdentifier", | |
"src": "1144:4:14" | |
}, | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1150:5:14" | |
} | |
], | |
"functionName": { | |
"name": "shl", | |
"nodeType": "YulIdentifier", | |
"src": "1140:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1140:16:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "newValue", | |
"nodeType": "YulIdentifier", | |
"src": "1119:8:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "shift_left_dynamic", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "bits", | |
"nodeType": "YulTypedName", | |
"src": "1084:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1090:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "newValue", | |
"nodeType": "YulTypedName", | |
"src": "1100:8:14", | |
"type": "" | |
} | |
], | |
"src": "1056:107:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1245:317:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "1255:35:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "shiftBytes", | |
"nodeType": "YulIdentifier", | |
"src": "1276:10:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1288:1:14", | |
"type": "", | |
"value": "8" | |
} | |
], | |
"functionName": { | |
"name": "mul", | |
"nodeType": "YulIdentifier", | |
"src": "1272:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1272:18:14" | |
}, | |
"variables": [ | |
{ | |
"name": "shiftBits", | |
"nodeType": "YulTypedName", | |
"src": "1259:9:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "1299:109:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "shiftBits", | |
"nodeType": "YulIdentifier", | |
"src": "1330:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1341:66:14", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "shift_left_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "1311:18:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1311:97:14" | |
}, | |
"variables": [ | |
{ | |
"name": "mask", | |
"nodeType": "YulTypedName", | |
"src": "1303:4:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1417:51:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "shiftBits", | |
"nodeType": "YulIdentifier", | |
"src": "1448:9:14" | |
}, | |
{ | |
"name": "toInsert", | |
"nodeType": "YulIdentifier", | |
"src": "1459:8:14" | |
} | |
], | |
"functionName": { | |
"name": "shift_left_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "1429:18:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1429:39:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "toInsert", | |
"nodeType": "YulIdentifier", | |
"src": "1417:8:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1477:30:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1490:5:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "mask", | |
"nodeType": "YulIdentifier", | |
"src": "1501:4:14" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "1497:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1497:9:14" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1486:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1486:21:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1477:5:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1516:40:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1529:5:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "toInsert", | |
"nodeType": "YulIdentifier", | |
"src": "1540:8:14" | |
}, | |
{ | |
"name": "mask", | |
"nodeType": "YulIdentifier", | |
"src": "1550:4:14" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1536:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1536:19:14" | |
} | |
], | |
"functionName": { | |
"name": "or", | |
"nodeType": "YulIdentifier", | |
"src": "1526:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1526:30:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "1516:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "update_byte_slice_dynamic32", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1206:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "shiftBytes", | |
"nodeType": "YulTypedName", | |
"src": "1213:10:14", | |
"type": "" | |
}, | |
{ | |
"name": "toInsert", | |
"nodeType": "YulTypedName", | |
"src": "1225:8:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "1238:6:14", | |
"type": "" | |
} | |
], | |
"src": "1169:393:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1613:32:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1623:16:14", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1634:5:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1623:7:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1595:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1605:7:14", | |
"type": "" | |
} | |
], | |
"src": "1568:77:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1683:28:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1693:12:14", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1700:5:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulIdentifier", | |
"src": "1693:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "identity", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1669:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulTypedName", | |
"src": "1679:3:14", | |
"type": "" | |
} | |
], | |
"src": "1651:60:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1777:82:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1787:66:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1845:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1827:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1827:24:14" | |
} | |
], | |
"functionName": { | |
"name": "identity", | |
"nodeType": "YulIdentifier", | |
"src": "1818:8:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1818:34:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1800:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1800:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "converted", | |
"nodeType": "YulIdentifier", | |
"src": "1787:9:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "convert_t_uint256_to_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1757:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "converted", | |
"nodeType": "YulTypedName", | |
"src": "1767:9:14", | |
"type": "" | |
} | |
], | |
"src": "1717:142:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1912:28:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1922:12:14", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1929:5:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulIdentifier", | |
"src": "1922:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "prepare_store_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1898:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulTypedName", | |
"src": "1908:3:14", | |
"type": "" | |
} | |
], | |
"src": "1865:75:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2022:193:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "2032:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value_0", | |
"nodeType": "YulIdentifier", | |
"src": "2087:7:14" | |
} | |
], | |
"functionName": { | |
"name": "convert_t_uint256_to_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "2056:30:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2056:39:14" | |
}, | |
"variables": [ | |
{ | |
"name": "convertedValue_0", | |
"nodeType": "YulTypedName", | |
"src": "2036:16:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "2111:4:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "2151:4:14" | |
} | |
], | |
"functionName": { | |
"name": "sload", | |
"nodeType": "YulIdentifier", | |
"src": "2145:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2145:11:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "2158:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "convertedValue_0", | |
"nodeType": "YulIdentifier", | |
"src": "2190:16:14" | |
} | |
], | |
"functionName": { | |
"name": "prepare_store_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "2166:23:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2166:41:14" | |
} | |
], | |
"functionName": { | |
"name": "update_byte_slice_dynamic32", | |
"nodeType": "YulIdentifier", | |
"src": "2117:27:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2117:91:14" | |
} | |
], | |
"functionName": { | |
"name": "sstore", | |
"nodeType": "YulIdentifier", | |
"src": "2104:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2104:105:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2104:105:14" | |
} | |
] | |
}, | |
"name": "update_storage_value_t_uint256_to_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulTypedName", | |
"src": "1999:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "2005:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value_0", | |
"nodeType": "YulTypedName", | |
"src": "2013:7:14", | |
"type": "" | |
} | |
], | |
"src": "1946:269:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2270:24:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2280:8:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2287:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variableNames": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulIdentifier", | |
"src": "2280:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "zero_value_for_split_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"returnVariables": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulTypedName", | |
"src": "2266:3:14", | |
"type": "" | |
} | |
], | |
"src": "2221:73:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2353:136:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "2363:46:14", | |
"value": { | |
"arguments": [], | |
"functionName": { | |
"name": "zero_value_for_split_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "2377:30:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2377:32:14" | |
}, | |
"variables": [ | |
{ | |
"name": "zero_0", | |
"nodeType": "YulTypedName", | |
"src": "2367:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "2462:4:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "2468:6:14" | |
}, | |
{ | |
"name": "zero_0", | |
"nodeType": "YulIdentifier", | |
"src": "2476:6:14" | |
} | |
], | |
"functionName": { | |
"name": "update_storage_value_t_uint256_to_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "2418:43:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2418:65:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2418:65:14" | |
} | |
] | |
}, | |
"name": "storage_set_to_zero_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulTypedName", | |
"src": "2339:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "2345:6:14", | |
"type": "" | |
} | |
], | |
"src": "2300:189:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2545:136:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2612:63:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "start", | |
"nodeType": "YulIdentifier", | |
"src": "2656:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2663:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "storage_set_to_zero_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "2626:29:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2626:39:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2626:39:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "start", | |
"nodeType": "YulIdentifier", | |
"src": "2565:5:14" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "2572:3:14" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "2562:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2562:14:14" | |
}, | |
"nodeType": "YulForLoop", | |
"post": { | |
"nodeType": "YulBlock", | |
"src": "2577:26:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2579:22:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "start", | |
"nodeType": "YulIdentifier", | |
"src": "2592:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2599:1:14", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2588:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2588:13:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "start", | |
"nodeType": "YulIdentifier", | |
"src": "2579:5:14" | |
} | |
] | |
} | |
] | |
}, | |
"pre": { | |
"nodeType": "YulBlock", | |
"src": "2559:2:14", | |
"statements": [] | |
}, | |
"src": "2555:120:14" | |
} | |
] | |
}, | |
"name": "clear_storage_range_t_bytes1", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "start", | |
"nodeType": "YulTypedName", | |
"src": "2533:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "2540:3:14", | |
"type": "" | |
} | |
], | |
"src": "2495:186:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2766:464:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2792:431:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "2806:54:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "2854:5:14" | |
} | |
], | |
"functionName": { | |
"name": "array_dataslot_t_string_storage", | |
"nodeType": "YulIdentifier", | |
"src": "2822:31:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2822:38:14" | |
}, | |
"variables": [ | |
{ | |
"name": "dataArea", | |
"nodeType": "YulTypedName", | |
"src": "2810:8:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "2873:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "dataArea", | |
"nodeType": "YulIdentifier", | |
"src": "2896:8:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "startIndex", | |
"nodeType": "YulIdentifier", | |
"src": "2924:10:14" | |
} | |
], | |
"functionName": { | |
"name": "divide_by_32_ceil", | |
"nodeType": "YulIdentifier", | |
"src": "2906:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2906:29:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2892:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2892:44:14" | |
}, | |
"variables": [ | |
{ | |
"name": "deleteStart", | |
"nodeType": "YulTypedName", | |
"src": "2877:11:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3093:27:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3095:23:14", | |
"value": { | |
"name": "dataArea", | |
"nodeType": "YulIdentifier", | |
"src": "3110:8:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "deleteStart", | |
"nodeType": "YulIdentifier", | |
"src": "3095:11:14" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "startIndex", | |
"nodeType": "YulIdentifier", | |
"src": "3077:10:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3089:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "3074:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3074:18:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "3071:49:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "deleteStart", | |
"nodeType": "YulIdentifier", | |
"src": "3162:11:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "dataArea", | |
"nodeType": "YulIdentifier", | |
"src": "3179:8:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "len", | |
"nodeType": "YulIdentifier", | |
"src": "3207:3:14" | |
} | |
], | |
"functionName": { | |
"name": "divide_by_32_ceil", | |
"nodeType": "YulIdentifier", | |
"src": "3189:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3189:22:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "3175:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3175:37:14" | |
} | |
], | |
"functionName": { | |
"name": "clear_storage_range_t_bytes1", | |
"nodeType": "YulIdentifier", | |
"src": "3133:28:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3133:80:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "3133:80:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "len", | |
"nodeType": "YulIdentifier", | |
"src": "2783:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2788:2:14", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "2780:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2780:11:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "2777:446:14" | |
} | |
] | |
}, | |
"name": "clean_up_bytearray_end_slots_t_string_storage", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "array", | |
"nodeType": "YulTypedName", | |
"src": "2742:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "len", | |
"nodeType": "YulTypedName", | |
"src": "2749:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "startIndex", | |
"nodeType": "YulTypedName", | |
"src": "2754:10:14", | |
"type": "" | |
} | |
], | |
"src": "2687:543:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3299:54:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3309:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "bits", | |
"nodeType": "YulIdentifier", | |
"src": "3334:4:14" | |
}, | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3340:5:14" | |
} | |
], | |
"functionName": { | |
"name": "shr", | |
"nodeType": "YulIdentifier", | |
"src": "3330:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3330:16:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "newValue", | |
"nodeType": "YulIdentifier", | |
"src": "3309:8:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "shift_right_unsigned_dynamic", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "bits", | |
"nodeType": "YulTypedName", | |
"src": "3274:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "3280:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "newValue", | |
"nodeType": "YulTypedName", | |
"src": "3290:8:14", | |
"type": "" | |
} | |
], | |
"src": "3236:117:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3410:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "3420:68:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3469:1:14", | |
"type": "", | |
"value": "8" | |
}, | |
{ | |
"name": "bytes", | |
"nodeType": "YulIdentifier", | |
"src": "3472:5:14" | |
} | |
], | |
"functionName": { | |
"name": "mul", | |
"nodeType": "YulIdentifier", | |
"src": "3465:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3465:13:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3484:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "3480:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3480:6:14" | |
} | |
], | |
"functionName": { | |
"name": "shift_right_unsigned_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "3436:28:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3436:51:14" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "3432:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3432:56:14" | |
}, | |
"variables": [ | |
{ | |
"name": "mask", | |
"nodeType": "YulTypedName", | |
"src": "3424:4:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3497:25:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "3511:4:14" | |
}, | |
{ | |
"name": "mask", | |
"nodeType": "YulIdentifier", | |
"src": "3517:4:14" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "3507:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3507:15:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "3497:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "mask_bytes_dynamic", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "3387:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "bytes", | |
"nodeType": "YulTypedName", | |
"src": "3393:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "3403:6:14", | |
"type": "" | |
} | |
], | |
"src": "3359:169:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3614:214:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3747:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "3774:4:14" | |
}, | |
{ | |
"name": "len", | |
"nodeType": "YulIdentifier", | |
"src": "3780:3:14" | |
} | |
], | |
"functionName": { | |
"name": "mask_bytes_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "3755:18:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3755:29:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "3747:4:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3793:29:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "3804:4:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3814:1:14", | |
"type": "", | |
"value": "2" | |
}, | |
{ | |
"name": "len", | |
"nodeType": "YulIdentifier", | |
"src": "3817:3:14" | |
} | |
], | |
"functionName": { | |
"name": "mul", | |
"nodeType": "YulIdentifier", | |
"src": "3810:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3810:11:14" | |
} | |
], | |
"functionName": { | |
"name": "or", | |
"nodeType": "YulIdentifier", | |
"src": "3801:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3801:21:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "used", | |
"nodeType": "YulIdentifier", | |
"src": "3793:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "extract_used_part_and_set_length_of_short_byte_array", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "3595:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "len", | |
"nodeType": "YulTypedName", | |
"src": "3601:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "used", | |
"nodeType": "YulTypedName", | |
"src": "3609:4:14", | |
"type": "" | |
} | |
], | |
"src": "3533:295:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3925:1303:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "3936:51:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "3983:3:14" | |
} | |
], | |
"functionName": { | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "3950:32:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3950:37:14" | |
}, | |
"variables": [ | |
{ | |
"name": "newLen", | |
"nodeType": "YulTypedName", | |
"src": "3940:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4072:22:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x41", | |
"nodeType": "YulIdentifier", | |
"src": "4074:16:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4074:18:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4074:18:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "4044:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4052:18:14", | |
"type": "", | |
"value": "0xffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "4041:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4041:30:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "4038:56:14" | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "4104:52:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "4150:4:14" | |
} | |
], | |
"functionName": { | |
"name": "sload", | |
"nodeType": "YulIdentifier", | |
"src": "4144:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4144:11:14" | |
} | |
], | |
"functionName": { | |
"name": "extract_byte_array_length", | |
"nodeType": "YulIdentifier", | |
"src": "4118:25:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4118:38:14" | |
}, | |
"variables": [ | |
{ | |
"name": "oldLen", | |
"nodeType": "YulTypedName", | |
"src": "4108:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "4249:4:14" | |
}, | |
{ | |
"name": "oldLen", | |
"nodeType": "YulIdentifier", | |
"src": "4255:6:14" | |
}, | |
{ | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "4263:6:14" | |
} | |
], | |
"functionName": { | |
"name": "clean_up_bytearray_end_slots_t_string_storage", | |
"nodeType": "YulIdentifier", | |
"src": "4203:45:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4203:67:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4203:67:14" | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "4280:18:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4297:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "srcOffset", | |
"nodeType": "YulTypedName", | |
"src": "4284:9:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "4308:17:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4321:4:14", | |
"type": "", | |
"value": "0x20" | |
}, | |
"variableNames": [ | |
{ | |
"name": "srcOffset", | |
"nodeType": "YulIdentifier", | |
"src": "4308:9:14" | |
} | |
] | |
}, | |
{ | |
"cases": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4372:611:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "4386:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "4405:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4417:4:14", | |
"type": "", | |
"value": "0x1f" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "4413:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4413:9:14" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "4401:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4401:22:14" | |
}, | |
"variables": [ | |
{ | |
"name": "loopEnd", | |
"nodeType": "YulTypedName", | |
"src": "4390:7:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "4437:51:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "4483:4:14" | |
} | |
], | |
"functionName": { | |
"name": "array_dataslot_t_string_storage", | |
"nodeType": "YulIdentifier", | |
"src": "4451:31:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4451:37:14" | |
}, | |
"variables": [ | |
{ | |
"name": "dstPtr", | |
"nodeType": "YulTypedName", | |
"src": "4441:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "4501:10:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4510:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "i", | |
"nodeType": "YulTypedName", | |
"src": "4505:1:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4569:163:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "dstPtr", | |
"nodeType": "YulIdentifier", | |
"src": "4594:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "4612:3:14" | |
}, | |
{ | |
"name": "srcOffset", | |
"nodeType": "YulIdentifier", | |
"src": "4617:9:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4608:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4608:19:14" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "4602:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4602:26:14" | |
} | |
], | |
"functionName": { | |
"name": "sstore", | |
"nodeType": "YulIdentifier", | |
"src": "4587:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4587:42:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4587:42:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "4646:24:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "dstPtr", | |
"nodeType": "YulIdentifier", | |
"src": "4660:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4668:1:14", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4656:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4656:14:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "dstPtr", | |
"nodeType": "YulIdentifier", | |
"src": "4646:6:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "4687:31:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "srcOffset", | |
"nodeType": "YulIdentifier", | |
"src": "4704:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4715:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4700:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4700:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "srcOffset", | |
"nodeType": "YulIdentifier", | |
"src": "4687:9:14" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "4535:1:14" | |
}, | |
{ | |
"name": "loopEnd", | |
"nodeType": "YulIdentifier", | |
"src": "4538:7:14" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "4532:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4532:14:14" | |
}, | |
"nodeType": "YulForLoop", | |
"post": { | |
"nodeType": "YulBlock", | |
"src": "4547:21:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "4549:17:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "4558:1:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4561:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4554:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4554:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "4549:1:14" | |
} | |
] | |
} | |
] | |
}, | |
"pre": { | |
"nodeType": "YulBlock", | |
"src": "4528:3:14", | |
"statements": [] | |
}, | |
"src": "4524:208:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4768:156:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "4786:43:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "4813:3:14" | |
}, | |
{ | |
"name": "srcOffset", | |
"nodeType": "YulIdentifier", | |
"src": "4818:9:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4809:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4809:19:14" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "4803:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4803:26:14" | |
}, | |
"variables": [ | |
{ | |
"name": "lastValue", | |
"nodeType": "YulTypedName", | |
"src": "4790:9:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "dstPtr", | |
"nodeType": "YulIdentifier", | |
"src": "4853:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "lastValue", | |
"nodeType": "YulIdentifier", | |
"src": "4880:9:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "4895:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4903:4:14", | |
"type": "", | |
"value": "0x1f" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "4891:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4891:17:14" | |
} | |
], | |
"functionName": { | |
"name": "mask_bytes_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "4861:18:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4861:48:14" | |
} | |
], | |
"functionName": { | |
"name": "sstore", | |
"nodeType": "YulIdentifier", | |
"src": "4846:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4846:64:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4846:64:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "loopEnd", | |
"nodeType": "YulIdentifier", | |
"src": "4751:7:14" | |
}, | |
{ | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "4760:6:14" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "4748:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4748:19:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "4745:179:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "4944:4:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "4958:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4966:1:14", | |
"type": "", | |
"value": "2" | |
} | |
], | |
"functionName": { | |
"name": "mul", | |
"nodeType": "YulIdentifier", | |
"src": "4954:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4954:14:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4970:1:14", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4950:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4950:22:14" | |
} | |
], | |
"functionName": { | |
"name": "sstore", | |
"nodeType": "YulIdentifier", | |
"src": "4937:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4937:36:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4937:36:14" | |
} | |
] | |
}, | |
"nodeType": "YulCase", | |
"src": "4365:618:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4370:1:14", | |
"type": "", | |
"value": "1" | |
} | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "5000:222:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "5014:14:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "5027:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "5018:5:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "5051:67:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "5069:35:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "5088:3:14" | |
}, | |
{ | |
"name": "srcOffset", | |
"nodeType": "YulIdentifier", | |
"src": "5093:9:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "5084:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5084:19:14" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "5078:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5078:26:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "5069:5:14" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "5044:6:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "5041:77:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "5138:4:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "5197:5:14" | |
}, | |
{ | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "5204:6:14" | |
} | |
], | |
"functionName": { | |
"name": "extract_used_part_and_set_length_of_short_byte_array", | |
"nodeType": "YulIdentifier", | |
"src": "5144:52:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5144:67:14" | |
} | |
], | |
"functionName": { | |
"name": "sstore", | |
"nodeType": "YulIdentifier", | |
"src": "5131:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5131:81:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "5131:81:14" | |
} | |
] | |
}, | |
"nodeType": "YulCase", | |
"src": "4992:230:14", | |
"value": "default" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "newLen", | |
"nodeType": "YulIdentifier", | |
"src": "4345:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4353:2:14", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "4342:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4342:14:14" | |
}, | |
"nodeType": "YulSwitch", | |
"src": "4335:887:14" | |
} | |
] | |
}, | |
"name": "copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulTypedName", | |
"src": "3914:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "src", | |
"nodeType": "YulTypedName", | |
"src": "3920:3:14", | |
"type": "" | |
} | |
], | |
"src": "3833:1395:14" | |
} | |
] | |
}, | |
"contents": "{\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 cleanup_t_uint256(value) -> cleaned {\n cleaned := value\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": 14, | |
"language": "Yul", | |
"name": "#utility.yul" | |
} | |
], | |
"linkReferences": {}, | |
"object": "60806040523480156200001157600080fd5b506040518060400160405280601481526020017f41766f6c7574696f6e204e4654206261646765730000000000000000000000008152506040518060400160405280600381526020017f414e42000000000000000000000000000000000000000000000000000000000081525081600090816200008f919062000412565b508060019081620000a1919062000412565b505050620000c4620000b8620000ca60201b60201c565b620000d260201b60201c565b620004f9565b600033905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200021a57607f821691505b60208210810362000230576200022f620001d2565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200029a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200025b565b620002a686836200025b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002f3620002ed620002e784620002be565b620002c8565b620002be565b9050919050565b6000819050919050565b6200030f83620002d2565b620003276200031e82620002fa565b84845462000268565b825550505050565b600090565b6200033e6200032f565b6200034b81848462000304565b505050565b5b8181101562000373576200036760008262000334565b60018101905062000351565b5050565b601f821115620003c2576200038c8162000236565b62000397846200024b565b81016020851015620003a7578190505b620003bf620003b6856200024b565b83018262000350565b50505b505050565b600082821c905092915050565b6000620003e760001984600802620003c7565b1980831691505092915050565b6000620004028383620003d4565b9150826002028217905092915050565b6200041d8262000198565b67ffffffffffffffff811115620004395762000438620001a3565b5b62000445825462000201565b6200045282828562000377565b600060209050601f8311600181146200048a576000841562000475578287015190505b620004818582620003f4565b865550620004f1565b601f1984166200049a8662000236565b60005b82811015620004c4578489015182556001820191506020850194506020810190506200049d565b86831015620004e45784890151620004e0601f891682620003d4565b8355505b6001600288020188555050505b505050505050565b61339280620005096000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063715018a6116100a2578063b88d4fde11610071578063b88d4fde146102cb578063c87b56dd146102e7578063d204c45e14610317578063e985e9c514610333578063f2fde38b1461036357610116565b8063715018a6146102695780638da5cb5b1461027357806395d89b4114610291578063a22cb465146102af57610116565b806323b872dd116100e957806323b872dd146101b557806342842e0e146101d157806342966c68146101ed5780636352211e1461020957806370a082311461023957610116565b806301ffc9a71461011b57806306fdde031461014b578063081812fc14610169578063095ea7b314610199575b600080fd5b6101356004803603810190610130919061205a565b61037f565b60405161014291906120a2565b60405180910390f35b610153610461565b604051610160919061214d565b60405180910390f35b610183600480360381019061017e91906121a5565b6104f3565b6040516101909190612213565b60405180910390f35b6101b360048036038101906101ae919061225a565b610539565b005b6101cf60048036038101906101ca919061229a565b610650565b005b6101eb60048036038101906101e6919061229a565b6106b0565b005b610207600480360381019061020291906121a5565b6106d0565b005b610223600480360381019061021e91906121a5565b6106dc565b6040516102309190612213565b60405180910390f35b610253600480360381019061024e91906122ed565b610762565b6040516102609190612329565b60405180910390f35b610271610819565b005b61027b61082d565b6040516102889190612213565b60405180910390f35b610299610857565b6040516102a6919061214d565b60405180910390f35b6102c960048036038101906102c49190612370565b6108e9565b005b6102e560048036038101906102e091906124e5565b6108ff565b005b61030160048036038101906102fc91906121a5565b610961565b60405161030e919061214d565b60405180910390f35b610331600480360381019061032c9190612609565b610973565b005b61034d60048036038101906103489190612665565b6109ac565b60405161035a91906120a2565b60405180910390f35b61037d600480360381019061037891906122ed565b610a40565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061044a57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061045a575061045982610ac3565b5b9050919050565b606060008054610470906126d4565b80601f016020809104026020016040519081016040528092919081815260200182805461049c906126d4565b80156104e95780601f106104be576101008083540402835291602001916104e9565b820191906000526020600020905b8154815290600101906020018083116104cc57829003601f168201915b5050505050905090565b60006104fe82610b2d565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610544826106dc565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036105b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ab90612777565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166105d3610b78565b73ffffffffffffffffffffffffffffffffffffffff1614806106025750610601816105fc610b78565b6109ac565b5b610641576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063890612809565b60405180910390fd5b61064b8383610b80565b505050565b61066161065b610b78565b82610c39565b6106a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106979061289b565b60405180910390fd5b6106ab838383610cce565b505050565b6106cb838383604051806020016040528060008152506108ff565b505050565b6106d981610fc7565b50565b6000806106e883610fd3565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075090612907565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c990612999565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610821611010565b61082b600061108e565b565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610866906126d4565b80601f0160208091040260200160405190810160405280929190818152602001828054610892906126d4565b80156108df5780601f106108b4576101008083540402835291602001916108df565b820191906000526020600020905b8154815290600101906020018083116108c257829003601f168201915b5050505050905090565b6108fb6108f4610b78565b8383611154565b5050565b61091061090a610b78565b83610c39565b61094f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109469061289b565b60405180910390fd5b61095b848484846112c0565b50505050565b606061096c8261131c565b9050919050565b61097b611010565b6000610987600861142e565b9050610993600861143c565b61099d8382611452565b6109a78183611470565b505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610a48611010565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ab7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aae90612a2b565b60405180910390fd5b610ac08161108e565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610b36816114dd565b610b75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6c90612907565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16610bf3836106dc565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610c45836106dc565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610c875750610c8681856109ac565b5b80610cc557508373ffffffffffffffffffffffffffffffffffffffff16610cad846104f3565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16610cee826106dc565b73ffffffffffffffffffffffffffffffffffffffff1614610d44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3b90612abd565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610db3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610daa90612b4f565b60405180910390fd5b610dc0838383600161151e565b8273ffffffffffffffffffffffffffffffffffffffff16610de0826106dc565b73ffffffffffffffffffffffffffffffffffffffff1614610e36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2d90612abd565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610fc283838360016115dc565b505050565b610fd0816115e2565b50565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b611018610b78565b73ffffffffffffffffffffffffffffffffffffffff1661103661082d565b73ffffffffffffffffffffffffffffffffffffffff161461108c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108390612bbb565b60405180910390fd5b565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036111c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b990612c27565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516112b391906120a2565b60405180910390a3505050565b6112cb848484610cce565b6112d784848484611635565b611316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130d90612cb9565b60405180910390fd5b50505050565b606061132782610b2d565b6000600660008481526020019081526020016000208054611347906126d4565b80601f0160208091040260200160405190810160405280929190818152602001828054611373906126d4565b80156113c05780601f10611395576101008083540402835291602001916113c0565b820191906000526020600020905b8154815290600101906020018083116113a357829003601f168201915b5050505050905060006113d16117bc565b905060008151036113e6578192505050611429565b60008251111561141b578082604051602001611403929190612d15565b60405160208183030381529060405292505050611429565b611424846117f9565b925050505b919050565b600081600001549050919050565b6001816000016000828254019250508190555050565b61146c828260405180602001604052806000815250611861565b5050565b611479826114dd565b6114b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114af90612dab565b60405180910390fd5b806006600084815260200190815260200160002090816114d89190612f77565b505050565b60008073ffffffffffffffffffffffffffffffffffffffff166114ff83610fd3565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156115875750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115bd906130bb565b60405180910390fd5b6115d684848460019450846118bc565b50505050565b50505050565b6115eb816119e2565b600060066000838152602001908152602001600020805461160b906126d4565b905014611632576006600082815260200190815260200160002060006116319190611f91565b5b50565b60006116568473ffffffffffffffffffffffffffffffffffffffff16611b30565b156117af578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261167f610b78565b8786866040518563ffffffff1660e01b81526004016116a19493929190613130565b6020604051808303816000875af19250505080156116dd57506040513d601f19601f820116820180604052508101906116da9190613191565b60015b61175f573d806000811461170d576040519150601f19603f3d011682016040523d82523d6000602084013e611712565b606091505b506000815103611757576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174e90612cb9565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506117b4565b600190505b949350505050565b60606040518060400160405280601581526020017f68747470733a2f2f697066732e696f2f697066732f0000000000000000000000815250905090565b606061180482610b2d565b600061180e6117bc565b9050600081511161182e5760405180602001604052806000815250611859565b8061183884611b53565b604051602001611849929190612d15565b6040516020818303038152906040525b915050919050565b61186b8383611c21565b6118786000848484611635565b6118b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ae90612cb9565b60405180910390fd5b505050565b60018111156119dc57600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146119505780600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461194891906131ed565b925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146119db5780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119d39190613221565b925050819055505b5b50505050565b60006119ed826106dc565b90506119fd81600084600161151e565b611a06826106dc565b90506004600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611b2c8160008460016115dc565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606060006001611b6284611e3e565b01905060008167ffffffffffffffff811115611b8157611b806123ba565b5b6040519080825280601f01601f191660200182016040528015611bb35781602001600182028036833780820191505090505b509050600082602001820190505b600115611c16578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611c0a57611c09613255565b5b04945060008503611bc1575b819350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c87906132d0565b60405180910390fd5b611c99816114dd565b15611cd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd09061333c565b60405180910390fd5b611ce760008383600161151e565b611cf0816114dd565b15611d30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d279061333c565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611e3a6000838360016115dc565b5050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611e9c577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611e9257611e91613255565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611ed9576d04ee2d6d415b85acef81000000008381611ecf57611ece613255565b5b0492506020810190505b662386f26fc100008310611f0857662386f26fc100008381611efe57611efd613255565b5b0492506010810190505b6305f5e1008310611f31576305f5e1008381611f2757611f26613255565b5b0492506008810190505b6127108310611f56576127108381611f4c57611f4b613255565b5b0492506004810190505b60648310611f795760648381611f6f57611f6e613255565b5b0492506002810190505b600a8310611f88576001810190505b80915050919050565b508054611f9d906126d4565b6000825580601f10611faf5750611fce565b601f016020900490600052602060002090810190611fcd9190611fd1565b5b50565b5b80821115611fea576000816000905550600101611fd2565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61203781612002565b811461204257600080fd5b50565b6000813590506120548161202e565b92915050565b6000602082840312156120705761206f611ff8565b5b600061207e84828501612045565b91505092915050565b60008115159050919050565b61209c81612087565b82525050565b60006020820190506120b76000830184612093565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156120f75780820151818401526020810190506120dc565b60008484015250505050565b6000601f19601f8301169050919050565b600061211f826120bd565b61212981856120c8565b93506121398185602086016120d9565b61214281612103565b840191505092915050565b600060208201905081810360008301526121678184612114565b905092915050565b6000819050919050565b6121828161216f565b811461218d57600080fd5b50565b60008135905061219f81612179565b92915050565b6000602082840312156121bb576121ba611ff8565b5b60006121c984828501612190565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006121fd826121d2565b9050919050565b61220d816121f2565b82525050565b60006020820190506122286000830184612204565b92915050565b612237816121f2565b811461224257600080fd5b50565b6000813590506122548161222e565b92915050565b6000806040838503121561227157612270611ff8565b5b600061227f85828601612245565b925050602061229085828601612190565b9150509250929050565b6000806000606084860312156122b3576122b2611ff8565b5b60006122c186828701612245565b93505060206122d286828701612245565b92505060406122e386828701612190565b9150509250925092565b60006020828403121561230357612302611ff8565b5b600061231184828501612245565b91505092915050565b6123238161216f565b82525050565b600060208201905061233e600083018461231a565b92915050565b61234d81612087565b811461235857600080fd5b50565b60008135905061236a81612344565b92915050565b6000806040838503121561238757612386611ff8565b5b600061239585828601612245565b92505060206123a68582860161235b565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6123f282612103565b810181811067ffffffffffffffff82111715612411576124106123ba565b5b80604052505050565b6000612424611fee565b905061243082826123e9565b919050565b600067ffffffffffffffff8211156124505761244f6123ba565b5b61245982612103565b9050602081019050919050565b82818337600083830152505050565b600061248861248384612435565b61241a565b9050828152602081018484840111156124a4576124a36123b5565b5b6124af848285612466565b509392505050565b600082601f8301126124cc576124cb6123b0565b5b81356124dc848260208601612475565b91505092915050565b600080600080608085870312156124ff576124fe611ff8565b5b600061250d87828801612245565b945050602061251e87828801612245565b935050604061252f87828801612190565b925050606085013567ffffffffffffffff8111156125505761254f611ffd565b5b61255c878288016124b7565b91505092959194509250565b600067ffffffffffffffff821115612583576125826123ba565b5b61258c82612103565b9050602081019050919050565b60006125ac6125a784612568565b61241a565b9050828152602081018484840111156125c8576125c76123b5565b5b6125d3848285612466565b509392505050565b600082601f8301126125f0576125ef6123b0565b5b8135612600848260208601612599565b91505092915050565b600080604083850312156126205761261f611ff8565b5b600061262e85828601612245565b925050602083013567ffffffffffffffff81111561264f5761264e611ffd565b5b61265b858286016125db565b9150509250929050565b6000806040838503121561267c5761267b611ff8565b5b600061268a85828601612245565b925050602061269b85828601612245565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806126ec57607f821691505b6020821081036126ff576126fe6126a5565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006127616021836120c8565b915061276c82612705565b604082019050919050565b6000602082019050818103600083015261279081612754565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b60006127f3603d836120c8565b91506127fe82612797565b604082019050919050565b60006020820190508181036000830152612822816127e6565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b6000612885602d836120c8565b915061289082612829565b604082019050919050565b600060208201905081810360008301526128b481612878565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b60006128f16018836120c8565b91506128fc826128bb565b602082019050919050565b60006020820190508181036000830152612920816128e4565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b60006129836029836120c8565b915061298e82612927565b604082019050919050565b600060208201905081810360008301526129b281612976565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612a156026836120c8565b9150612a20826129b9565b604082019050919050565b60006020820190508181036000830152612a4481612a08565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000612aa76025836120c8565b9150612ab282612a4b565b604082019050919050565b60006020820190508181036000830152612ad681612a9a565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612b396024836120c8565b9150612b4482612add565b604082019050919050565b60006020820190508181036000830152612b6881612b2c565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612ba56020836120c8565b9150612bb082612b6f565b602082019050919050565b60006020820190508181036000830152612bd481612b98565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000612c116019836120c8565b9150612c1c82612bdb565b602082019050919050565b60006020820190508181036000830152612c4081612c04565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000612ca36032836120c8565b9150612cae82612c47565b604082019050919050565b60006020820190508181036000830152612cd281612c96565b9050919050565b600081905092915050565b6000612cef826120bd565b612cf98185612cd9565b9350612d098185602086016120d9565b80840191505092915050565b6000612d218285612ce4565b9150612d2d8284612ce4565b91508190509392505050565b7f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60008201527f6578697374656e7420746f6b656e000000000000000000000000000000000000602082015250565b6000612d95602e836120c8565b9150612da082612d39565b604082019050919050565b60006020820190508181036000830152612dc481612d88565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302612e2d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612df0565b612e378683612df0565b95508019841693508086168417925050509392505050565b6000819050919050565b6000612e74612e6f612e6a8461216f565b612e4f565b61216f565b9050919050565b6000819050919050565b612e8e83612e59565b612ea2612e9a82612e7b565b848454612dfd565b825550505050565b600090565b612eb7612eaa565b612ec2818484612e85565b505050565b5b81811015612ee657612edb600082612eaf565b600181019050612ec8565b5050565b601f821115612f2b57612efc81612dcb565b612f0584612de0565b81016020851015612f14578190505b612f28612f2085612de0565b830182612ec7565b50505b505050565b600082821c905092915050565b6000612f4e60001984600802612f30565b1980831691505092915050565b6000612f678383612f3d565b9150826002028217905092915050565b612f80826120bd565b67ffffffffffffffff811115612f9957612f986123ba565b5b612fa382546126d4565b612fae828285612eea565b600060209050601f831160018114612fe15760008415612fcf578287015190505b612fd98582612f5b565b865550613041565b601f198416612fef86612dcb565b60005b8281101561301757848901518255600182019150602085019450602081019050612ff2565b868310156130345784890151613030601f891682612f3d565b8355505b6001600288020188555050505b505050505050565b7f54686973206120536f756c626f756e6420746f6b656e2e2049742063616e6e6f60008201527f74206265206275726e6564204f52207472616e736665727265642e0000000000602082015250565b60006130a5603b836120c8565b91506130b082613049565b604082019050919050565b600060208201905081810360008301526130d481613098565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613102826130db565b61310c81856130e6565b935061311c8185602086016120d9565b61312581612103565b840191505092915050565b60006080820190506131456000830187612204565b6131526020830186612204565b61315f604083018561231a565b818103606083015261317181846130f7565b905095945050505050565b60008151905061318b8161202e565b92915050565b6000602082840312156131a7576131a6611ff8565b5b60006131b58482850161317c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006131f88261216f565b91506132038361216f565b925082820390508181111561321b5761321a6131be565b5b92915050565b600061322c8261216f565b91506132378361216f565b925082820190508082111561324f5761324e6131be565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b60006132ba6020836120c8565b91506132c582613284565b602082019050919050565b600060208201905081810360008301526132e9816132ad565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000613326601c836120c8565b9150613331826132f0565b602082019050919050565b6000602082019050818103600083015261335581613319565b905091905056fea2646970667358221220f42e20f14e9888a066e7e878ea4f221b3b2c5b4270c12254c6e43750fd24e0f964736f6c63430008120033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x14 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x41766F6C7574696F6E204E465420626164676573000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x3 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x414E420000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 SWAP1 DUP2 PUSH3 0x8F SWAP2 SWAP1 PUSH3 0x412 JUMP JUMPDEST POP DUP1 PUSH1 0x1 SWAP1 DUP2 PUSH3 0xA1 SWAP2 SWAP1 PUSH3 0x412 JUMP JUMPDEST POP POP POP PUSH3 0xC4 PUSH3 0xB8 PUSH3 0xCA PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0xD2 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x4F9 JUMP JUMPDEST PUSH1 0x0 CALLER SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x7 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 PUSH1 0x7 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH3 0x21A JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH3 0x230 JUMPI PUSH3 0x22F PUSH3 0x1D2 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP DUP2 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 PUSH1 0x1F DUP4 ADD DIV SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 SHL SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x8 DUP4 MUL PUSH3 0x29A PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 PUSH3 0x25B JUMP JUMPDEST PUSH3 0x2A6 DUP7 DUP4 PUSH3 0x25B JUMP JUMPDEST SWAP6 POP DUP1 NOT DUP5 AND SWAP4 POP DUP1 DUP7 AND DUP5 OR SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x2F3 PUSH3 0x2ED PUSH3 0x2E7 DUP5 PUSH3 0x2BE JUMP JUMPDEST PUSH3 0x2C8 JUMP JUMPDEST PUSH3 0x2BE JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH3 0x30F DUP4 PUSH3 0x2D2 JUMP JUMPDEST PUSH3 0x327 PUSH3 0x31E DUP3 PUSH3 0x2FA JUMP JUMPDEST DUP5 DUP5 SLOAD PUSH3 0x268 JUMP JUMPDEST DUP3 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 JUMP JUMPDEST PUSH3 0x33E PUSH3 0x32F JUMP JUMPDEST PUSH3 0x34B DUP2 DUP5 DUP5 PUSH3 0x304 JUMP JUMPDEST POP POP POP JUMP JUMPDEST JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x373 JUMPI PUSH3 0x367 PUSH1 0x0 DUP3 PUSH3 0x334 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH3 0x351 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1F DUP3 GT ISZERO PUSH3 0x3C2 JUMPI PUSH3 0x38C DUP2 PUSH3 0x236 JUMP JUMPDEST PUSH3 0x397 DUP5 PUSH3 0x24B JUMP JUMPDEST DUP2 ADD PUSH1 0x20 DUP6 LT ISZERO PUSH3 0x3A7 JUMPI DUP2 SWAP1 POP JUMPDEST PUSH3 0x3BF PUSH3 0x3B6 DUP6 PUSH3 0x24B JUMP JUMPDEST DUP4 ADD DUP3 PUSH3 0x350 JUMP JUMPDEST POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 SHR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x3E7 PUSH1 0x0 NOT DUP5 PUSH1 0x8 MUL PUSH3 0x3C7 JUMP JUMPDEST NOT DUP1 DUP4 AND SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x402 DUP4 DUP4 PUSH3 0x3D4 JUMP JUMPDEST SWAP2 POP DUP3 PUSH1 0x2 MUL DUP3 OR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x41D DUP3 PUSH3 0x198 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH3 0x439 JUMPI PUSH3 0x438 PUSH3 0x1A3 JUMP JUMPDEST JUMPDEST PUSH3 0x445 DUP3 SLOAD PUSH3 0x201 JUMP JUMPDEST PUSH3 0x452 DUP3 DUP3 DUP6 PUSH3 0x377 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 SWAP1 POP PUSH1 0x1F DUP4 GT PUSH1 0x1 DUP2 EQ PUSH3 0x48A JUMPI PUSH1 0x0 DUP5 ISZERO PUSH3 0x475 JUMPI DUP3 DUP8 ADD MLOAD SWAP1 POP JUMPDEST PUSH3 0x481 DUP6 DUP3 PUSH3 0x3F4 JUMP JUMPDEST DUP7 SSTORE POP PUSH3 0x4F1 JUMP JUMPDEST PUSH1 0x1F NOT DUP5 AND PUSH3 0x49A DUP7 PUSH3 0x236 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH3 0x4C4 JUMPI DUP5 DUP10 ADD MLOAD DUP3 SSTORE PUSH1 0x1 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP6 ADD SWAP5 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH3 0x49D JUMP JUMPDEST DUP7 DUP4 LT ISZERO PUSH3 0x4E4 JUMPI DUP5 DUP10 ADD MLOAD PUSH3 0x4E0 PUSH1 0x1F DUP10 AND DUP3 PUSH3 0x3D4 JUMP JUMPDEST DUP4 SSTORE POP JUMPDEST PUSH1 0x1 PUSH1 0x2 DUP9 MUL ADD DUP9 SSTORE POP POP POP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x3392 DUP1 PUSH3 0x509 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x116 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x715018A6 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xB88D4FDE GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xB88D4FDE EQ PUSH2 0x2CB JUMPI DUP1 PUSH4 0xC87B56DD EQ PUSH2 0x2E7 JUMPI DUP1 PUSH4 0xD204C45E EQ PUSH2 0x317 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x333 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x363 JUMPI PUSH2 0x116 JUMP JUMPDEST DUP1 PUSH4 0x715018A6 EQ PUSH2 0x269 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x273 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x291 JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x2AF JUMPI PUSH2 0x116 JUMP JUMPDEST DUP1 PUSH4 0x23B872DD GT PUSH2 0xE9 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1B5 JUMPI DUP1 PUSH4 0x42842E0E EQ PUSH2 0x1D1 JUMPI DUP1 PUSH4 0x42966C68 EQ PUSH2 0x1ED JUMPI DUP1 PUSH4 0x6352211E EQ PUSH2 0x209 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x239 JUMPI PUSH2 0x116 JUMP JUMPDEST DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0x11B JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x14B JUMPI DUP1 PUSH4 0x81812FC EQ PUSH2 0x169 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x199 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x135 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x130 SWAP2 SWAP1 PUSH2 0x205A JUMP JUMPDEST PUSH2 0x37F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x142 SWAP2 SWAP1 PUSH2 0x20A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x153 PUSH2 0x461 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x160 SWAP2 SWAP1 PUSH2 0x214D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x183 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x17E SWAP2 SWAP1 PUSH2 0x21A5 JUMP JUMPDEST PUSH2 0x4F3 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x190 SWAP2 SWAP1 PUSH2 0x2213 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1B3 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x1AE SWAP2 SWAP1 PUSH2 0x225A JUMP JUMPDEST PUSH2 0x539 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1CF PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x1CA SWAP2 SWAP1 PUSH2 0x229A JUMP JUMPDEST PUSH2 0x650 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1EB PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x1E6 SWAP2 SWAP1 PUSH2 0x229A JUMP JUMPDEST PUSH2 0x6B0 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x207 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x202 SWAP2 SWAP1 PUSH2 0x21A5 JUMP JUMPDEST PUSH2 0x6D0 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x223 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x21E SWAP2 SWAP1 PUSH2 0x21A5 JUMP JUMPDEST PUSH2 0x6DC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x230 SWAP2 SWAP1 PUSH2 0x2213 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x253 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x24E SWAP2 SWAP1 PUSH2 0x22ED JUMP JUMPDEST PUSH2 0x762 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x260 SWAP2 SWAP1 PUSH2 0x2329 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x271 PUSH2 0x819 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x27B PUSH2 0x82D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x288 SWAP2 SWAP1 PUSH2 0x2213 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x299 PUSH2 0x857 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x2A6 SWAP2 SWAP1 PUSH2 0x214D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2C9 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x2C4 SWAP2 SWAP1 PUSH2 0x2370 JUMP JUMPDEST PUSH2 0x8E9 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x2E5 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x2E0 SWAP2 SWAP1 PUSH2 0x24E5 JUMP JUMPDEST PUSH2 0x8FF JUMP JUMPDEST STOP JUMPDEST PUSH2 0x301 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x2FC SWAP2 SWAP1 PUSH2 0x21A5 JUMP JUMPDEST PUSH2 0x961 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x30E SWAP2 SWAP1 PUSH2 0x214D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x331 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x32C SWAP2 SWAP1 PUSH2 0x2609 JUMP JUMPDEST PUSH2 0x973 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x34D PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x348 SWAP2 SWAP1 PUSH2 0x2665 JUMP JUMPDEST PUSH2 0x9AC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x35A SWAP2 SWAP1 PUSH2 0x20A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x37D PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x378 SWAP2 SWAP1 PUSH2 0x22ED JUMP JUMPDEST PUSH2 0xA40 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 PUSH32 0x80AC58CD00000000000000000000000000000000000000000000000000000000 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP3 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND EQ DUP1 PUSH2 0x44A JUMPI POP PUSH32 0x5B5E139F00000000000000000000000000000000000000000000000000000000 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP3 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND EQ JUMPDEST DUP1 PUSH2 0x45A JUMPI POP PUSH2 0x459 DUP3 PUSH2 0xAC3 JUMP JUMPDEST JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 SLOAD PUSH2 0x470 SWAP1 PUSH2 0x26D4 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x49C SWAP1 PUSH2 0x26D4 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x4E9 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BE JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4E9 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4CC JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4FE DUP3 PUSH2 0xB2D JUMP JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x544 DUP3 PUSH2 0x6DC JUMP JUMPDEST SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x5B4 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5AB SWAP1 PUSH2 0x2777 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x5D3 PUSH2 0xB78 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x602 JUMPI POP PUSH2 0x601 DUP2 PUSH2 0x5FC PUSH2 0xB78 JUMP JUMPDEST PUSH2 0x9AC JUMP JUMPDEST JUMPDEST PUSH2 0x641 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x638 SWAP1 PUSH2 0x2809 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x64B DUP4 DUP4 PUSH2 0xB80 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x661 PUSH2 0x65B PUSH2 0xB78 JUMP JUMPDEST DUP3 PUSH2 0xC39 JUMP JUMPDEST PUSH2 0x6A0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x697 SWAP1 PUSH2 0x289B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x6AB DUP4 DUP4 DUP4 PUSH2 0xCCE JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x6CB DUP4 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x8FF JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x6D9 DUP2 PUSH2 0xFC7 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x6E8 DUP4 PUSH2 0xFD3 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x759 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x750 SWAP1 PUSH2 0x2907 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x7D2 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x7C9 SWAP1 PUSH2 0x2999 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x3 PUSH1 0x0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x821 PUSH2 0x1010 JUMP JUMPDEST PUSH2 0x82B PUSH1 0x0 PUSH2 0x108E JUMP JUMPDEST JUMP JUMPDEST PUSH1 0x0 PUSH1 0x7 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x1 DUP1 SLOAD PUSH2 0x866 SWAP1 PUSH2 0x26D4 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x892 SWAP1 PUSH2 0x26D4 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x8DF JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x8B4 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x8DF JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x8C2 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x8FB PUSH2 0x8F4 PUSH2 0xB78 JUMP JUMPDEST DUP4 DUP4 PUSH2 0x1154 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x910 PUSH2 0x90A PUSH2 0xB78 JUMP JUMPDEST DUP4 PUSH2 0xC39 JUMP JUMPDEST PUSH2 0x94F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x946 SWAP1 PUSH2 0x289B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x95B DUP5 DUP5 DUP5 DUP5 PUSH2 0x12C0 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x96C DUP3 PUSH2 0x131C JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x97B PUSH2 0x1010 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x987 PUSH1 0x8 PUSH2 0x142E JUMP JUMPDEST SWAP1 POP PUSH2 0x993 PUSH1 0x8 PUSH2 0x143C JUMP JUMPDEST PUSH2 0x99D DUP4 DUP3 PUSH2 0x1452 JUMP JUMPDEST PUSH2 0x9A7 DUP2 DUP4 PUSH2 0x1470 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x5 PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xA48 PUSH2 0x1010 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xAB7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xAAE SWAP1 PUSH2 0x2A2B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xAC0 DUP2 PUSH2 0x108E JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x1FFC9A700000000000000000000000000000000000000000000000000000000 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP3 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND EQ SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xB36 DUP2 PUSH2 0x14DD JUMP JUMPDEST PUSH2 0xB75 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xB6C SWAP1 PUSH2 0x2907 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 CALLER SWAP1 POP SWAP1 JUMP JUMPDEST DUP2 PUSH1 0x4 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xBF3 DUP4 PUSH2 0x6DC JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC45 DUP4 PUSH2 0x6DC JUMP JUMPDEST SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0xC87 JUMPI POP PUSH2 0xC86 DUP2 DUP6 PUSH2 0x9AC JUMP JUMPDEST JUMPDEST DUP1 PUSH2 0xCC5 JUMPI POP DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xCAD DUP5 PUSH2 0x4F3 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xCEE DUP3 PUSH2 0x6DC JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xD44 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD3B SWAP1 PUSH2 0x2ABD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xDB3 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xDAA SWAP1 PUSH2 0x2B4F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xDC0 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0x151E JUMP JUMPDEST DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xDE0 DUP3 PUSH2 0x6DC JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xE36 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE2D SWAP1 PUSH2 0x2ABD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE PUSH1 0x1 PUSH1 0x3 PUSH1 0x0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x1 PUSH1 0x3 PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP2 PUSH1 0x2 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xFC2 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0x15DC JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xFD0 DUP2 PUSH2 0x15E2 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1018 PUSH2 0xB78 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x1036 PUSH2 0x82D JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x108C JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1083 SWAP1 PUSH2 0x2BBB JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST PUSH1 0x0 PUSH1 0x7 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 PUSH1 0x7 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x11C2 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x11B9 SWAP1 PUSH2 0x2C27 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x5 PUSH1 0x0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 DUP4 PUSH1 0x40 MLOAD PUSH2 0x12B3 SWAP2 SWAP1 PUSH2 0x20A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH2 0x12CB DUP5 DUP5 DUP5 PUSH2 0xCCE JUMP JUMPDEST PUSH2 0x12D7 DUP5 DUP5 DUP5 DUP5 PUSH2 0x1635 JUMP JUMPDEST PUSH2 0x1316 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x130D SWAP1 PUSH2 0x2CB9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1327 DUP3 PUSH2 0xB2D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x6 PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP1 SLOAD PUSH2 0x1347 SWAP1 PUSH2 0x26D4 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x1373 SWAP1 PUSH2 0x26D4 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x13C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1395 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x13C0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x13A3 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP PUSH1 0x0 PUSH2 0x13D1 PUSH2 0x17BC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 MLOAD SUB PUSH2 0x13E6 JUMPI DUP2 SWAP3 POP POP POP PUSH2 0x1429 JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD GT ISZERO PUSH2 0x141B JUMPI DUP1 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1403 SWAP3 SWAP2 SWAP1 PUSH2 0x2D15 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP3 POP POP POP PUSH2 0x1429 JUMP JUMPDEST PUSH2 0x1424 DUP5 PUSH2 0x17F9 JUMP JUMPDEST SWAP3 POP POP POP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 ADD SLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x0 ADD PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH2 0x146C DUP3 DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1861 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x1479 DUP3 PUSH2 0x14DD JUMP JUMPDEST PUSH2 0x14B8 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x14AF SWAP1 PUSH2 0x2DAB JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x6 PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 DUP2 PUSH2 0x14D8 SWAP2 SWAP1 PUSH2 0x2F77 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x14FF DUP4 PUSH2 0xFD3 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 ISZERO PUSH2 0x1587 JUMPI POP PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO JUMPDEST PUSH2 0x15C6 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x15BD SWAP1 PUSH2 0x30BB JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x15D6 DUP5 DUP5 DUP5 PUSH1 0x1 SWAP5 POP DUP5 PUSH2 0x18BC JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0x15EB DUP2 PUSH2 0x19E2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x6 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP1 SLOAD PUSH2 0x160B SWAP1 PUSH2 0x26D4 JUMP JUMPDEST SWAP1 POP EQ PUSH2 0x1632 JUMPI PUSH1 0x6 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x1631 SWAP2 SWAP1 PUSH2 0x1F91 JUMP JUMPDEST JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1656 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x1B30 JUMP JUMPDEST ISZERO PUSH2 0x17AF JUMPI DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x150B7A02 PUSH2 0x167F PUSH2 0xB78 JUMP JUMPDEST DUP8 DUP7 DUP7 PUSH1 0x40 MLOAD DUP6 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x16A1 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3130 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x16DD JUMPI POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x16DA SWAP2 SWAP1 PUSH2 0x3191 JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x175F JUMPI RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x170D JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1712 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP PUSH1 0x0 DUP2 MLOAD SUB PUSH2 0x1757 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174E SWAP1 PUSH2 0x2CB9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 MLOAD DUP2 PUSH1 0x20 ADD REVERT JUMPDEST PUSH4 0x150B7A02 PUSH1 0xE0 SHL PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND EQ SWAP2 POP POP PUSH2 0x17B4 JUMP JUMPDEST PUSH1 0x1 SWAP1 POP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x15 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x68747470733A2F2F697066732E696F2F697066732F0000000000000000000000 DUP2 MSTORE POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1804 DUP3 PUSH2 0xB2D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x180E PUSH2 0x17BC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 MLOAD GT PUSH2 0x182E JUMPI PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1859 JUMP JUMPDEST DUP1 PUSH2 0x1838 DUP5 PUSH2 0x1B53 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1849 SWAP3 SWAP2 SWAP1 PUSH2 0x2D15 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE JUMPDEST SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x186B DUP4 DUP4 PUSH2 0x1C21 JUMP JUMPDEST PUSH2 0x1878 PUSH1 0x0 DUP5 DUP5 DUP5 PUSH2 0x1635 JUMP JUMPDEST PUSH2 0x18B7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x18AE SWAP1 PUSH2 0x2CB9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x19DC JUMPI PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x1950 JUMPI DUP1 PUSH1 0x3 PUSH1 0x0 DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x1948 SWAP2 SWAP1 PUSH2 0x31ED JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x19DB JUMPI DUP1 PUSH1 0x3 PUSH1 0x0 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x19D3 SWAP2 SWAP1 PUSH2 0x3221 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP JUMPDEST JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19ED DUP3 PUSH2 0x6DC JUMP JUMPDEST SWAP1 POP PUSH2 0x19FD DUP2 PUSH1 0x0 DUP5 PUSH1 0x1 PUSH2 0x151E JUMP JUMPDEST PUSH2 0x1A06 DUP3 PUSH2 0x6DC JUMP JUMPDEST SWAP1 POP PUSH1 0x4 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE PUSH1 0x1 PUSH1 0x3 PUSH1 0x0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD SUB SWAP3 POP POP DUP2 SWAP1 SSTORE POP PUSH1 0x2 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE DUP2 PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0x1B2C DUP2 PUSH1 0x0 DUP5 PUSH1 0x1 PUSH2 0x15DC JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EXTCODESIZE GT SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH1 0x1 PUSH2 0x1B62 DUP5 PUSH2 0x1E3E JUMP JUMPDEST ADD SWAP1 POP PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1B81 JUMPI PUSH2 0x1B80 PUSH2 0x23BA JUMP JUMPDEST JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1BB3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x1 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY DUP1 DUP3 ADD SWAP2 POP POP SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP3 PUSH1 0x20 ADD DUP3 ADD SWAP1 POP JUMPDEST PUSH1 0x1 ISZERO PUSH2 0x1C16 JUMPI DUP1 DUP1 PUSH1 0x1 SWAP1 SUB SWAP2 POP POP PUSH32 0x3031323334353637383961626364656600000000000000000000000000000000 PUSH1 0xA DUP7 MOD BYTE DUP2 MSTORE8 PUSH1 0xA DUP6 DUP2 PUSH2 0x1C0A JUMPI PUSH2 0x1C09 PUSH2 0x3255 JUMP JUMPDEST JUMPDEST DIV SWAP5 POP PUSH1 0x0 DUP6 SUB PUSH2 0x1BC1 JUMPI JUMPDEST DUP2 SWAP4 POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x1C90 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1C87 SWAP1 PUSH2 0x32D0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1C99 DUP2 PUSH2 0x14DD JUMP JUMPDEST ISZERO PUSH2 0x1CD9 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1CD0 SWAP1 PUSH2 0x333C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x1CE7 PUSH1 0x0 DUP4 DUP4 PUSH1 0x1 PUSH2 0x151E JUMP JUMPDEST PUSH2 0x1CF0 DUP2 PUSH2 0x14DD JUMP JUMPDEST ISZERO PUSH2 0x1D30 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1D27 SWAP1 PUSH2 0x333C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x3 PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP2 PUSH1 0x2 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0x1E3A PUSH1 0x0 DUP4 DUP4 PUSH1 0x1 PUSH2 0x15DC JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 POP PUSH27 0x184F03E93FF9F4DAA797ED6E38ED64BF6A1F010000000000000000 DUP4 LT PUSH2 0x1E9C JUMPI PUSH27 0x184F03E93FF9F4DAA797ED6E38ED64BF6A1F010000000000000000 DUP4 DUP2 PUSH2 0x1E92 JUMPI PUSH2 0x1E91 PUSH2 0x3255 JUMP JUMPDEST JUMPDEST DIV SWAP3 POP PUSH1 0x40 DUP2 ADD SWAP1 POP JUMPDEST PUSH14 0x4EE2D6D415B85ACEF8100000000 DUP4 LT PUSH2 0x1ED9 JUMPI PUSH14 0x4EE2D6D415B85ACEF8100000000 DUP4 DUP2 PUSH2 0x1ECF JUMPI PUSH2 0x1ECE PUSH2 0x3255 JUMP JUMPDEST JUMPDEST DIV SWAP3 POP PUSH1 0x20 DUP2 ADD SWAP1 POP JUMPDEST PUSH7 0x2386F26FC10000 DUP4 LT PUSH2 0x1F08 JUMPI PUSH7 0x2386F26FC10000 DUP4 DUP2 PUSH2 0x1EFE JUMPI PUSH2 0x1EFD PUSH2 0x3255 JUMP JUMPDEST JUMPDEST DIV SWAP3 POP PUSH1 0x10 DUP2 ADD SWAP1 POP JUMPDEST PUSH4 0x5F5E100 DUP4 LT PUSH2 0x1F31 JUMPI PUSH4 0x5F5E100 DUP4 DUP2 PUSH2 0x1F27 JUMPI PUSH2 0x1F26 PUSH2 0x3255 JUMP JUMPDEST JUMPDEST DIV SWAP3 POP PUSH1 0x8 DUP2 ADD SWAP1 POP JUMPDEST PUSH2 0x2710 DUP4 LT PUSH2 0x1F56 JUMPI PUSH2 0x2710 DUP4 DUP2 PUSH2 0x1F4C JUMPI PUSH2 0x1F4B PUSH2 0x3255 JUMP JUMPDEST JUMPDEST DIV SWAP3 POP PUSH1 0x4 DUP2 ADD SWAP1 POP JUMPDEST PUSH1 0x64 DUP4 LT PUSH2 0x1F79 JUMPI PUSH1 0x64 DUP4 DUP2 PUSH2 0x1F6F JUMPI PUSH2 0x1F6E PUSH2 0x3255 JUMP JUMPDEST JUMPDEST DIV SWAP3 POP PUSH1 0x2 DUP2 ADD SWAP1 POP JUMPDEST PUSH1 0xA DUP4 LT PUSH2 0x1F88 JUMPI PUSH1 0x1 DUP2 ADD SWAP1 POP JUMPDEST DUP1 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST POP DUP1 SLOAD PUSH2 0x1F9D SWAP1 PUSH2 0x26D4 JUMP JUMPDEST PUSH1 0x0 DUP3 SSTORE DUP1 PUSH1 0x1F LT PUSH2 0x1FAF JUMPI POP PUSH2 0x1FCE JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP1 PUSH2 0x1FCD SWAP2 SWAP1 PUSH2 0x1FD1 JUMP JUMPDEST JUMPDEST POP JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1FEA JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x1FD2 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2037 DUP2 PUSH2 0x2002 JUMP JUMPDEST DUP2 EQ PUSH2 0x2042 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x2054 DUP2 PUSH2 0x202E JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2070 JUMPI PUSH2 0x206F PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x207E DUP5 DUP3 DUP6 ADD PUSH2 0x2045 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 ISZERO ISZERO SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x209C DUP2 PUSH2 0x2087 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x20B7 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x2093 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x20F7 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x20DC JUMP JUMPDEST PUSH1 0x0 DUP5 DUP5 ADD MSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x211F DUP3 PUSH2 0x20BD JUMP JUMPDEST PUSH2 0x2129 DUP2 DUP6 PUSH2 0x20C8 JUMP JUMPDEST SWAP4 POP PUSH2 0x2139 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x20D9 JUMP JUMPDEST PUSH2 0x2142 DUP2 PUSH2 0x2103 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2167 DUP2 DUP5 PUSH2 0x2114 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2182 DUP2 PUSH2 0x216F JUMP JUMPDEST DUP2 EQ PUSH2 0x218D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x219F DUP2 PUSH2 0x2179 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x21BB JUMPI PUSH2 0x21BA PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x21C9 DUP5 DUP3 DUP6 ADD PUSH2 0x2190 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x21FD DUP3 PUSH2 0x21D2 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x220D DUP2 PUSH2 0x21F2 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2228 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x2204 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2237 DUP2 PUSH2 0x21F2 JUMP JUMPDEST DUP2 EQ PUSH2 0x2242 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x2254 DUP2 PUSH2 0x222E JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x2271 JUMPI PUSH2 0x2270 PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x227F DUP6 DUP3 DUP7 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x2290 DUP6 DUP3 DUP7 ADD PUSH2 0x2190 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x22B3 JUMPI PUSH2 0x22B2 PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x22C1 DUP7 DUP3 DUP8 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP4 POP POP PUSH1 0x20 PUSH2 0x22D2 DUP7 DUP3 DUP8 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 PUSH2 0x22E3 DUP7 DUP3 DUP8 ADD PUSH2 0x2190 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2303 JUMPI PUSH2 0x2302 PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x2311 DUP5 DUP3 DUP6 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2323 DUP2 PUSH2 0x216F JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x233E PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x231A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x234D DUP2 PUSH2 0x2087 JUMP JUMPDEST DUP2 EQ PUSH2 0x2358 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x236A DUP2 PUSH2 0x2344 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x2387 JUMPI PUSH2 0x2386 PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x2395 DUP6 DUP3 DUP7 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x23A6 DUP6 DUP3 DUP7 ADD PUSH2 0x235B JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x23F2 DUP3 PUSH2 0x2103 JUMP JUMPDEST DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x2411 JUMPI PUSH2 0x2410 PUSH2 0x23BA JUMP JUMPDEST JUMPDEST DUP1 PUSH1 0x40 MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2424 PUSH2 0x1FEE JUMP JUMPDEST SWAP1 POP PUSH2 0x2430 DUP3 DUP3 PUSH2 0x23E9 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x2450 JUMPI PUSH2 0x244F PUSH2 0x23BA JUMP JUMPDEST JUMPDEST PUSH2 0x2459 DUP3 PUSH2 0x2103 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY PUSH1 0x0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2488 PUSH2 0x2483 DUP5 PUSH2 0x2435 JUMP JUMPDEST PUSH2 0x241A JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH2 0x24A4 JUMPI PUSH2 0x24A3 PUSH2 0x23B5 JUMP JUMPDEST JUMPDEST PUSH2 0x24AF DUP5 DUP3 DUP6 PUSH2 0x2466 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x24CC JUMPI PUSH2 0x24CB PUSH2 0x23B0 JUMP JUMPDEST JUMPDEST DUP2 CALLDATALOAD PUSH2 0x24DC DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH2 0x2475 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x24FF JUMPI PUSH2 0x24FE PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x250D DUP8 DUP3 DUP9 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP5 POP POP PUSH1 0x20 PUSH2 0x251E DUP8 DUP3 DUP9 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP4 POP POP PUSH1 0x40 PUSH2 0x252F DUP8 DUP3 DUP9 ADD PUSH2 0x2190 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2550 JUMPI PUSH2 0x254F PUSH2 0x1FFD JUMP JUMPDEST JUMPDEST PUSH2 0x255C DUP8 DUP3 DUP9 ADD PUSH2 0x24B7 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x2583 JUMPI PUSH2 0x2582 PUSH2 0x23BA JUMP JUMPDEST JUMPDEST PUSH2 0x258C DUP3 PUSH2 0x2103 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x25AC PUSH2 0x25A7 DUP5 PUSH2 0x2568 JUMP JUMPDEST PUSH2 0x241A JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH2 0x25C8 JUMPI PUSH2 0x25C7 PUSH2 0x23B5 JUMP JUMPDEST JUMPDEST PUSH2 0x25D3 DUP5 DUP3 DUP6 PUSH2 0x2466 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x25F0 JUMPI PUSH2 0x25EF PUSH2 0x23B0 JUMP JUMPDEST JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2600 DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH2 0x2599 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x2620 JUMPI PUSH2 0x261F PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x262E DUP6 DUP3 DUP7 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x264F JUMPI PUSH2 0x264E PUSH2 0x1FFD JUMP JUMPDEST JUMPDEST PUSH2 0x265B DUP6 DUP3 DUP7 ADD PUSH2 0x25DB JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x267C JUMPI PUSH2 0x267B PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x268A DUP6 DUP3 DUP7 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x269B DUP6 DUP3 DUP7 ADD PUSH2 0x2245 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x26EC JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x26FF JUMPI PUSH2 0x26FE PUSH2 0x26A5 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A20617070726F76616C20746F2063757272656E74206F776E65 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x7200000000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2761 PUSH1 0x21 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x276C DUP3 PUSH2 0x2705 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2790 DUP2 PUSH2 0x2754 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A20617070726F76652063616C6C6572206973206E6F7420746F PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x6B656E206F776E6572206F7220617070726F76656420666F7220616C6C000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x27F3 PUSH1 0x3D DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x27FE DUP3 PUSH2 0x2797 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2822 DUP2 PUSH2 0x27E6 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A2063616C6C6572206973206E6F7420746F6B656E206F776E65 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x72206F7220617070726F76656400000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2885 PUSH1 0x2D DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x2890 DUP3 PUSH2 0x2829 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x28B4 DUP2 PUSH2 0x2878 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A20696E76616C696420746F6B656E2049440000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x28F1 PUSH1 0x18 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x28FC DUP3 PUSH2 0x28BB JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2920 DUP2 PUSH2 0x28E4 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A2061646472657373207A65726F206973206E6F742061207661 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x6C6964206F776E65720000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2983 PUSH1 0x29 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x298E DUP3 PUSH2 0x2927 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x29B2 DUP2 PUSH2 0x2976 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4F776E61626C653A206E6577206F776E657220697320746865207A65726F2061 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x6464726573730000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2A15 PUSH1 0x26 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x2A20 DUP3 PUSH2 0x29B9 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2A44 DUP2 PUSH2 0x2A08 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A207472616E736665722066726F6D20696E636F727265637420 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x6F776E6572000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2AA7 PUSH1 0x25 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x2AB2 DUP3 PUSH2 0x2A4B JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2AD6 DUP2 PUSH2 0x2A9A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A207472616E7366657220746F20746865207A65726F20616464 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x7265737300000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2B39 PUSH1 0x24 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x2B44 DUP3 PUSH2 0x2ADD JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2B68 DUP2 PUSH2 0x2B2C JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4F776E61626C653A2063616C6C6572206973206E6F7420746865206F776E6572 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2BA5 PUSH1 0x20 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x2BB0 DUP3 PUSH2 0x2B6F JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2BD4 DUP2 PUSH2 0x2B98 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A20617070726F766520746F2063616C6C657200000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C11 PUSH1 0x19 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x2C1C DUP3 PUSH2 0x2BDB JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2C40 DUP2 PUSH2 0x2C04 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A207472616E7366657220746F206E6F6E204552433732315265 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x63656976657220696D706C656D656E7465720000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2CA3 PUSH1 0x32 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x2CAE DUP3 PUSH2 0x2C47 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2CD2 DUP2 PUSH2 0x2C96 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2CEF DUP3 PUSH2 0x20BD JUMP JUMPDEST PUSH2 0x2CF9 DUP2 DUP6 PUSH2 0x2CD9 JUMP JUMPDEST SWAP4 POP PUSH2 0x2D09 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x20D9 JUMP JUMPDEST DUP1 DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2D21 DUP3 DUP6 PUSH2 0x2CE4 JUMP JUMPDEST SWAP2 POP PUSH2 0x2D2D DUP3 DUP5 PUSH2 0x2CE4 JUMP JUMPDEST SWAP2 POP DUP2 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH32 0x45524337323155524953746F726167653A2055524920736574206F66206E6F6E PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x6578697374656E7420746F6B656E000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2D95 PUSH1 0x2E DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x2DA0 DUP3 PUSH2 0x2D39 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2DC4 DUP2 PUSH2 0x2D88 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP DUP2 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 PUSH1 0x1F DUP4 ADD DIV SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 SHL SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x8 DUP4 MUL PUSH2 0x2E2D PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 PUSH2 0x2DF0 JUMP JUMPDEST PUSH2 0x2E37 DUP7 DUP4 PUSH2 0x2DF0 JUMP JUMPDEST SWAP6 POP DUP1 NOT DUP5 AND SWAP4 POP DUP1 DUP7 AND DUP5 OR SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E74 PUSH2 0x2E6F PUSH2 0x2E6A DUP5 PUSH2 0x216F JUMP JUMPDEST PUSH2 0x2E4F JUMP JUMPDEST PUSH2 0x216F JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2E8E DUP4 PUSH2 0x2E59 JUMP JUMPDEST PUSH2 0x2EA2 PUSH2 0x2E9A DUP3 PUSH2 0x2E7B JUMP JUMPDEST DUP5 DUP5 SLOAD PUSH2 0x2DFD JUMP JUMPDEST DUP3 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 JUMP JUMPDEST PUSH2 0x2EB7 PUSH2 0x2EAA JUMP JUMPDEST PUSH2 0x2EC2 DUP2 DUP5 DUP5 PUSH2 0x2E85 JUMP JUMPDEST POP POP POP JUMP JUMPDEST JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x2EE6 JUMPI PUSH2 0x2EDB PUSH1 0x0 DUP3 PUSH2 0x2EAF JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x2EC8 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1F DUP3 GT ISZERO PUSH2 0x2F2B JUMPI PUSH2 0x2EFC DUP2 PUSH2 0x2DCB JUMP JUMPDEST PUSH2 0x2F05 DUP5 PUSH2 0x2DE0 JUMP JUMPDEST DUP2 ADD PUSH1 0x20 DUP6 LT ISZERO PUSH2 0x2F14 JUMPI DUP2 SWAP1 POP JUMPDEST PUSH2 0x2F28 PUSH2 0x2F20 DUP6 PUSH2 0x2DE0 JUMP JUMPDEST DUP4 ADD DUP3 PUSH2 0x2EC7 JUMP JUMPDEST POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 SHR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2F4E PUSH1 0x0 NOT DUP5 PUSH1 0x8 MUL PUSH2 0x2F30 JUMP JUMPDEST NOT DUP1 DUP4 AND SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2F67 DUP4 DUP4 PUSH2 0x2F3D JUMP JUMPDEST SWAP2 POP DUP3 PUSH1 0x2 MUL DUP3 OR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2F80 DUP3 PUSH2 0x20BD JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2F99 JUMPI PUSH2 0x2F98 PUSH2 0x23BA JUMP JUMPDEST JUMPDEST PUSH2 0x2FA3 DUP3 SLOAD PUSH2 0x26D4 JUMP JUMPDEST PUSH2 0x2FAE DUP3 DUP3 DUP6 PUSH2 0x2EEA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 SWAP1 POP PUSH1 0x1F DUP4 GT PUSH1 0x1 DUP2 EQ PUSH2 0x2FE1 JUMPI PUSH1 0x0 DUP5 ISZERO PUSH2 0x2FCF JUMPI DUP3 DUP8 ADD MLOAD SWAP1 POP JUMPDEST PUSH2 0x2FD9 DUP6 DUP3 PUSH2 0x2F5B JUMP JUMPDEST DUP7 SSTORE POP PUSH2 0x3041 JUMP JUMPDEST PUSH1 0x1F NOT DUP5 AND PUSH2 0x2FEF DUP7 PUSH2 0x2DCB JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x3017 JUMPI DUP5 DUP10 ADD MLOAD DUP3 SSTORE PUSH1 0x1 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP6 ADD SWAP5 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x2FF2 JUMP JUMPDEST DUP7 DUP4 LT ISZERO PUSH2 0x3034 JUMPI DUP5 DUP10 ADD MLOAD PUSH2 0x3030 PUSH1 0x1F DUP10 AND DUP3 PUSH2 0x2F3D JUMP JUMPDEST DUP4 SSTORE POP JUMPDEST PUSH1 0x1 PUSH1 0x2 DUP9 MUL ADD DUP9 SSTORE POP POP POP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH32 0x54686973206120536F756C626F756E6420746F6B656E2E2049742063616E6E6F PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x74206265206275726E6564204F52207472616E736665727265642E0000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x30A5 PUSH1 0x3B DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x30B0 DUP3 PUSH2 0x3049 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x30D4 DUP2 PUSH2 0x3098 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3102 DUP3 PUSH2 0x30DB JUMP JUMPDEST PUSH2 0x310C DUP2 DUP6 PUSH2 0x30E6 JUMP JUMPDEST SWAP4 POP PUSH2 0x311C DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x20D9 JUMP JUMPDEST PUSH2 0x3125 DUP2 PUSH2 0x2103 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 ADD SWAP1 POP PUSH2 0x3145 PUSH1 0x0 DUP4 ADD DUP8 PUSH2 0x2204 JUMP JUMPDEST PUSH2 0x3152 PUSH1 0x20 DUP4 ADD DUP7 PUSH2 0x2204 JUMP JUMPDEST PUSH2 0x315F PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x231A JUMP JUMPDEST DUP2 DUP2 SUB PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x3171 DUP2 DUP5 PUSH2 0x30F7 JUMP JUMPDEST SWAP1 POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0x318B DUP2 PUSH2 0x202E JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x31A7 JUMPI PUSH2 0x31A6 PUSH2 0x1FF8 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x31B5 DUP5 DUP3 DUP6 ADD PUSH2 0x317C JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x31F8 DUP3 PUSH2 0x216F JUMP JUMPDEST SWAP2 POP PUSH2 0x3203 DUP4 PUSH2 0x216F JUMP JUMPDEST SWAP3 POP DUP3 DUP3 SUB SWAP1 POP DUP2 DUP2 GT ISZERO PUSH2 0x321B JUMPI PUSH2 0x321A PUSH2 0x31BE JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x322C DUP3 PUSH2 0x216F JUMP JUMPDEST SWAP2 POP PUSH2 0x3237 DUP4 PUSH2 0x216F JUMP JUMPDEST SWAP3 POP DUP3 DUP3 ADD SWAP1 POP DUP1 DUP3 GT ISZERO PUSH2 0x324F JUMPI PUSH2 0x324E PUSH2 0x31BE JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH32 0x4552433732313A206D696E7420746F20746865207A65726F2061646472657373 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x32BA PUSH1 0x20 DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x32C5 DUP3 PUSH2 0x3284 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x32E9 DUP2 PUSH2 0x32AD JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4552433732313A20746F6B656E20616C7265616479206D696E74656400000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3326 PUSH1 0x1C DUP4 PUSH2 0x20C8 JUMP JUMPDEST SWAP2 POP PUSH2 0x3331 DUP3 PUSH2 0x32F0 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x3355 DUP2 PUSH2 0x3319 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DELEGATECALL 0x2E KECCAK256 CALL 0x4E SWAP9 DUP9 LOG0 PUSH7 0xE7E878EA4F221B EXTCODESIZE 0x2C JUMPDEST TIMESTAMP PUSH17 0xC12254C6E43750FD24E0F964736F6C6343 STOP ADDMOD SLT STOP CALLER ", | |
"sourceMap": "325:1373:13:-:0;;;484:54;;;;;;;;;;1390:113:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1464:5;1456;:13;;;;;;:::i;:::-;;1489:7;1479;:17;;;;;;:::i;:::-;;1390:113;;936:32:0;955:12;:10;;;:12;;:::i;:::-;936:18;;;:32;;:::i;:::-;325:1373:13;;640:96:7;693:7;719:10;712:17;;640:96;:::o;2433:187:0:-;2506:16;2525:6;;;;;;;;;;;2506:25;;2550:8;2541:6;;:17;;;;;;;;;;;;;;;;;;2604:8;2573:40;;2594:8;2573:40;;;;;;;;;;;;2496:124;2433:187;:::o;7:99:14:-;59:6;93:5;87:12;77:22;;7:99;;;:::o;112:180::-;160:77;157:1;150:88;257:4;254:1;247:15;281:4;278:1;271:15;298:180;346:77;343:1;336:88;443:4;440:1;433:15;467:4;464:1;457:15;484:320;528:6;565:1;559:4;555:12;545:22;;612:1;606:4;602:12;633:18;623:81;;689:4;681:6;677:17;667:27;;623:81;751:2;743:6;740:14;720:18;717:38;714:84;;770:18;;:::i;:::-;714:84;535:269;484:320;;;:::o;810:141::-;859:4;882:3;874:11;;905:3;902:1;895:14;939:4;936:1;926:18;918:26;;810:141;;;:::o;957:93::-;994:6;1041:2;1036;1029:5;1025:14;1021:23;1011:33;;957:93;;;:::o;1056:107::-;1100:8;1150:5;1144:4;1140:16;1119:37;;1056:107;;;;:::o;1169:393::-;1238:6;1288:1;1276:10;1272:18;1311:97;1341:66;1330:9;1311:97;:::i;:::-;1429:39;1459:8;1448:9;1429:39;:::i;:::-;1417:51;;1501:4;1497:9;1490:5;1486:21;1477:30;;1550:4;1540:8;1536:19;1529:5;1526:30;1516:40;;1245:317;;1169:393;;;;;:::o;1568:77::-;1605:7;1634:5;1623:16;;1568:77;;;:::o;1651:60::-;1679:3;1700:5;1693:12;;1651:60;;;:::o;1717:142::-;1767:9;1800:53;1818:34;1827:24;1845:5;1827:24;:::i;:::-;1818:34;:::i;:::-;1800:53;:::i;:::-;1787:66;;1717:142;;;:::o;1865:75::-;1908:3;1929:5;1922:12;;1865:75;;;:::o;1946:269::-;2056:39;2087:7;2056:39;:::i;:::-;2117:91;2166:41;2190:16;2166:41;:::i;:::-;2158:6;2151:4;2145:11;2117:91;:::i;:::-;2111:4;2104:105;2022:193;1946:269;;;:::o;2221:73::-;2266:3;2221:73;:::o;2300:189::-;2377:32;;:::i;:::-;2418:65;2476:6;2468;2462:4;2418:65;:::i;:::-;2353:136;2300:189;;:::o;2495:186::-;2555:120;2572:3;2565:5;2562:14;2555:120;;;2626:39;2663:1;2656:5;2626:39;:::i;:::-;2599:1;2592:5;2588:13;2579:22;;2555:120;;;2495:186;;:::o;2687:543::-;2788:2;2783:3;2780:11;2777:446;;;2822:38;2854:5;2822:38;:::i;:::-;2906:29;2924:10;2906:29;:::i;:::-;2896:8;2892:44;3089:2;3077:10;3074:18;3071:49;;;3110:8;3095:23;;3071:49;3133:80;3189:22;3207:3;3189:22;:::i;:::-;3179:8;3175:37;3162:11;3133:80;:::i;:::-;2792:431;;2777:446;2687:543;;;:::o;3236:117::-;3290:8;3340:5;3334:4;3330:16;3309:37;;3236:117;;;;:::o;3359:169::-;3403:6;3436:51;3484:1;3480:6;3472:5;3469:1;3465:13;3436:51;:::i;:::-;3432:56;3517:4;3511;3507:15;3497:25;;3410:118;3359:169;;;;:::o;3533:295::-;3609:4;3755:29;3780:3;3774:4;3755:29;:::i;:::-;3747:37;;3817:3;3814:1;3810:11;3804:4;3801:21;3793:29;;3533:295;;;;:::o;3833:1395::-;3950:37;3983:3;3950:37;:::i;:::-;4052:18;4044:6;4041:30;4038:56;;;4074:18;;:::i;:::-;4038:56;4118:38;4150:4;4144:11;4118:38;:::i;:::-;4203:67;4263:6;4255;4249:4;4203:67;:::i;:::-;4297:1;4321:4;4308:17;;4353:2;4345:6;4342:14;4370:1;4365:618;;;;5027:1;5044:6;5041:77;;;5093:9;5088:3;5084:19;5078:26;5069:35;;5041:77;5144:67;5204:6;5197:5;5144:67;:::i;:::-;5138:4;5131:81;5000:222;4335:887;;4365:618;4417:4;4413:9;4405:6;4401:22;4451:37;4483:4;4451:37;:::i;:::-;4510:1;4524:208;4538:7;4535:1;4532:14;4524:208;;;4617:9;4612:3;4608:19;4602:26;4594:6;4587:42;4668:1;4660:6;4656:14;4646:24;;4715:2;4704:9;4700:18;4687:31;;4561:4;4558:1;4554:12;4549:17;;4524:208;;;4760:6;4751:7;4748:19;4745:179;;;4818:9;4813:3;4809:19;4803:26;4861:48;4903:4;4895:6;4891:17;4880:9;4861:48;:::i;:::-;4853:6;4846:64;4768:156;4745:179;4970:1;4966;4958:6;4954:14;4950:22;4944:4;4937:36;4372:611;;;4335:887;;3925:1303;;;3833:1395;;:::o;325:1373:13:-;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"functionDebugData": { | |
"@_afterTokenTransfer_1056": { | |
"entryPoint": 5596, | |
"id": 1056, | |
"parameterSlots": 4, | |
"returnSlots": 0 | |
}, | |
"@_approve_889": { | |
"entryPoint": 2944, | |
"id": 889, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"@_baseURI_2881": { | |
"entryPoint": 6076, | |
"id": 2881, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
}, | |
"@_beforeTokenTransfer_1043": { | |
"entryPoint": 6332, | |
"id": 1043, | |
"parameterSlots": 4, | |
"returnSlots": 0 | |
}, | |
"@_beforeTokenTransfer_2994": { | |
"entryPoint": 5406, | |
"id": 2994, | |
"parameterSlots": 4, | |
"returnSlots": 0 | |
}, | |
"@_burn_1315": { | |
"entryPoint": 5602, | |
"id": 1315, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"@_burn_2927": { | |
"entryPoint": 4039, | |
"id": 2927, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"@_burn_780": { | |
"entryPoint": 6626, | |
"id": 780, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"@_checkOnERC721Received_997": { | |
"entryPoint": 5685, | |
"id": 997, | |
"parameterSlots": 4, | |
"returnSlots": 1 | |
}, | |
"@_checkOwner_54": { | |
"entryPoint": 4112, | |
"id": 54, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"@_exists_558": { | |
"entryPoint": 5341, | |
"id": 558, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@_isApprovedOrOwner_592": { | |
"entryPoint": 3129, | |
"id": 592, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"@_mint_713": { | |
"entryPoint": 7201, | |
"id": 713, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"@_msgSender_1685": { | |
"entryPoint": 2936, | |
"id": 1685, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
}, | |
"@_ownerOf_540": { | |
"entryPoint": 4051, | |
"id": 540, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@_requireMinted_935": { | |
"entryPoint": 2861, | |
"id": 935, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"@_safeMint_607": { | |
"entryPoint": 5202, | |
"id": 607, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"@_safeMint_636": { | |
"entryPoint": 6241, | |
"id": 636, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"@_safeTransfer_527": { | |
"entryPoint": 4800, | |
"id": 527, | |
"parameterSlots": 4, | |
"returnSlots": 0 | |
}, | |
"@_setApprovalForAll_921": { | |
"entryPoint": 4436, | |
"id": 921, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"@_setTokenURI_1285": { | |
"entryPoint": 5232, | |
"id": 1285, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"@_transferOwnership_111": { | |
"entryPoint": 4238, | |
"id": 111, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"@_transfer_865": { | |
"entryPoint": 3278, | |
"id": 865, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"@approve_369": { | |
"entryPoint": 1337, | |
"id": 369, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"@balanceOf_230": { | |
"entryPoint": 1890, | |
"id": 230, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@burn_2937": { | |
"entryPoint": 1744, | |
"id": 2937, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"@current_1713": { | |
"entryPoint": 5166, | |
"id": 1713, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@getApproved_387": { | |
"entryPoint": 1267, | |
"id": 387, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@increment_1727": { | |
"entryPoint": 5180, | |
"id": 1727, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"@isApprovedForAll_422": { | |
"entryPoint": 2476, | |
"id": 422, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"@isContract_1361": { | |
"entryPoint": 6960, | |
"id": 1361, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@log10_2682": { | |
"entryPoint": 7742, | |
"id": 2682, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@name_268": { | |
"entryPoint": 1121, | |
"id": 268, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
}, | |
"@ownerOf_258": { | |
"entryPoint": 1756, | |
"id": 258, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@owner_40": { | |
"entryPoint": 2093, | |
"id": 40, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
}, | |
"@renounceOwnership_68": { | |
"entryPoint": 2073, | |
"id": 68, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"@safeMint_2912": { | |
"entryPoint": 2419, | |
"id": 2912, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"@safeTransferFrom_468": { | |
"entryPoint": 1712, | |
"id": 468, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"@safeTransferFrom_498": { | |
"entryPoint": 2303, | |
"id": 498, | |
"parameterSlots": 4, | |
"returnSlots": 0 | |
}, | |
"@setApprovalForAll_404": { | |
"entryPoint": 2281, | |
"id": 404, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"@supportsInterface_1967": { | |
"entryPoint": 2755, | |
"id": 1967, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@supportsInterface_206": { | |
"entryPoint": 895, | |
"id": 206, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@symbol_278": { | |
"entryPoint": 2135, | |
"id": 278, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
}, | |
"@toString_1827": { | |
"entryPoint": 6995, | |
"id": 1827, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@tokenURI_1263": { | |
"entryPoint": 4892, | |
"id": 1263, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@tokenURI_2953": { | |
"entryPoint": 2401, | |
"id": 2953, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@tokenURI_317": { | |
"entryPoint": 6137, | |
"id": 317, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"@transferFrom_449": { | |
"entryPoint": 1616, | |
"id": 449, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"@transferOwnership_91": { | |
"entryPoint": 2624, | |
"id": 91, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"abi_decode_available_length_t_bytes_memory_ptr": { | |
"entryPoint": 9333, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 1 | |
}, | |
"abi_decode_available_length_t_string_memory_ptr": { | |
"entryPoint": 9625, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 1 | |
}, | |
"abi_decode_t_address": { | |
"entryPoint": 8773, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_t_bool": { | |
"entryPoint": 9051, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_t_bytes4": { | |
"entryPoint": 8261, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_t_bytes4_fromMemory": { | |
"entryPoint": 12668, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_t_bytes_memory_ptr": { | |
"entryPoint": 9399, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_t_string_memory_ptr": { | |
"entryPoint": 9691, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_t_uint256": { | |
"entryPoint": 8592, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_tuple_t_address": { | |
"entryPoint": 8941, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_tuple_t_addresst_address": { | |
"entryPoint": 9829, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 2 | |
}, | |
"abi_decode_tuple_t_addresst_addresst_uint256": { | |
"entryPoint": 8858, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 3 | |
}, | |
"abi_decode_tuple_t_addresst_addresst_uint256t_bytes_memory_ptr": { | |
"entryPoint": 9445, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 4 | |
}, | |
"abi_decode_tuple_t_addresst_bool": { | |
"entryPoint": 9072, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 2 | |
}, | |
"abi_decode_tuple_t_addresst_string_memory_ptr": { | |
"entryPoint": 9737, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 2 | |
}, | |
"abi_decode_tuple_t_addresst_uint256": { | |
"entryPoint": 8794, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 2 | |
}, | |
"abi_decode_tuple_t_bytes4": { | |
"entryPoint": 8282, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_tuple_t_bytes4_fromMemory": { | |
"entryPoint": 12689, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_decode_tuple_t_uint256": { | |
"entryPoint": 8613, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_address_to_t_address_fromStack": { | |
"entryPoint": 8708, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"abi_encode_t_bool_to_t_bool_fromStack": { | |
"entryPoint": 8339, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_fromStack": { | |
"entryPoint": 12535, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 8468, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack": { | |
"entryPoint": 11492, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_12a8e5623d251e191fe4a291d9a59bcc01a4db7a1f5c20fc8de44358c18308af_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 10360, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_1e766a06da43a53d0f4c380e06e5a342e14d5af1bf8501996c844905530ca84e_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 11414, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 10760, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_277f8ee9d5b4fc3c4149386f24de0fc1bbc63a8210e2197bfd1c0376a2ac5f48_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 10906, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_2a63ce106ef95058ed21fd07c42a10f11dc5c32ac13a4e847923f7759f635d57_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 13081, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_455fea98ea03c32d7dd1a6f1426917d80529bf47b3ccbde74e7206e889e709f4_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 11052, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_45fe4329685be5ecd250fd0e6a25aea0ea4d0e30fb6a73c118b95749e6d70d05_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 11268, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_6d05c90094f31cfeb8f0eb86f0a513af3f7f8992991fbde41b08aa7960677159_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 10614, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_7521de1f20ce4d7bb86b61090bad73a87315a1f4baff36cc352901c7777280c4_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 11656, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_8a66f4bb6512ffbfcc3db9b42318eb65f26ac15163eaa9a1e5cfa7bee9d1c7c6_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 12973, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 11160, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_b08d2b0fec7cc108ab049809a8beb42779d969a49299d0c317c907d9db22974f_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 10468, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_b51b4875eede07862961e8f9365c6749f5fe55c6ee5d7a9e42b6912ad0b15942_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 10068, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_c6e14a63ffb144eeef7cce6988e5dce07c60a7e0a7b1ef25dbe18c61483e0a83_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 10214, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_stringliteral_e573ab5d1d5e7f8950578b6ec2a42dc51c71ff19c36ac00425a9ff4e985aeaff_to_t_string_memory_ptr_fromStack": { | |
"entryPoint": 12440, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_t_uint256_to_t_uint256_fromStack": { | |
"entryPoint": 8986, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"abi_encode_tuple_packed_t_string_memory_ptr_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed": { | |
"entryPoint": 11541, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_address__to_t_address__fromStack_reversed": { | |
"entryPoint": 8723, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_address_t_address_t_uint256_t_bytes_memory_ptr__to_t_address_t_address_t_uint256_t_bytes_memory_ptr__fromStack_reversed": { | |
"entryPoint": 12592, | |
"id": null, | |
"parameterSlots": 5, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed": { | |
"entryPoint": 8354, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 8525, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_12a8e5623d251e191fe4a291d9a59bcc01a4db7a1f5c20fc8de44358c18308af__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 10395, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_1e766a06da43a53d0f4c380e06e5a342e14d5af1bf8501996c844905530ca84e__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 11449, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 10795, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_277f8ee9d5b4fc3c4149386f24de0fc1bbc63a8210e2197bfd1c0376a2ac5f48__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 10941, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_2a63ce106ef95058ed21fd07c42a10f11dc5c32ac13a4e847923f7759f635d57__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 13116, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_455fea98ea03c32d7dd1a6f1426917d80529bf47b3ccbde74e7206e889e709f4__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 11087, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_45fe4329685be5ecd250fd0e6a25aea0ea4d0e30fb6a73c118b95749e6d70d05__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 11303, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_6d05c90094f31cfeb8f0eb86f0a513af3f7f8992991fbde41b08aa7960677159__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 10649, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_7521de1f20ce4d7bb86b61090bad73a87315a1f4baff36cc352901c7777280c4__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 11691, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_8a66f4bb6512ffbfcc3db9b42318eb65f26ac15163eaa9a1e5cfa7bee9d1c7c6__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 13008, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 11195, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_b08d2b0fec7cc108ab049809a8beb42779d969a49299d0c317c907d9db22974f__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 10503, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_b51b4875eede07862961e8f9365c6749f5fe55c6ee5d7a9e42b6912ad0b15942__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 10103, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_c6e14a63ffb144eeef7cce6988e5dce07c60a7e0a7b1ef25dbe18c61483e0a83__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 10249, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_stringliteral_e573ab5d1d5e7f8950578b6ec2a42dc51c71ff19c36ac00425a9ff4e985aeaff__to_t_string_memory_ptr__fromStack_reversed": { | |
"entryPoint": 12475, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { | |
"entryPoint": 9001, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"allocate_memory": { | |
"entryPoint": 9242, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"allocate_unbounded": { | |
"entryPoint": 8174, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
}, | |
"array_allocation_size_t_bytes_memory_ptr": { | |
"entryPoint": 9269, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"array_allocation_size_t_string_memory_ptr": { | |
"entryPoint": 9576, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"array_dataslot_t_string_storage": { | |
"entryPoint": 11723, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"array_length_t_bytes_memory_ptr": { | |
"entryPoint": 12507, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"array_length_t_string_memory_ptr": { | |
"entryPoint": 8381, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"array_storeLengthForEncoding_t_bytes_memory_ptr_fromStack": { | |
"entryPoint": 12518, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": { | |
"entryPoint": 8392, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack": { | |
"entryPoint": 11481, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"checked_add_t_uint256": { | |
"entryPoint": 12833, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"checked_sub_t_uint256": { | |
"entryPoint": 12781, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"clean_up_bytearray_end_slots_t_string_storage": { | |
"entryPoint": 12010, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"cleanup_t_address": { | |
"entryPoint": 8690, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"cleanup_t_bool": { | |
"entryPoint": 8327, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"cleanup_t_bytes4": { | |
"entryPoint": 8194, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"cleanup_t_uint160": { | |
"entryPoint": 8658, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"cleanup_t_uint256": { | |
"entryPoint": 8559, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"clear_storage_range_t_bytes1": { | |
"entryPoint": 11975, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"convert_t_uint256_to_t_uint256": { | |
"entryPoint": 11865, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage": { | |
"entryPoint": 12151, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"copy_calldata_to_memory_with_cleanup": { | |
"entryPoint": 9318, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"copy_memory_to_memory_with_cleanup": { | |
"entryPoint": 8409, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"divide_by_32_ceil": { | |
"entryPoint": 11744, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"extract_byte_array_length": { | |
"entryPoint": 9940, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"extract_used_part_and_set_length_of_short_byte_array": { | |
"entryPoint": 12123, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"finalize_allocation": { | |
"entryPoint": 9193, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"identity": { | |
"entryPoint": 11855, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"mask_bytes_dynamic": { | |
"entryPoint": 12093, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"panic_error_0x11": { | |
"entryPoint": 12734, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"panic_error_0x12": { | |
"entryPoint": 12885, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"panic_error_0x22": { | |
"entryPoint": 9893, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"panic_error_0x41": { | |
"entryPoint": 9146, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"prepare_store_t_uint256": { | |
"entryPoint": 11899, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d": { | |
"entryPoint": 9136, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae": { | |
"entryPoint": 9141, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": { | |
"entryPoint": 8189, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { | |
"entryPoint": 8184, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 0 | |
}, | |
"round_up_to_mul_of_32": { | |
"entryPoint": 8451, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 1 | |
}, | |
"shift_left_dynamic": { | |
"entryPoint": 11760, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"shift_right_unsigned_dynamic": { | |
"entryPoint": 12080, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 1 | |
}, | |
"storage_set_to_zero_t_uint256": { | |
"entryPoint": 11951, | |
"id": null, | |
"parameterSlots": 2, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_12a8e5623d251e191fe4a291d9a59bcc01a4db7a1f5c20fc8de44358c18308af": { | |
"entryPoint": 10281, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_1e766a06da43a53d0f4c380e06e5a342e14d5af1bf8501996c844905530ca84e": { | |
"entryPoint": 11335, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe": { | |
"entryPoint": 10681, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_277f8ee9d5b4fc3c4149386f24de0fc1bbc63a8210e2197bfd1c0376a2ac5f48": { | |
"entryPoint": 10827, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_2a63ce106ef95058ed21fd07c42a10f11dc5c32ac13a4e847923f7759f635d57": { | |
"entryPoint": 13040, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_455fea98ea03c32d7dd1a6f1426917d80529bf47b3ccbde74e7206e889e709f4": { | |
"entryPoint": 10973, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_45fe4329685be5ecd250fd0e6a25aea0ea4d0e30fb6a73c118b95749e6d70d05": { | |
"entryPoint": 11227, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_6d05c90094f31cfeb8f0eb86f0a513af3f7f8992991fbde41b08aa7960677159": { | |
"entryPoint": 10535, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_7521de1f20ce4d7bb86b61090bad73a87315a1f4baff36cc352901c7777280c4": { | |
"entryPoint": 11577, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_8a66f4bb6512ffbfcc3db9b42318eb65f26ac15163eaa9a1e5cfa7bee9d1c7c6": { | |
"entryPoint": 12932, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe": { | |
"entryPoint": 11119, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_b08d2b0fec7cc108ab049809a8beb42779d969a49299d0c317c907d9db22974f": { | |
"entryPoint": 10427, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_b51b4875eede07862961e8f9365c6749f5fe55c6ee5d7a9e42b6912ad0b15942": { | |
"entryPoint": 9989, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_c6e14a63ffb144eeef7cce6988e5dce07c60a7e0a7b1ef25dbe18c61483e0a83": { | |
"entryPoint": 10135, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"store_literal_in_memory_e573ab5d1d5e7f8950578b6ec2a42dc51c71ff19c36ac00425a9ff4e985aeaff": { | |
"entryPoint": 12361, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"update_byte_slice_dynamic32": { | |
"entryPoint": 11773, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 1 | |
}, | |
"update_storage_value_t_uint256_to_t_uint256": { | |
"entryPoint": 11909, | |
"id": null, | |
"parameterSlots": 3, | |
"returnSlots": 0 | |
}, | |
"validator_revert_t_address": { | |
"entryPoint": 8750, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"validator_revert_t_bool": { | |
"entryPoint": 9028, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"validator_revert_t_bytes4": { | |
"entryPoint": 8238, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"validator_revert_t_uint256": { | |
"entryPoint": 8569, | |
"id": null, | |
"parameterSlots": 1, | |
"returnSlots": 0 | |
}, | |
"zero_value_for_split_t_uint256": { | |
"entryPoint": 11946, | |
"id": null, | |
"parameterSlots": 0, | |
"returnSlots": 1 | |
} | |
}, | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:35903:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "47:35:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "57:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "73:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "67:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "67:9:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "57:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "allocate_unbounded", | |
"nodeType": "YulFunctionDefinition", | |
"returnVariables": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "40:6:14", | |
"type": "" | |
} | |
], | |
"src": "7:75:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "177:28:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "194:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "197:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "187:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "187:12:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "187:12:14" | |
} | |
] | |
}, | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulFunctionDefinition", | |
"src": "88:117:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "300:28:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "317:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "320:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "310:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "310:12:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "310:12:14" | |
} | |
] | |
}, | |
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", | |
"nodeType": "YulFunctionDefinition", | |
"src": "211:117:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "378:105:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "388:89:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "403:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "410:66:14", | |
"type": "", | |
"value": "0xffffffff00000000000000000000000000000000000000000000000000000000" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "399:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "399:78:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "388:7:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_bytes4", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "360:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "370:7:14", | |
"type": "" | |
} | |
], | |
"src": "334:149:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "531:78:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "587:16:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "596:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "599:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "589:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "589:12:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "589:12:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "554:5:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "578:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_bytes4", | |
"nodeType": "YulIdentifier", | |
"src": "561:16:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "561:23:14" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "551:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "551:34:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "544:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "544:42:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "541:62:14" | |
} | |
] | |
}, | |
"name": "validator_revert_t_bytes4", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "524:5:14", | |
"type": "" | |
} | |
], | |
"src": "489:120:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "666:86:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "676:29:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "698:6:14" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "685:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "685:20:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "676:5:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "740:5:14" | |
} | |
], | |
"functionName": { | |
"name": "validator_revert_t_bytes4", | |
"nodeType": "YulIdentifier", | |
"src": "714:25:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "714:32:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "714:32:14" | |
} | |
] | |
}, | |
"name": "abi_decode_t_bytes4", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "644:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "652:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "660:5:14", | |
"type": "" | |
} | |
], | |
"src": "615:137:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "823:262:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "869:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "871:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "871:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "871:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "844:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "853:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "840:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "840:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "865:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "836:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "836:32:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "833:119:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "962:116:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "977:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "991:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "981:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1006:62:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "1040:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "1051:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1036:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1036:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "1060:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_bytes4", | |
"nodeType": "YulIdentifier", | |
"src": "1016:19:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1016:52:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "1006:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_bytes4", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "793:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "804:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "816:6:14", | |
"type": "" | |
} | |
], | |
"src": "758:327:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1133:48:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1143:32:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1168:5:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "1161:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1161:13:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "1154:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1154:21:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1143:7:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_bool", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1115:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1125:7:14", | |
"type": "" | |
} | |
], | |
"src": "1091:90:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1246:50:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1263:3:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1283:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_bool", | |
"nodeType": "YulIdentifier", | |
"src": "1268:14:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1268:21:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1256:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1256:34:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1256:34:14" | |
} | |
] | |
}, | |
"name": "abi_encode_t_bool_to_t_bool_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1234:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "1241:3:14", | |
"type": "" | |
} | |
], | |
"src": "1187:109:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1394:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1404:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "1416:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1427:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1412:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1412:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "1404:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "1478:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "1491:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1502:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1487:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1487:17:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_bool_to_t_bool_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "1440:37:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1440:65:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1440:65:14" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "1366:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "1378:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "1389:4:14", | |
"type": "" | |
} | |
], | |
"src": "1302:210:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1577:40:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1588:22:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1604:5:14" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "1598:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1598:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1588:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1560:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1570:6:14", | |
"type": "" | |
} | |
], | |
"src": "1518:99:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1719:73:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1736:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1741:6:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1729:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1729:19:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1729:19:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1757:29:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1776:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1781:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1772:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1772:14:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulIdentifier", | |
"src": "1757:11:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "1691:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1696:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulTypedName", | |
"src": "1707:11:14", | |
"type": "" | |
} | |
], | |
"src": "1623:169:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1860:184:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "1870:10:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1879:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "i", | |
"nodeType": "YulTypedName", | |
"src": "1874:1:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1939:63:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "1964:3:14" | |
}, | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1969:1:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1960:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1960:11:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "1983:3:14" | |
}, | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1988:1:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1979:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1979:11:14" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "1973:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1973:18:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1953:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1953:39:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1953:39:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1900:1:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1903:6:14" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "1897:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1897:13:14" | |
}, | |
"nodeType": "YulForLoop", | |
"post": { | |
"nodeType": "YulBlock", | |
"src": "1911:19:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1913:15:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1922:1:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1925:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1918:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1918:10:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1913:1:14" | |
} | |
] | |
} | |
] | |
}, | |
"pre": { | |
"nodeType": "YulBlock", | |
"src": "1893:3:14", | |
"statements": [] | |
}, | |
"src": "1889:113:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "2022:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "2027:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2018:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2018:16:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2036:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "2011:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2011:27:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2011:27:14" | |
} | |
] | |
}, | |
"name": "copy_memory_to_memory_with_cleanup", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "src", | |
"nodeType": "YulTypedName", | |
"src": "1842:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "dst", | |
"nodeType": "YulTypedName", | |
"src": "1847:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1852:6:14", | |
"type": "" | |
} | |
], | |
"src": "1798:246:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2098:54:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2108:38:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2126:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2133:2:14", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2122:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2122:14:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2142:2:14", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "2138:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2138:7:14" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "2118:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2118:28:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "2108:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2081:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "2091:6:14", | |
"type": "" | |
} | |
], | |
"src": "2050:102:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2250:285:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "2260:53:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2307:5:14" | |
} | |
], | |
"functionName": { | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "2274:32:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2274:39:14" | |
}, | |
"variables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "2264:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2322:78:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "2388:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "2393:6:14" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "2329:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2329:71:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "2322:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2448:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2455:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2444:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2444:16:14" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "2462:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "2467:6:14" | |
} | |
], | |
"functionName": { | |
"name": "copy_memory_to_memory_with_cleanup", | |
"nodeType": "YulIdentifier", | |
"src": "2409:34:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2409:65:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2409:65:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2483:46:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "2494:3:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "2521:6:14" | |
} | |
], | |
"functionName": { | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulIdentifier", | |
"src": "2499:21:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2499:29:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2490:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2490:39:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "2483:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2231:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "2238:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "2246:3:14", | |
"type": "" | |
} | |
], | |
"src": "2158:377:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2659:195:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2669:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "2681:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2692:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2677:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2677:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "2669:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "2716:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2727:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2712:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2712:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "2735:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "2741:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "2731:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2731:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "2705:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2705:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2705:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2761:86:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "2833:6:14" | |
}, | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "2842:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "2769:63:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2769:78:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "2761:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "2631:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "2643:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "2654:4:14", | |
"type": "" | |
} | |
], | |
"src": "2541:313:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2905:32:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2915:16:14", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2926:5:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "2915:7:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2887:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "2897:7:14", | |
"type": "" | |
} | |
], | |
"src": "2860:77:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2986:79:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3043:16:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3052:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3055:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "3045:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3045:12:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "3045:12:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3009:5:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3034:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "3016:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3016:24:14" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "3006:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3006:35:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "2999:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2999:43:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "2996:63:14" | |
} | |
] | |
}, | |
"name": "validator_revert_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2979:5:14", | |
"type": "" | |
} | |
], | |
"src": "2943:122:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3123:87:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3133:29:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "3155:6:14" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "3142:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3142:20:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3133:5:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3198:5:14" | |
} | |
], | |
"functionName": { | |
"name": "validator_revert_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "3171:26:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3171:33:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "3171:33:14" | |
} | |
] | |
}, | |
"name": "abi_decode_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "3101:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "3109:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "3117:5:14", | |
"type": "" | |
} | |
], | |
"src": "3071:139:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3282:263:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3328:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "3330:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3330:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "3330:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "3303:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "3312:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "3299:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3299:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3324:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "3295:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3295:32:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "3292:119:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "3421:117:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "3436:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3450:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "3440:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3465:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "3500:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "3511:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "3496:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3496:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "3520:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "3475:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3475:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "3465:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "3252:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "3263:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "3275:6:14", | |
"type": "" | |
} | |
], | |
"src": "3216:329:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3596:81:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3606:65:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3621:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3628:42:14", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "3617:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3617:54:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "3606:7:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "3578:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "3588:7:14", | |
"type": "" | |
} | |
], | |
"src": "3551:126:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3728:51:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "3738:35:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3767:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulIdentifier", | |
"src": "3749:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3749:24:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "3738:7:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "3710:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "3720:7:14", | |
"type": "" | |
} | |
], | |
"src": "3683:96:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3850:53:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "3867:3:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3890:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "3872:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3872:24:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "3860:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3860:37:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "3860:37:14" | |
} | |
] | |
}, | |
"name": "abi_encode_t_address_to_t_address_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "3838:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "3845:3:14", | |
"type": "" | |
} | |
], | |
"src": "3785:118:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4007:124:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "4017:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "4029:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4040:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4025:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4025:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "4017:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "4097:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "4110:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4121:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4106:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4106:17:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_address_to_t_address_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "4053:43:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4053:71:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4053:71:14" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "3979:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "3991:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "4002:4:14", | |
"type": "" | |
} | |
], | |
"src": "3909:222:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4180:79:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4237:16:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4246:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4249:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "4239:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4239:12:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4239:12:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "4203:5:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "4228:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "4210:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4210:24:14" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "4200:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4200:35:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "4193:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4193:43:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "4190:63:14" | |
} | |
] | |
}, | |
"name": "validator_revert_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "4173:5:14", | |
"type": "" | |
} | |
], | |
"src": "4137:122:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4317:87:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "4327:29:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "4349:6:14" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "4336:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4336:20:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "4327:5:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "4392:5:14" | |
} | |
], | |
"functionName": { | |
"name": "validator_revert_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "4365:26:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4365:33:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4365:33:14" | |
} | |
] | |
}, | |
"name": "abi_decode_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "4295:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "4303:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "4311:5:14", | |
"type": "" | |
} | |
], | |
"src": "4265:139:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4493:391:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4539:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "4541:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4541:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "4541:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "4514:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "4523:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "4510:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4510:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4535:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "4506:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4506:32:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "4503:119:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "4632:117:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "4647:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4661:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "4651:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "4676:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "4711:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "4722:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4707:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4707:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "4731:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "4686:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4686:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "4676:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "4759:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "4774:16:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "4788:2:14", | |
"type": "", | |
"value": "32" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "4778:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "4804:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "4839:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "4850:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "4835:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4835:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "4859:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "4814:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "4814:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "4804:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_addresst_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "4455:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "4466:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "4478:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "4486:6:14", | |
"type": "" | |
} | |
], | |
"src": "4410:474:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "4990:519:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "5036:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "5038:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5038:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "5038:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "5011:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "5020:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "5007:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5007:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "5032:2:14", | |
"type": "", | |
"value": "96" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "5003:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5003:32:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "5000:119:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "5129:117:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "5144:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "5158:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "5148:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "5173:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "5208:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "5219:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "5204:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5204:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "5228:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "5183:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5183:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "5173:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "5256:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "5271:16:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "5285:2:14", | |
"type": "", | |
"value": "32" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "5275:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "5301:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "5336:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "5347:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "5332:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5332:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "5356:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "5311:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5311:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "5301:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "5384:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "5399:16:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "5413:2:14", | |
"type": "", | |
"value": "64" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "5403:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "5429:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "5464:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "5475:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "5460:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5460:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "5484:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "5439:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5439:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value2", | |
"nodeType": "YulIdentifier", | |
"src": "5429:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_addresst_addresst_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "4944:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "4955:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "4967:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "4975:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value2", | |
"nodeType": "YulTypedName", | |
"src": "4983:6:14", | |
"type": "" | |
} | |
], | |
"src": "4890:619:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "5581:263:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "5627:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "5629:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5629:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "5629:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "5602:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "5611:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "5598:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5598:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "5623:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "5594:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5594:32:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "5591:119:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "5720:117:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "5735:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "5749:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "5739:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "5764:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "5799:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "5810:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "5795:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5795:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "5819:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "5774:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5774:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "5764:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "5551:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "5562:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "5574:6:14", | |
"type": "" | |
} | |
], | |
"src": "5515:329:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "5915:53:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "5932:3:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "5955:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "5937:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5937:24:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "5925:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "5925:37:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "5925:37:14" | |
} | |
] | |
}, | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "5903:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "5910:3:14", | |
"type": "" | |
} | |
], | |
"src": "5850:118:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "6072:124:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "6082:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "6094:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "6105:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "6090:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6090:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "6082:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "6162:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "6175:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "6186:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "6171:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6171:17:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "6118:43:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6118:71:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "6118:71:14" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "6044:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "6056:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "6067:4:14", | |
"type": "" | |
} | |
], | |
"src": "5974:222:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "6242:76:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "6296:16:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "6305:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "6308:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "6298:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6298:12:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "6298:12:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "6265:5:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "6287:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_bool", | |
"nodeType": "YulIdentifier", | |
"src": "6272:14:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6272:21:14" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "6262:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6262:32:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "6255:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6255:40:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "6252:60:14" | |
} | |
] | |
}, | |
"name": "validator_revert_t_bool", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "6235:5:14", | |
"type": "" | |
} | |
], | |
"src": "6202:116:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "6373:84:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "6383:29:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "6405:6:14" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "6392:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6392:20:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "6383:5:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "6445:5:14" | |
} | |
], | |
"functionName": { | |
"name": "validator_revert_t_bool", | |
"nodeType": "YulIdentifier", | |
"src": "6421:23:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6421:30:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "6421:30:14" | |
} | |
] | |
}, | |
"name": "abi_decode_t_bool", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "6351:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "6359:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "6367:5:14", | |
"type": "" | |
} | |
], | |
"src": "6324:133:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "6543:388:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "6589:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "6591:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6591:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "6591:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "6564:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "6573:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "6560:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6560:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "6585:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "6556:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6556:32:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "6553:119:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "6682:117:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "6697:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "6711:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "6701:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "6726:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "6761:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "6772:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "6757:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6757:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "6781:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "6736:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6736:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "6726:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "6809:115:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "6824:16:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "6838:2:14", | |
"type": "", | |
"value": "32" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "6828:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "6854:60:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "6886:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "6897:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "6882:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6882:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "6906:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_bool", | |
"nodeType": "YulIdentifier", | |
"src": "6864:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "6864:50:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "6854:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_addresst_bool", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "6505:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "6516:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "6528:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "6536:6:14", | |
"type": "" | |
} | |
], | |
"src": "6463:468:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "7026:28:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7043:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7046:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "7036:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7036:12:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7036:12:14" | |
} | |
] | |
}, | |
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d", | |
"nodeType": "YulFunctionDefinition", | |
"src": "6937:117:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "7149:28:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7166:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7169:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "7159:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7159:12:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7159:12:14" | |
} | |
] | |
}, | |
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae", | |
"nodeType": "YulFunctionDefinition", | |
"src": "7060:117:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "7211:152:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7228:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7231:77:14", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "7221:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7221:88:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7221:88:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7325:1:14", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7328:4:14", | |
"type": "", | |
"value": "0x41" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "7318:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7318:15:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7318:15:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7349:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7352:4:14", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "7342:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7342:15:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7342:15:14" | |
} | |
] | |
}, | |
"name": "panic_error_0x41", | |
"nodeType": "YulFunctionDefinition", | |
"src": "7183:180:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "7412:238:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "7422:58:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "7444:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "size", | |
"nodeType": "YulIdentifier", | |
"src": "7474:4:14" | |
} | |
], | |
"functionName": { | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulIdentifier", | |
"src": "7452:21:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7452:27:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "7440:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7440:40:14" | |
}, | |
"variables": [ | |
{ | |
"name": "newFreePtr", | |
"nodeType": "YulTypedName", | |
"src": "7426:10:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "7591:22:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x41", | |
"nodeType": "YulIdentifier", | |
"src": "7593:16:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7593:18:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7593:18:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "newFreePtr", | |
"nodeType": "YulIdentifier", | |
"src": "7534:10:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7546:18:14", | |
"type": "", | |
"value": "0xffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "7531:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7531:34:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "newFreePtr", | |
"nodeType": "YulIdentifier", | |
"src": "7570:10:14" | |
}, | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "7582:6:14" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "7567:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7567:22:14" | |
} | |
], | |
"functionName": { | |
"name": "or", | |
"nodeType": "YulIdentifier", | |
"src": "7528:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7528:62:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "7525:88:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7629:2:14", | |
"type": "", | |
"value": "64" | |
}, | |
{ | |
"name": "newFreePtr", | |
"nodeType": "YulIdentifier", | |
"src": "7633:10:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "7622:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7622:22:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7622:22:14" | |
} | |
] | |
}, | |
"name": "finalize_allocation", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "7398:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "size", | |
"nodeType": "YulTypedName", | |
"src": "7406:4:14", | |
"type": "" | |
} | |
], | |
"src": "7369:281:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "7697:88:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "7707:30:14", | |
"value": { | |
"arguments": [], | |
"functionName": { | |
"name": "allocate_unbounded", | |
"nodeType": "YulIdentifier", | |
"src": "7717:18:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7717:20:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "7707:6:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "7766:6:14" | |
}, | |
{ | |
"name": "size", | |
"nodeType": "YulIdentifier", | |
"src": "7774:4:14" | |
} | |
], | |
"functionName": { | |
"name": "finalize_allocation", | |
"nodeType": "YulIdentifier", | |
"src": "7746:19:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7746:33:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7746:33:14" | |
} | |
] | |
}, | |
"name": "allocate_memory", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "size", | |
"nodeType": "YulTypedName", | |
"src": "7681:4:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "7690:6:14", | |
"type": "" | |
} | |
], | |
"src": "7656:129:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "7857:241:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "7962:22:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x41", | |
"nodeType": "YulIdentifier", | |
"src": "7964:16:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7964:18:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "7964:18:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "7934:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "7942:18:14", | |
"type": "", | |
"value": "0xffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "7931:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "7931:30:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "7928:56:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "7994:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "8024:6:14" | |
} | |
], | |
"functionName": { | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulIdentifier", | |
"src": "8002:21:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8002:29:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "size", | |
"nodeType": "YulIdentifier", | |
"src": "7994:4:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "8068:23:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "size", | |
"nodeType": "YulIdentifier", | |
"src": "8080:4:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "8086:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "8076:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8076:15:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "size", | |
"nodeType": "YulIdentifier", | |
"src": "8068:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_allocation_size_t_bytes_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "7841:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "size", | |
"nodeType": "YulTypedName", | |
"src": "7852:4:14", | |
"type": "" | |
} | |
], | |
"src": "7791:307:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "8168:82:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "8191:3:14" | |
}, | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "8196:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "8201:6:14" | |
} | |
], | |
"functionName": { | |
"name": "calldatacopy", | |
"nodeType": "YulIdentifier", | |
"src": "8178:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8178:30:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "8178:30:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "8228:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "8233:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "8224:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8224:16:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "8242:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "8217:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8217:27:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "8217:27:14" | |
} | |
] | |
}, | |
"name": "copy_calldata_to_memory_with_cleanup", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "src", | |
"nodeType": "YulTypedName", | |
"src": "8150:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "dst", | |
"nodeType": "YulTypedName", | |
"src": "8155:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "8160:6:14", | |
"type": "" | |
} | |
], | |
"src": "8104:146:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "8339:340:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "8349:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "8415:6:14" | |
} | |
], | |
"functionName": { | |
"name": "array_allocation_size_t_bytes_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "8374:40:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8374:48:14" | |
} | |
], | |
"functionName": { | |
"name": "allocate_memory", | |
"nodeType": "YulIdentifier", | |
"src": "8358:15:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8358:65:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "8349:5:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "8439:5:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "8446:6:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "8432:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8432:21:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "8432:21:14" | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "8462:27:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "8477:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "8484:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "8473:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8473:16:14" | |
}, | |
"variables": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulTypedName", | |
"src": "8466:3:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "8527:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae", | |
"nodeType": "YulIdentifier", | |
"src": "8529:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8529:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "8529:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "8508:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "8513:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "8504:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8504:16:14" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "8522:3:14" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "8501:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8501:25:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "8498:112:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "8656:3:14" | |
}, | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "8661:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "8666:6:14" | |
} | |
], | |
"functionName": { | |
"name": "copy_calldata_to_memory_with_cleanup", | |
"nodeType": "YulIdentifier", | |
"src": "8619:36:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8619:54:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "8619:54:14" | |
} | |
] | |
}, | |
"name": "abi_decode_available_length_t_bytes_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "src", | |
"nodeType": "YulTypedName", | |
"src": "8312:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "8317:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "8325:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "array", | |
"nodeType": "YulTypedName", | |
"src": "8333:5:14", | |
"type": "" | |
} | |
], | |
"src": "8256:423:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "8759:277:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "8808:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d", | |
"nodeType": "YulIdentifier", | |
"src": "8810:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8810:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "8810:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "8787:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "8795:4:14", | |
"type": "", | |
"value": "0x1f" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "8783:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8783:17:14" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "8802:3:14" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "8779:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8779:27:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "8772:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8772:35:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "8769:122:14" | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "8900:34:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "8927:6:14" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "8914:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8914:20:14" | |
}, | |
"variables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "8904:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "8943:87:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "9003:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "9011:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "8999:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8999:17:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "9018:6:14" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "9026:3:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_available_length_t_bytes_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "8952:46:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "8952:78:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "8943:5:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_t_bytes_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "8737:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "8745:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "array", | |
"nodeType": "YulTypedName", | |
"src": "8753:5:14", | |
"type": "" | |
} | |
], | |
"src": "8698:338:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "9168:817:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "9215:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "9217:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9217:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "9217:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "9189:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "9198:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "9185:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9185:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "9210:3:14", | |
"type": "", | |
"value": "128" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "9181:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9181:33:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "9178:120:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "9308:117:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "9323:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "9337:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "9327:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "9352:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "9387:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "9398:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "9383:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9383:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "9407:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "9362:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9362:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "9352:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "9435:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "9450:16:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "9464:2:14", | |
"type": "", | |
"value": "32" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "9454:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "9480:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "9515:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "9526:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "9511:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9511:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "9535:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "9490:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9490:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "9480:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "9563:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "9578:16:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "9592:2:14", | |
"type": "", | |
"value": "64" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "9582:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "9608:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "9643:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "9654:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "9639:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9639:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "9663:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "9618:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9618:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value2", | |
"nodeType": "YulIdentifier", | |
"src": "9608:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "9691:287:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "9706:46:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "9737:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "9748:2:14", | |
"type": "", | |
"value": "96" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "9733:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9733:18:14" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "9720:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9720:32:14" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "9710:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "9799:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", | |
"nodeType": "YulIdentifier", | |
"src": "9801:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9801:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "9801:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "9771:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "9779:18:14", | |
"type": "", | |
"value": "0xffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "9768:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9768:30:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "9765:117:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "9896:72:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "9940:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "9951:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "9936:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9936:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "9960:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_bytes_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "9906:29:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "9906:62:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value3", | |
"nodeType": "YulIdentifier", | |
"src": "9896:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_addresst_addresst_uint256t_bytes_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "9114:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "9125:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "9137:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "9145:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value2", | |
"nodeType": "YulTypedName", | |
"src": "9153:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value3", | |
"nodeType": "YulTypedName", | |
"src": "9161:6:14", | |
"type": "" | |
} | |
], | |
"src": "9042:943:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "10058:241:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "10163:22:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x41", | |
"nodeType": "YulIdentifier", | |
"src": "10165:16:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10165:18:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "10165:18:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "10135:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "10143:18:14", | |
"type": "", | |
"value": "0xffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "10132:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10132:30:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "10129:56:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "10195:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "10225:6:14" | |
} | |
], | |
"functionName": { | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulIdentifier", | |
"src": "10203:21:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10203:29:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "size", | |
"nodeType": "YulIdentifier", | |
"src": "10195:4:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "10269:23:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "size", | |
"nodeType": "YulIdentifier", | |
"src": "10281:4:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "10287:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "10277:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10277:15:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "size", | |
"nodeType": "YulIdentifier", | |
"src": "10269:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_allocation_size_t_string_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "10042:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "size", | |
"nodeType": "YulTypedName", | |
"src": "10053:4:14", | |
"type": "" | |
} | |
], | |
"src": "9991:308:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "10389:341:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "10399:75:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "10466:6:14" | |
} | |
], | |
"functionName": { | |
"name": "array_allocation_size_t_string_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "10424:41:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10424:49:14" | |
} | |
], | |
"functionName": { | |
"name": "allocate_memory", | |
"nodeType": "YulIdentifier", | |
"src": "10408:15:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10408:66:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "10399:5:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "10490:5:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "10497:6:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "10483:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10483:21:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "10483:21:14" | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "10513:27:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "10528:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "10535:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "10524:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10524:16:14" | |
}, | |
"variables": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulTypedName", | |
"src": "10517:3:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "10578:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae", | |
"nodeType": "YulIdentifier", | |
"src": "10580:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10580:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "10580:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "10559:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "10564:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "10555:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10555:16:14" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "10573:3:14" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "10552:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10552:25:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "10549:112:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "10707:3:14" | |
}, | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "10712:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "10717:6:14" | |
} | |
], | |
"functionName": { | |
"name": "copy_calldata_to_memory_with_cleanup", | |
"nodeType": "YulIdentifier", | |
"src": "10670:36:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10670:54:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "10670:54:14" | |
} | |
] | |
}, | |
"name": "abi_decode_available_length_t_string_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "src", | |
"nodeType": "YulTypedName", | |
"src": "10362:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "10367:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "10375:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "array", | |
"nodeType": "YulTypedName", | |
"src": "10383:5:14", | |
"type": "" | |
} | |
], | |
"src": "10305:425:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "10812:278:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "10861:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d", | |
"nodeType": "YulIdentifier", | |
"src": "10863:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10863:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "10863:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "10840:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "10848:4:14", | |
"type": "", | |
"value": "0x1f" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "10836:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10836:17:14" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "10855:3:14" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "10832:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10832:27:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "10825:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10825:35:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "10822:122:14" | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "10953:34:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "10980:6:14" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "10967:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "10967:20:14" | |
}, | |
"variables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "10957:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "10996:88:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "11057:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "11065:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "11053:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11053:17:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "11072:6:14" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "11080:3:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_available_length_t_string_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "11005:47:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11005:79:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "10996:5:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_t_string_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "10790:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "10798:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "array", | |
"nodeType": "YulTypedName", | |
"src": "10806:5:14", | |
"type": "" | |
} | |
], | |
"src": "10750:340:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "11189:561:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "11235:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "11237:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11237:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "11237:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "11210:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "11219:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "11206:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11206:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "11231:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "11202:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11202:32:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "11199:119:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "11328:117:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "11343:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "11357:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "11347:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "11372:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "11407:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "11418:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "11403:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11403:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "11427:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "11382:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11382:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "11372:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "11455:288:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "11470:46:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "11501:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "11512:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "11497:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11497:18:14" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "11484:12:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11484:32:14" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "11474:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "11563:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", | |
"nodeType": "YulIdentifier", | |
"src": "11565:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11565:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "11565:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "11535:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "11543:18:14", | |
"type": "", | |
"value": "0xffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "11532:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11532:30:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "11529:117:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "11660:73:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "11705:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "11716:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "11701:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11701:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "11725:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_string_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "11670:30:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11670:63:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "11660:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_addresst_string_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "11151:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "11162:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "11174:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "11182:6:14", | |
"type": "" | |
} | |
], | |
"src": "11096:654:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "11839:391:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "11885:83:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", | |
"nodeType": "YulIdentifier", | |
"src": "11887:77:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11887:79:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "11887:79:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "11860:7:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "11869:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "11856:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11856:23:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "11881:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "11852:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "11852:32:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "11849:119:14" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "11978:117:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "11993:15:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12007:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "11997:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "12022:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "12057:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "12068:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "12053:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12053:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "12077:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "12032:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12032:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "12022:6:14" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "12105:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "12120:16:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12134:2:14", | |
"type": "", | |
"value": "32" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "12124:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "12150:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "12185:9:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "12196:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "12181:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12181:22:14" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "12205:7:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "12160:20:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12160:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "12150:6:14" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_addresst_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "11801:9:14", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "11812:7:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "11824:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "11832:6:14", | |
"type": "" | |
} | |
], | |
"src": "11756:474:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "12264:152:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12281:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12284:77:14", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "12274:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12274:88:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "12274:88:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12378:1:14", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12381:4:14", | |
"type": "", | |
"value": "0x22" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "12371:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12371:15:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "12371:15:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12402:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12405:4:14", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "12395:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12395:15:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "12395:15:14" | |
} | |
] | |
}, | |
"name": "panic_error_0x22", | |
"nodeType": "YulFunctionDefinition", | |
"src": "12236:180:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "12473:269:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "12483:22:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "12497:4:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12503:1:14", | |
"type": "", | |
"value": "2" | |
} | |
], | |
"functionName": { | |
"name": "div", | |
"nodeType": "YulIdentifier", | |
"src": "12493:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12493:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "12483:6:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "12514:38:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "12544:4:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12550:1:14", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "12540:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12540:12:14" | |
}, | |
"variables": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulTypedName", | |
"src": "12518:18:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "12591:51:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "12605:27:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "12619:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12627:4:14", | |
"type": "", | |
"value": "0x7f" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "12615:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12615:17:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "12605:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "12571:18:14" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "12564:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12564:26:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "12561:81:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "12694:42:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x22", | |
"nodeType": "YulIdentifier", | |
"src": "12708:16:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12708:18:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "12708:18:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "12658:18:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "12681:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12689:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "12678:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12678:14:14" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "12655:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12655:38:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "12652:84:14" | |
} | |
] | |
}, | |
"name": "extract_byte_array_length", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "12457:4:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "12466:6:14", | |
"type": "" | |
} | |
], | |
"src": "12422:320:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "12854:114:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "12876:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12884:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "12872:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12872:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a20617070726f76616c20746f2063757272656e74206f776e65", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "12888:34:14", | |
"type": "", | |
"value": "ERC721: approval to current owne" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "12865:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12865:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "12865:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "12944:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "12952:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "12940:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12940:15:14" | |
}, | |
{ | |
"hexValue": "72", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "12957:3:14", | |
"type": "", | |
"value": "r" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "12933:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "12933:28:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "12933:28:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_b51b4875eede07862961e8f9365c6749f5fe55c6ee5d7a9e42b6912ad0b15942", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "12846:6:14", | |
"type": "" | |
} | |
], | |
"src": "12748:220:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "13120:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "13130:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "13196:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "13201:2:14", | |
"type": "", | |
"value": "33" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "13137:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13137:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "13130:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "13302:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_b51b4875eede07862961e8f9365c6749f5fe55c6ee5d7a9e42b6912ad0b15942", | |
"nodeType": "YulIdentifier", | |
"src": "13213:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13213:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "13213:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "13315:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "13326:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "13331:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "13322:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13322:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "13315:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_b51b4875eede07862961e8f9365c6749f5fe55c6ee5d7a9e42b6912ad0b15942_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "13108:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "13116:3:14", | |
"type": "" | |
} | |
], | |
"src": "12974:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "13517:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "13527:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "13539:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "13550:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "13535:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13535:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "13527:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "13574:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "13585:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "13570:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13570:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "13593:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "13599:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "13589:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13589:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "13563:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13563:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "13563:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "13619:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "13753:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_b51b4875eede07862961e8f9365c6749f5fe55c6ee5d7a9e42b6912ad0b15942_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "13627:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13627:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "13619:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_b51b4875eede07862961e8f9365c6749f5fe55c6ee5d7a9e42b6912ad0b15942__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "13497:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "13512:4:14", | |
"type": "" | |
} | |
], | |
"src": "13346:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "13877:142:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "13899:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "13907:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "13895:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13895:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "13911:34:14", | |
"type": "", | |
"value": "ERC721: approve caller is not to" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "13888:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13888:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "13888:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "13967:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "13975:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "13963:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13963:15:14" | |
}, | |
{ | |
"hexValue": "6b656e206f776e6572206f7220617070726f76656420666f7220616c6c", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "13980:31:14", | |
"type": "", | |
"value": "ken owner or approved for all" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "13956:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "13956:56:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "13956:56:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_c6e14a63ffb144eeef7cce6988e5dce07c60a7e0a7b1ef25dbe18c61483e0a83", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "13869:6:14", | |
"type": "" | |
} | |
], | |
"src": "13771:248:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "14171:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "14181:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "14247:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "14252:2:14", | |
"type": "", | |
"value": "61" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "14188:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14188:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "14181:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "14353:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_c6e14a63ffb144eeef7cce6988e5dce07c60a7e0a7b1ef25dbe18c61483e0a83", | |
"nodeType": "YulIdentifier", | |
"src": "14264:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14264:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "14264:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "14366:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "14377:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "14382:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "14373:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14373:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "14366:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_c6e14a63ffb144eeef7cce6988e5dce07c60a7e0a7b1ef25dbe18c61483e0a83_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "14159:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "14167:3:14", | |
"type": "" | |
} | |
], | |
"src": "14025:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "14568:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "14578:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "14590:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "14601:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "14586:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14586:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "14578:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "14625:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "14636:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "14621:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14621:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "14644:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "14650:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "14640:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14640:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "14614:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14614:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "14614:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "14670:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "14804:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_c6e14a63ffb144eeef7cce6988e5dce07c60a7e0a7b1ef25dbe18c61483e0a83_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "14678:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14678:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "14670:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_c6e14a63ffb144eeef7cce6988e5dce07c60a7e0a7b1ef25dbe18c61483e0a83__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "14548:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "14563:4:14", | |
"type": "" | |
} | |
], | |
"src": "14397:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "14928:126:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "14950:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "14958:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "14946:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14946:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e65", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "14962:34:14", | |
"type": "", | |
"value": "ERC721: caller is not token owne" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "14939:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "14939:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "14939:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "15018:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "15026:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "15014:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15014:15:14" | |
}, | |
{ | |
"hexValue": "72206f7220617070726f766564", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "15031:15:14", | |
"type": "", | |
"value": "r or approved" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "15007:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15007:40:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "15007:40:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_12a8e5623d251e191fe4a291d9a59bcc01a4db7a1f5c20fc8de44358c18308af", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "14920:6:14", | |
"type": "" | |
} | |
], | |
"src": "14822:232:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "15206:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "15216:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "15282:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "15287:2:14", | |
"type": "", | |
"value": "45" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "15223:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15223:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "15216:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "15388:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_12a8e5623d251e191fe4a291d9a59bcc01a4db7a1f5c20fc8de44358c18308af", | |
"nodeType": "YulIdentifier", | |
"src": "15299:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15299:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "15299:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "15401:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "15412:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "15417:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "15408:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15408:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "15401:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_12a8e5623d251e191fe4a291d9a59bcc01a4db7a1f5c20fc8de44358c18308af_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "15194:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "15202:3:14", | |
"type": "" | |
} | |
], | |
"src": "15060:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "15603:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "15613:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "15625:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "15636:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "15621:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15621:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "15613:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "15660:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "15671:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "15656:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15656:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "15679:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "15685:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "15675:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15675:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "15649:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15649:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "15649:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "15705:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "15839:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_12a8e5623d251e191fe4a291d9a59bcc01a4db7a1f5c20fc8de44358c18308af_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "15713:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15713:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "15705:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_12a8e5623d251e191fe4a291d9a59bcc01a4db7a1f5c20fc8de44358c18308af__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "15583:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "15598:4:14", | |
"type": "" | |
} | |
], | |
"src": "15432:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "15963:68:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "15985:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "15993:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "15981:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15981:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a20696e76616c696420746f6b656e204944", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "15997:26:14", | |
"type": "", | |
"value": "ERC721: invalid token ID" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "15974:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "15974:50:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "15974:50:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_b08d2b0fec7cc108ab049809a8beb42779d969a49299d0c317c907d9db22974f", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "15955:6:14", | |
"type": "" | |
} | |
], | |
"src": "15857:174:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "16183:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "16193:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "16259:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "16264:2:14", | |
"type": "", | |
"value": "24" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "16200:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16200:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "16193:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "16365:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_b08d2b0fec7cc108ab049809a8beb42779d969a49299d0c317c907d9db22974f", | |
"nodeType": "YulIdentifier", | |
"src": "16276:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16276:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "16276:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "16378:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "16389:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "16394:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "16385:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16385:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "16378:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_b08d2b0fec7cc108ab049809a8beb42779d969a49299d0c317c907d9db22974f_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "16171:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "16179:3:14", | |
"type": "" | |
} | |
], | |
"src": "16037:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "16580:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "16590:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "16602:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "16613:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "16598:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16598:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "16590:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "16637:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "16648:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "16633:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16633:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "16656:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "16662:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "16652:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16652:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "16626:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16626:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "16626:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "16682:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "16816:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_b08d2b0fec7cc108ab049809a8beb42779d969a49299d0c317c907d9db22974f_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "16690:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16690:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "16682:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_b08d2b0fec7cc108ab049809a8beb42779d969a49299d0c317c907d9db22974f__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "16560:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "16575:4:14", | |
"type": "" | |
} | |
], | |
"src": "16409:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "16940:122:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "16962:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "16970:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "16958:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16958:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a2061646472657373207a65726f206973206e6f742061207661", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "16974:34:14", | |
"type": "", | |
"value": "ERC721: address zero is not a va" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "16951:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "16951:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "16951:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "17030:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "17038:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "17026:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17026:15:14" | |
}, | |
{ | |
"hexValue": "6c6964206f776e6572", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "17043:11:14", | |
"type": "", | |
"value": "lid owner" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "17019:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17019:36:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "17019:36:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_6d05c90094f31cfeb8f0eb86f0a513af3f7f8992991fbde41b08aa7960677159", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "16932:6:14", | |
"type": "" | |
} | |
], | |
"src": "16834:228:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "17214:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "17224:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "17290:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "17295:2:14", | |
"type": "", | |
"value": "41" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "17231:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17231:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "17224:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "17396:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_6d05c90094f31cfeb8f0eb86f0a513af3f7f8992991fbde41b08aa7960677159", | |
"nodeType": "YulIdentifier", | |
"src": "17307:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17307:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "17307:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "17409:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "17420:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "17425:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "17416:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17416:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "17409:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_6d05c90094f31cfeb8f0eb86f0a513af3f7f8992991fbde41b08aa7960677159_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "17202:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "17210:3:14", | |
"type": "" | |
} | |
], | |
"src": "17068:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "17611:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "17621:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "17633:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "17644:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "17629:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17629:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "17621:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "17668:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "17679:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "17664:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17664:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "17687:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "17693:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "17683:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17683:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "17657:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17657:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "17657:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "17713:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "17847:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_6d05c90094f31cfeb8f0eb86f0a513af3f7f8992991fbde41b08aa7960677159_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "17721:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17721:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "17713:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_6d05c90094f31cfeb8f0eb86f0a513af3f7f8992991fbde41b08aa7960677159__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "17591:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "17606:4:14", | |
"type": "" | |
} | |
], | |
"src": "17440:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "17971:119:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "17993:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "18001:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "17989:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17989:14:14" | |
}, | |
{ | |
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "18005:34:14", | |
"type": "", | |
"value": "Ownable: new owner is the zero a" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "17982:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "17982:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "17982:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "18061:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "18069:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "18057:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18057:15:14" | |
}, | |
{ | |
"hexValue": "646472657373", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "18074:8:14", | |
"type": "", | |
"value": "ddress" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "18050:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18050:33:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "18050:33:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "17963:6:14", | |
"type": "" | |
} | |
], | |
"src": "17865:225:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "18242:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "18252:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "18318:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "18323:2:14", | |
"type": "", | |
"value": "38" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "18259:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18259:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "18252:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "18424:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", | |
"nodeType": "YulIdentifier", | |
"src": "18335:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18335:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "18335:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "18437:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "18448:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "18453:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "18444:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18444:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "18437:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "18230:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "18238:3:14", | |
"type": "" | |
} | |
], | |
"src": "18096:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "18639:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "18649:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "18661:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "18672:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "18657:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18657:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "18649:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "18696:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "18707:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "18692:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18692:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "18715:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "18721:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "18711:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18711:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "18685:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18685:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "18685:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "18741:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "18875:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "18749:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "18749:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "18741:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "18619:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "18634:4:14", | |
"type": "" | |
} | |
], | |
"src": "18468:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "18999:118:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "19021:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "19029:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "19017:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19017:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a207472616e736665722066726f6d20696e636f727265637420", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "19033:34:14", | |
"type": "", | |
"value": "ERC721: transfer from incorrect " | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "19010:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19010:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "19010:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "19089:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "19097:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "19085:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19085:15:14" | |
}, | |
{ | |
"hexValue": "6f776e6572", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "19102:7:14", | |
"type": "", | |
"value": "owner" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "19078:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19078:32:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "19078:32:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_277f8ee9d5b4fc3c4149386f24de0fc1bbc63a8210e2197bfd1c0376a2ac5f48", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "18991:6:14", | |
"type": "" | |
} | |
], | |
"src": "18893:224:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "19269:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "19279:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "19345:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "19350:2:14", | |
"type": "", | |
"value": "37" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "19286:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19286:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "19279:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "19451:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_277f8ee9d5b4fc3c4149386f24de0fc1bbc63a8210e2197bfd1c0376a2ac5f48", | |
"nodeType": "YulIdentifier", | |
"src": "19362:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19362:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "19362:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "19464:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "19475:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "19480:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "19471:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19471:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "19464:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_277f8ee9d5b4fc3c4149386f24de0fc1bbc63a8210e2197bfd1c0376a2ac5f48_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "19257:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "19265:3:14", | |
"type": "" | |
} | |
], | |
"src": "19123:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "19666:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "19676:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "19688:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "19699:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "19684:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19684:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "19676:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "19723:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "19734:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "19719:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19719:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "19742:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "19748:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "19738:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19738:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "19712:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19712:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "19712:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "19768:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "19902:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_277f8ee9d5b4fc3c4149386f24de0fc1bbc63a8210e2197bfd1c0376a2ac5f48_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "19776:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "19776:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "19768:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_277f8ee9d5b4fc3c4149386f24de0fc1bbc63a8210e2197bfd1c0376a2ac5f48__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "19646:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "19661:4:14", | |
"type": "" | |
} | |
], | |
"src": "19495:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "20026:117:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "20048:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "20056:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "20044:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20044:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a207472616e7366657220746f20746865207a65726f20616464", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "20060:34:14", | |
"type": "", | |
"value": "ERC721: transfer to the zero add" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "20037:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20037:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "20037:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "20116:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "20124:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "20112:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20112:15:14" | |
}, | |
{ | |
"hexValue": "72657373", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "20129:6:14", | |
"type": "", | |
"value": "ress" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "20105:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20105:31:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "20105:31:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_455fea98ea03c32d7dd1a6f1426917d80529bf47b3ccbde74e7206e889e709f4", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "20018:6:14", | |
"type": "" | |
} | |
], | |
"src": "19920:223:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "20295:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "20305:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "20371:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "20376:2:14", | |
"type": "", | |
"value": "36" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "20312:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20312:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "20305:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "20477:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_455fea98ea03c32d7dd1a6f1426917d80529bf47b3ccbde74e7206e889e709f4", | |
"nodeType": "YulIdentifier", | |
"src": "20388:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20388:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "20388:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "20490:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "20501:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "20506:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "20497:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20497:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "20490:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_455fea98ea03c32d7dd1a6f1426917d80529bf47b3ccbde74e7206e889e709f4_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "20283:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "20291:3:14", | |
"type": "" | |
} | |
], | |
"src": "20149:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "20692:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "20702:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "20714:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "20725:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "20710:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20710:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "20702:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "20749:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "20760:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "20745:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20745:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "20768:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "20774:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "20764:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20764:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "20738:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20738:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "20738:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "20794:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "20928:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_455fea98ea03c32d7dd1a6f1426917d80529bf47b3ccbde74e7206e889e709f4_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "20802:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "20802:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "20794:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_455fea98ea03c32d7dd1a6f1426917d80529bf47b3ccbde74e7206e889e709f4__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "20672:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "20687:4:14", | |
"type": "" | |
} | |
], | |
"src": "20521:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "21052:76:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "21074:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "21082:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "21070:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21070:14:14" | |
}, | |
{ | |
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "21086:34:14", | |
"type": "", | |
"value": "Ownable: caller is not the owner" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "21063:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21063:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "21063:58:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "21044:6:14", | |
"type": "" | |
} | |
], | |
"src": "20946:182:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "21280:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "21290:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "21356:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "21361:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "21297:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21297:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "21290:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "21462:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", | |
"nodeType": "YulIdentifier", | |
"src": "21373:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21373:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "21373:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "21475:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "21486:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "21491:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "21482:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21482:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "21475:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "21268:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "21276:3:14", | |
"type": "" | |
} | |
], | |
"src": "21134:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "21677:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "21687:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "21699:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "21710:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "21695:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21695:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "21687:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "21734:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "21745:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "21730:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21730:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "21753:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "21759:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "21749:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21749:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "21723:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21723:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "21723:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "21779:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "21913:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "21787:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "21787:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "21779:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "21657:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "21672:4:14", | |
"type": "" | |
} | |
], | |
"src": "21506:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "22037:69:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "22059:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "22067:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "22055:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22055:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a20617070726f766520746f2063616c6c6572", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "22071:27:14", | |
"type": "", | |
"value": "ERC721: approve to caller" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "22048:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22048:51:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "22048:51:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_45fe4329685be5ecd250fd0e6a25aea0ea4d0e30fb6a73c118b95749e6d70d05", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "22029:6:14", | |
"type": "" | |
} | |
], | |
"src": "21931:175:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "22258:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "22268:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "22334:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "22339:2:14", | |
"type": "", | |
"value": "25" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "22275:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22275:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "22268:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "22440:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_45fe4329685be5ecd250fd0e6a25aea0ea4d0e30fb6a73c118b95749e6d70d05", | |
"nodeType": "YulIdentifier", | |
"src": "22351:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22351:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "22351:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "22453:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "22464:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "22469:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "22460:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22460:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "22453:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_45fe4329685be5ecd250fd0e6a25aea0ea4d0e30fb6a73c118b95749e6d70d05_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "22246:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "22254:3:14", | |
"type": "" | |
} | |
], | |
"src": "22112:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "22655:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "22665:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "22677:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "22688:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "22673:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22673:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "22665:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "22712:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "22723:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "22708:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22708:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "22731:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "22737:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "22727:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22727:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "22701:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22701:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "22701:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "22757:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "22891:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_45fe4329685be5ecd250fd0e6a25aea0ea4d0e30fb6a73c118b95749e6d70d05_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "22765:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "22765:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "22757:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_45fe4329685be5ecd250fd0e6a25aea0ea4d0e30fb6a73c118b95749e6d70d05__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "22635:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "22650:4:14", | |
"type": "" | |
} | |
], | |
"src": "22484:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "23015:131:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "23037:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "23045:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "23033:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23033:14:14" | |
}, | |
{ | |
"hexValue": "4552433732313a207472616e7366657220746f206e6f6e204552433732315265", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "23049:34:14", | |
"type": "", | |
"value": "ERC721: transfer to non ERC721Re" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "23026:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23026:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "23026:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "23105:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "23113:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "23101:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23101:15:14" | |
}, | |
{ | |
"hexValue": "63656976657220696d706c656d656e746572", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "23118:20:14", | |
"type": "", | |
"value": "ceiver implementer" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "23094:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23094:45:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "23094:45:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_1e766a06da43a53d0f4c380e06e5a342e14d5af1bf8501996c844905530ca84e", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "23007:6:14", | |
"type": "" | |
} | |
], | |
"src": "22909:237:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "23298:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "23308:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "23374:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "23379:2:14", | |
"type": "", | |
"value": "50" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "23315:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23315:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "23308:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "23480:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_1e766a06da43a53d0f4c380e06e5a342e14d5af1bf8501996c844905530ca84e", | |
"nodeType": "YulIdentifier", | |
"src": "23391:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23391:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "23391:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "23493:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "23504:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "23509:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "23500:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23500:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "23493:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_1e766a06da43a53d0f4c380e06e5a342e14d5af1bf8501996c844905530ca84e_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "23286:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "23294:3:14", | |
"type": "" | |
} | |
], | |
"src": "23152:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "23695:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "23705:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "23717:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "23728:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "23713:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23713:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "23705:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "23752:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "23763:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "23748:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23748:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "23771:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "23777:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "23767:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23767:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "23741:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23741:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "23741:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "23797:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "23931:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_1e766a06da43a53d0f4c380e06e5a342e14d5af1bf8501996c844905530ca84e_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "23805:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "23805:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "23797:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_1e766a06da43a53d0f4c380e06e5a342e14d5af1bf8501996c844905530ca84e__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "23675:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "23690:4:14", | |
"type": "" | |
} | |
], | |
"src": "23524:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "24063:34:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "24073:18:14", | |
"value": { | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24088:3:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulIdentifier", | |
"src": "24073:11:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "24035:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "24040:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulTypedName", | |
"src": "24051:11:14", | |
"type": "" | |
} | |
], | |
"src": "23949:148:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "24213:280:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "24223:53:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "24270:5:14" | |
} | |
], | |
"functionName": { | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "24237:32:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "24237:39:14" | |
}, | |
"variables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "24227:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "24285:96:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24369:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "24374:6:14" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "24292:76:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "24292:89:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24285:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "24429:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "24436:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "24425:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "24425:16:14" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24443:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "24448:6:14" | |
} | |
], | |
"functionName": { | |
"name": "copy_memory_to_memory_with_cleanup", | |
"nodeType": "YulIdentifier", | |
"src": "24390:34:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "24390:65:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "24390:65:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "24464:23:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24475:3:14" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "24480:6:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "24471:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "24471:16:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "24464:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "24194:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "24201:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "24209:3:14", | |
"type": "" | |
} | |
], | |
"src": "24103:390:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "24683:251:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "24694:102:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "24783:6:14" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24792:3:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "24701:81:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "24701:95:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24694:3:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "24806:102:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "24895:6:14" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24904:3:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "24813:81:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "24813:95:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24806:3:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "24918:10:14", | |
"value": { | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "24925:3:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "24918:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_packed_t_string_memory_ptr_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "24654:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "24660:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "24668:6:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "24679:3:14", | |
"type": "" | |
} | |
], | |
"src": "24499:435:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "25046:127:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "25068:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "25076:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "25064:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25064:14:14" | |
}, | |
{ | |
"hexValue": "45524337323155524953746f726167653a2055524920736574206f66206e6f6e", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "25080:34:14", | |
"type": "", | |
"value": "ERC721URIStorage: URI set of non" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "25057:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25057:58:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "25057:58:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "25136:6:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "25144:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "25132:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25132:15:14" | |
}, | |
{ | |
"hexValue": "6578697374656e7420746f6b656e", | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "25149:16:14", | |
"type": "", | |
"value": "existent token" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "25125:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25125:41:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "25125:41:14" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_7521de1f20ce4d7bb86b61090bad73a87315a1f4baff36cc352901c7777280c4", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "25038:6:14", | |
"type": "" | |
} | |
], | |
"src": "24940:233:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "25325:220:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "25335:74:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "25401:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "25406:2:14", | |
"type": "", | |
"value": "46" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "25342:58:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25342:67:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "25335:3:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "25507:3:14" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_7521de1f20ce4d7bb86b61090bad73a87315a1f4baff36cc352901c7777280c4", | |
"nodeType": "YulIdentifier", | |
"src": "25418:88:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25418:93:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "25418:93:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "25520:19:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "25531:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "25536:2:14", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "25527:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25527:12:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "25520:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_7521de1f20ce4d7bb86b61090bad73a87315a1f4baff36cc352901c7777280c4_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "25313:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "25321:3:14", | |
"type": "" | |
} | |
], | |
"src": "25179:366:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "25722:248:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "25732:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "25744:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "25755:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "25740:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25740:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "25732:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "25779:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "25790:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "25775:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25775:17:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "25798:4:14" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "25804:9:14" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "25794:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25794:20:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "25768:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25768:47:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "25768:47:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "25824:139:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "25958:4:14" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_7521de1f20ce4d7bb86b61090bad73a87315a1f4baff36cc352901c7777280c4_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "25832:124:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "25832:131:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "25824:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_7521de1f20ce4d7bb86b61090bad73a87315a1f4baff36cc352901c7777280c4__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "25702:9:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "25717:4:14", | |
"type": "" | |
} | |
], | |
"src": "25551:419:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "26030:87:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26040:11:14", | |
"value": { | |
"name": "ptr", | |
"nodeType": "YulIdentifier", | |
"src": "26048:3:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "26040:4:14" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "26068:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"name": "ptr", | |
"nodeType": "YulIdentifier", | |
"src": "26071:3:14" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "26061:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26061:14:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "26061:14:14" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26084:26:14", | |
"value": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "26102:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "26105:4:14", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "keccak256", | |
"nodeType": "YulIdentifier", | |
"src": "26092:9:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26092:18:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "26084:4:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_dataslot_t_string_storage", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "ptr", | |
"nodeType": "YulTypedName", | |
"src": "26017:3:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "26025:4:14", | |
"type": "" | |
} | |
], | |
"src": "25976:141:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "26167:49:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26177:33:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "26195:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "26202:2:14", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "26191:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26191:14:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "26207:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "div", | |
"nodeType": "YulIdentifier", | |
"src": "26187:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26187:23:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "26177:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "divide_by_32_ceil", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "26150:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "26160:6:14", | |
"type": "" | |
} | |
], | |
"src": "26123:93:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "26275:54:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26285:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "bits", | |
"nodeType": "YulIdentifier", | |
"src": "26310:4:14" | |
}, | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "26316:5:14" | |
} | |
], | |
"functionName": { | |
"name": "shl", | |
"nodeType": "YulIdentifier", | |
"src": "26306:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26306:16:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "newValue", | |
"nodeType": "YulIdentifier", | |
"src": "26285:8:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "shift_left_dynamic", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "bits", | |
"nodeType": "YulTypedName", | |
"src": "26250:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "26256:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "newValue", | |
"nodeType": "YulTypedName", | |
"src": "26266:8:14", | |
"type": "" | |
} | |
], | |
"src": "26222:107:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "26411:317:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "26421:35:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "shiftBytes", | |
"nodeType": "YulIdentifier", | |
"src": "26442:10:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "26454:1:14", | |
"type": "", | |
"value": "8" | |
} | |
], | |
"functionName": { | |
"name": "mul", | |
"nodeType": "YulIdentifier", | |
"src": "26438:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26438:18:14" | |
}, | |
"variables": [ | |
{ | |
"name": "shiftBits", | |
"nodeType": "YulTypedName", | |
"src": "26425:9:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "26465:109:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "shiftBits", | |
"nodeType": "YulIdentifier", | |
"src": "26496:9:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "26507:66:14", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "shift_left_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "26477:18:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26477:97:14" | |
}, | |
"variables": [ | |
{ | |
"name": "mask", | |
"nodeType": "YulTypedName", | |
"src": "26469:4:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26583:51:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "shiftBits", | |
"nodeType": "YulIdentifier", | |
"src": "26614:9:14" | |
}, | |
{ | |
"name": "toInsert", | |
"nodeType": "YulIdentifier", | |
"src": "26625:8:14" | |
} | |
], | |
"functionName": { | |
"name": "shift_left_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "26595:18:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26595:39:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "toInsert", | |
"nodeType": "YulIdentifier", | |
"src": "26583:8:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26643:30:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "26656:5:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "mask", | |
"nodeType": "YulIdentifier", | |
"src": "26667:4:14" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "26663:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26663:9:14" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "26652:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26652:21:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "26643:5:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26682:40:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "26695:5:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "toInsert", | |
"nodeType": "YulIdentifier", | |
"src": "26706:8:14" | |
}, | |
{ | |
"name": "mask", | |
"nodeType": "YulIdentifier", | |
"src": "26716:4:14" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "26702:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26702:19:14" | |
} | |
], | |
"functionName": { | |
"name": "or", | |
"nodeType": "YulIdentifier", | |
"src": "26692:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26692:30:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "26682:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "update_byte_slice_dynamic32", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "26372:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "shiftBytes", | |
"nodeType": "YulTypedName", | |
"src": "26379:10:14", | |
"type": "" | |
}, | |
{ | |
"name": "toInsert", | |
"nodeType": "YulTypedName", | |
"src": "26391:8:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "26404:6:14", | |
"type": "" | |
} | |
], | |
"src": "26335:393:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "26766:28:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26776:12:14", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "26783:5:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulIdentifier", | |
"src": "26776:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "identity", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "26752:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulTypedName", | |
"src": "26762:3:14", | |
"type": "" | |
} | |
], | |
"src": "26734:60:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "26860:82:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "26870:66:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "26928:5:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "26910:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26910:24:14" | |
} | |
], | |
"functionName": { | |
"name": "identity", | |
"nodeType": "YulIdentifier", | |
"src": "26901:8:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26901:34:14" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "26883:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "26883:53:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "converted", | |
"nodeType": "YulIdentifier", | |
"src": "26870:9:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "convert_t_uint256_to_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "26840:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "converted", | |
"nodeType": "YulTypedName", | |
"src": "26850:9:14", | |
"type": "" | |
} | |
], | |
"src": "26800:142:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "26995:28:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "27005:12:14", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "27012:5:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulIdentifier", | |
"src": "27005:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "prepare_store_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "26981:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulTypedName", | |
"src": "26991:3:14", | |
"type": "" | |
} | |
], | |
"src": "26948:75:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "27105:193:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "27115:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value_0", | |
"nodeType": "YulIdentifier", | |
"src": "27170:7:14" | |
} | |
], | |
"functionName": { | |
"name": "convert_t_uint256_to_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "27139:30:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27139:39:14" | |
}, | |
"variables": [ | |
{ | |
"name": "convertedValue_0", | |
"nodeType": "YulTypedName", | |
"src": "27119:16:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "27194:4:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "27234:4:14" | |
} | |
], | |
"functionName": { | |
"name": "sload", | |
"nodeType": "YulIdentifier", | |
"src": "27228:5:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27228:11:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "27241:6:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "convertedValue_0", | |
"nodeType": "YulIdentifier", | |
"src": "27273:16:14" | |
} | |
], | |
"functionName": { | |
"name": "prepare_store_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "27249:23:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27249:41:14" | |
} | |
], | |
"functionName": { | |
"name": "update_byte_slice_dynamic32", | |
"nodeType": "YulIdentifier", | |
"src": "27200:27:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27200:91:14" | |
} | |
], | |
"functionName": { | |
"name": "sstore", | |
"nodeType": "YulIdentifier", | |
"src": "27187:6:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27187:105:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "27187:105:14" | |
} | |
] | |
}, | |
"name": "update_storage_value_t_uint256_to_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulTypedName", | |
"src": "27082:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "27088:6:14", | |
"type": "" | |
}, | |
{ | |
"name": "value_0", | |
"nodeType": "YulTypedName", | |
"src": "27096:7:14", | |
"type": "" | |
} | |
], | |
"src": "27029:269:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "27353:24:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "27363:8:14", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "27370:1:14", | |
"type": "", | |
"value": "0" | |
}, | |
"variableNames": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulIdentifier", | |
"src": "27363:3:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "zero_value_for_split_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"returnVariables": [ | |
{ | |
"name": "ret", | |
"nodeType": "YulTypedName", | |
"src": "27349:3:14", | |
"type": "" | |
} | |
], | |
"src": "27304:73:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "27436:136:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "27446:46:14", | |
"value": { | |
"arguments": [], | |
"functionName": { | |
"name": "zero_value_for_split_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "27460:30:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27460:32:14" | |
}, | |
"variables": [ | |
{ | |
"name": "zero_0", | |
"nodeType": "YulTypedName", | |
"src": "27450:6:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulIdentifier", | |
"src": "27545:4:14" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "27551:6:14" | |
}, | |
{ | |
"name": "zero_0", | |
"nodeType": "YulIdentifier", | |
"src": "27559:6:14" | |
} | |
], | |
"functionName": { | |
"name": "update_storage_value_t_uint256_to_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "27501:43:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27501:65:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "27501:65:14" | |
} | |
] | |
}, | |
"name": "storage_set_to_zero_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "slot", | |
"nodeType": "YulTypedName", | |
"src": "27422:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "27428:6:14", | |
"type": "" | |
} | |
], | |
"src": "27383:189:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "27628:136:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "27695:63:14", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "start", | |
"nodeType": "YulIdentifier", | |
"src": "27739:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "27746:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "storage_set_to_zero_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "27709:29:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27709:39:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "27709:39:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "start", | |
"nodeType": "YulIdentifier", | |
"src": "27648:5:14" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "27655:3:14" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "27645:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27645:14:14" | |
}, | |
"nodeType": "YulForLoop", | |
"post": { | |
"nodeType": "YulBlock", | |
"src": "27660:26:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "27662:22:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "start", | |
"nodeType": "YulIdentifier", | |
"src": "27675:5:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "27682:1:14", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "27671:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27671:13:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "start", | |
"nodeType": "YulIdentifier", | |
"src": "27662:5:14" | |
} | |
] | |
} | |
] | |
}, | |
"pre": { | |
"nodeType": "YulBlock", | |
"src": "27642:2:14", | |
"statements": [] | |
}, | |
"src": "27638:120:14" | |
} | |
] | |
}, | |
"name": "clear_storage_range_t_bytes1", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "start", | |
"nodeType": "YulTypedName", | |
"src": "27616:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "27623:3:14", | |
"type": "" | |
} | |
], | |
"src": "27578:186:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "27849:464:14", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "27875:431:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "27889:54:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "array", | |
"nodeType": "YulIdentifier", | |
"src": "27937:5:14" | |
} | |
], | |
"functionName": { | |
"name": "array_dataslot_t_string_storage", | |
"nodeType": "YulIdentifier", | |
"src": "27905:31:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27905:38:14" | |
}, | |
"variables": [ | |
{ | |
"name": "dataArea", | |
"nodeType": "YulTypedName", | |
"src": "27893:8:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "27956:63:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "dataArea", | |
"nodeType": "YulIdentifier", | |
"src": "27979:8:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "startIndex", | |
"nodeType": "YulIdentifier", | |
"src": "28007:10:14" | |
} | |
], | |
"functionName": { | |
"name": "divide_by_32_ceil", | |
"nodeType": "YulIdentifier", | |
"src": "27989:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27989:29:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "27975:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27975:44:14" | |
}, | |
"variables": [ | |
{ | |
"name": "deleteStart", | |
"nodeType": "YulTypedName", | |
"src": "27960:11:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "28176:27:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "28178:23:14", | |
"value": { | |
"name": "dataArea", | |
"nodeType": "YulIdentifier", | |
"src": "28193:8:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "deleteStart", | |
"nodeType": "YulIdentifier", | |
"src": "28178:11:14" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "startIndex", | |
"nodeType": "YulIdentifier", | |
"src": "28160:10:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "28172:2:14", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "28157:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28157:18:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "28154:49:14" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "deleteStart", | |
"nodeType": "YulIdentifier", | |
"src": "28245:11:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "dataArea", | |
"nodeType": "YulIdentifier", | |
"src": "28262:8:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "len", | |
"nodeType": "YulIdentifier", | |
"src": "28290:3:14" | |
} | |
], | |
"functionName": { | |
"name": "divide_by_32_ceil", | |
"nodeType": "YulIdentifier", | |
"src": "28272:17:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28272:22:14" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "28258:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28258:37:14" | |
} | |
], | |
"functionName": { | |
"name": "clear_storage_range_t_bytes1", | |
"nodeType": "YulIdentifier", | |
"src": "28216:28:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28216:80:14" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "28216:80:14" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "len", | |
"nodeType": "YulIdentifier", | |
"src": "27866:3:14" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "27871:2:14", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "27863:2:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "27863:11:14" | |
}, | |
"nodeType": "YulIf", | |
"src": "27860:446:14" | |
} | |
] | |
}, | |
"name": "clean_up_bytearray_end_slots_t_string_storage", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "array", | |
"nodeType": "YulTypedName", | |
"src": "27825:5:14", | |
"type": "" | |
}, | |
{ | |
"name": "len", | |
"nodeType": "YulTypedName", | |
"src": "27832:3:14", | |
"type": "" | |
}, | |
{ | |
"name": "startIndex", | |
"nodeType": "YulTypedName", | |
"src": "27837:10:14", | |
"type": "" | |
} | |
], | |
"src": "27770:543:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "28382:54:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "28392:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "bits", | |
"nodeType": "YulIdentifier", | |
"src": "28417:4:14" | |
}, | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "28423:5:14" | |
} | |
], | |
"functionName": { | |
"name": "shr", | |
"nodeType": "YulIdentifier", | |
"src": "28413:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28413:16:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "newValue", | |
"nodeType": "YulIdentifier", | |
"src": "28392:8:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "shift_right_unsigned_dynamic", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "bits", | |
"nodeType": "YulTypedName", | |
"src": "28357:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "28363:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "newValue", | |
"nodeType": "YulTypedName", | |
"src": "28373:8:14", | |
"type": "" | |
} | |
], | |
"src": "28319:117:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "28493:118:14", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "28503:68:14", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "28552:1:14", | |
"type": "", | |
"value": "8" | |
}, | |
{ | |
"name": "bytes", | |
"nodeType": "YulIdentifier", | |
"src": "28555:5:14" | |
} | |
], | |
"functionName": { | |
"name": "mul", | |
"nodeType": "YulIdentifier", | |
"src": "28548:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28548:13:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "28567:1:14", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "28563:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28563:6:14" | |
} | |
], | |
"functionName": { | |
"name": "shift_right_unsigned_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "28519:28:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28519:51:14" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "28515:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28515:56:14" | |
}, | |
"variables": [ | |
{ | |
"name": "mask", | |
"nodeType": "YulTypedName", | |
"src": "28507:4:14", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "28580:25:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "28594:4:14" | |
}, | |
{ | |
"name": "mask", | |
"nodeType": "YulIdentifier", | |
"src": "28600:4:14" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "28590:3:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28590:15:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "28580:6:14" | |
} | |
] | |
} | |
] | |
}, | |
"name": "mask_bytes_dynamic", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "28470:4:14", | |
"type": "" | |
}, | |
{ | |
"name": "bytes", | |
"nodeType": "YulTypedName", | |
"src": "28476:5:14", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "28486:6:14", | |
"type": "" | |
} | |
], | |
"src": "28442:169:14" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "28697:214:14", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "28830:37:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "28857:4:14" | |
}, | |
{ | |
"name": "len", | |
"nodeType": "YulIdentifier", | |
"src": "28863:3:14" | |
} | |
], | |
"functionName": { | |
"name": "mask_bytes_dynamic", | |
"nodeType": "YulIdentifier", | |
"src": "28838:18:14" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "28838:29:14" | |
}, | |
"variableNames": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "28830:4:14" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "28876:29:14", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "28887:4:14" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "28897:1:14", | |
"type": " |
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)
(Sorry about that, but we can’t show files that are this big right now.)