More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 352 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Safe Transfer Fr... | 21655289 | 56 mins ago | IN | 0 ETH | 0.00059093 | ||||
Deposit Pixels | 21655154 | 1 hr ago | IN | 0 ETH | 0.0007684 | ||||
Mint Pixels | 21655105 | 1 hr ago | IN | 0.008174 ETH | 0.00100199 | ||||
Mint Pixels | 21655099 | 1 hr ago | IN | 0.491826 ETH | 0.00137325 | ||||
Mint | 21655089 | 1 hr ago | IN | 0.572266 ETH | 0.00264209 | ||||
Safe Transfer Fr... | 21655005 | 1 hr ago | IN | 0 ETH | 0.00034086 | ||||
Set Approval For... | 21654667 | 3 hrs ago | IN | 0 ETH | 0.00057533 | ||||
Safe Transfer Fr... | 21654658 | 3 hrs ago | IN | 0 ETH | 0.00058977 | ||||
Safe Transfer Fr... | 21654618 | 3 hrs ago | IN | 0 ETH | 0.00043162 | ||||
Safe Transfer Fr... | 21654608 | 3 hrs ago | IN | 0 ETH | 0.00039734 | ||||
Safe Transfer Fr... | 21654598 | 3 hrs ago | IN | 0 ETH | 0.00045061 | ||||
Mint | 21654591 | 3 hrs ago | IN | 1 ETH | 0.00168259 | ||||
Safe Transfer Fr... | 21654588 | 3 hrs ago | IN | 0 ETH | 0.00044281 | ||||
Safe Transfer Fr... | 21654583 | 3 hrs ago | IN | 0 ETH | 0.00043566 | ||||
Safe Transfer Fr... | 21654574 | 3 hrs ago | IN | 0 ETH | 0.00046671 | ||||
Safe Transfer Fr... | 21654559 | 3 hrs ago | IN | 0 ETH | 0.00062166 | ||||
Mint | 21654452 | 3 hrs ago | IN | 0.55 ETH | 0.00163776 | ||||
Mint | 21654208 | 4 hrs ago | IN | 0.505001 ETH | 0.00221326 | ||||
Set Approval For... | 21654047 | 5 hrs ago | IN | 0 ETH | 0.0009247 | ||||
Set Approval For... | 21654012 | 5 hrs ago | IN | 0 ETH | 0.00103199 | ||||
Set Approval For... | 21653993 | 5 hrs ago | IN | 0 ETH | 0.00086582 | ||||
Mint | 21653988 | 5 hrs ago | IN | 0.55 ETH | 0.0034142 | ||||
Mint Pixels | 21653959 | 5 hrs ago | IN | 0.162383 ETH | 0.00099844 | ||||
Mint | 21653901 | 5 hrs ago | IN | 0.508174 ETH | 0.00189042 | ||||
Mint | 21653791 | 5 hrs ago | IN | 0.644 ETH | 0.0018908 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Dex
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// PXL DEX // Kim Asendorf, 2025 // SPDX-License-Identifier: MIT pragma solidity >=0.8.26; import "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/extensions/ERC721ABurnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "hardhat/console.sol"; interface IPixel is IERC20 { function mint(address target, uint256 quantity) external; } contract Dex is ERC721A, ERC721ABurnable, Ownable { using Strings for uint256; uint256 public mintPrice; uint256 public maxSupply; address public pixelAddress; uint256 public pixelPrice; uint256 private pixelAllowance; string private htmlPrefix; string private htmlSuffix; string private script; string private xmlPrefix; string private xmlSuffix; string private xml; string private externalURL; string private description; mapping(uint256 => bytes12) private colors; mapping(uint256 => uint256) public allowance; mapping(uint256 => uint256) public pixels; uint256 public totalDeposit; enum Access { Owner, Allowlist, Public } Access public accessMode = Access.Owner; mapping(address => uint256) public allowlist; event Mint(address minter, uint256 tokenId, uint256 quantity); event MintPixels(address minter, uint256 tokenId, uint256 quantity); event DepositPixels(uint256 tokenId, uint256 quantity); event WithdrawPixels(uint256 tokenId, uint256 quantity); error InvalidAmount(uint256 required); error NoSupply(uint256 total); error NotAllowed(); error NotExists(); error NotOwner(); error LimitExceeded(uint256 limit); constructor(string memory _name, string memory _symbol, uint256 _mintPrice, uint256 _maxSupply, address _pixelAddress, uint256 _pixelPrice, uint256 _pixelAllowance) ERC721A(_name, _symbol) Ownable(msg.sender) { mintPrice = _mintPrice; maxSupply = _maxSupply; pixelAddress = _pixelAddress; pixelPrice = _pixelPrice; pixelAllowance = _pixelAllowance; } function mint(address target, uint256 tokenId, uint256 pixelAmount) external payable { if (msg.sender != owner() && accessMode != Access.Public && (accessMode != Access.Allowlist || !(allowlist[msg.sender] >= 1))) { revert NotAllowed(); } if (pixelAllowance < pixelAmount) { revert LimitExceeded({ limit: pixelAllowance }); } if (msg.sender != owner() && msg.value != mintPrice + pixelPrice * pixelAmount) { revert InvalidAmount({ required: mintPrice + pixelPrice * pixelAmount}); } if (totalSupply() + 1 > maxSupply) { revert NoSupply({ total: maxSupply }); } _mintSpot(target, tokenId); IPixel pixelContract = IPixel(pixelAddress); pixelContract.mint(address(this), pixelAmount); allowance[tokenId] = pixelAllowance; pixels[tokenId] = pixelAmount; totalDeposit += pixelAmount; if (msg.sender != owner() && accessMode == Access.Allowlist) { allowlist[msg.sender] -= 1; } emit Mint(target, tokenId, pixelAmount); } function mintPixels(address target, uint256 tokenId, uint256 pixelAmount) external payable { if (msg.sender != ownerOf(tokenId)) { revert NotOwner(); } if (allowance[tokenId] < pixelAmount) { revert LimitExceeded({ limit: allowance[tokenId] }); } if (msg.sender != owner() && msg.value != pixelPrice * pixelAmount) { revert InvalidAmount({ required: pixelPrice * pixelAmount}); } IPixel pixelContract = IPixel(pixelAddress); pixelContract.mint(target, pixelAmount); allowance[tokenId] -= pixelAmount; emit MintPixels(target, tokenId, pixelAmount); } function depositPixels(uint256 tokenId, uint256 pixelAmount) external { if (msg.sender != ownerOf(tokenId)) { revert NotOwner(); } IPixel pixelContract = IPixel(pixelAddress); pixelContract.transferFrom(msg.sender, address(this), pixelAmount); pixels[tokenId] += pixelAmount; totalDeposit += pixelAmount; emit DepositPixels(tokenId, pixelAmount); } function withdrawPixels(uint256 tokenId, uint256 pixelAmount) external { if (msg.sender != ownerOf(tokenId)) { revert NotOwner(); } if (pixels[tokenId] < pixelAmount) { revert LimitExceeded({ limit: pixels[tokenId] }); } IPixel pixelContract = IPixel(pixelAddress); pixelContract.transfer(msg.sender, pixelAmount); pixels[tokenId] -= pixelAmount; totalDeposit -= pixelAmount; emit WithdrawPixels(tokenId, pixelAmount); } function rescuePixels(address target, uint256 quantity) external onlyOwner { IPixel pixelContract = IPixel(pixelAddress); uint256 lostPixels = pixelContract.balanceOf(address(this)) - totalDeposit; if (lostPixels < quantity) { revert LimitExceeded({ limit: lostPixels }); } pixelContract.transfer(target, quantity); } function setPixelAddress(address _pixelAddress) external onlyOwner { pixelAddress = _pixelAddress; } function setPrices(uint256 _mintPrice, uint256 _pixelPrice) external onlyOwner { mintPrice = _mintPrice; pixelPrice = _pixelPrice; } function setHTMLContainer(string calldata _htmlPrefix, string calldata _htmlSuffix) external onlyOwner { htmlPrefix = _htmlPrefix; htmlSuffix = _htmlSuffix; } function setScript(string calldata _script) external onlyOwner { script = _script; } function setSVGContainer(string calldata _xmlPrefix, string calldata _xmlSuffix) external onlyOwner { xmlPrefix = _xmlPrefix; xmlSuffix = _xmlSuffix; } function setSVGXML(string calldata _xml) external onlyOwner { xml = _xml; } function setExternalURL(string calldata _externalURL) external onlyOwner { externalURL = _externalURL; } function setDescription(string calldata _description) external onlyOwner { description = _description; } function setColors(bytes12[] calldata colorBytes) external onlyOwner { for (uint256 i; i < colorBytes.length; i++) { colors[i+1] = colorBytes[i]; } } function setAccessMode(Access _accessMode) external onlyOwner { accessMode = _accessMode; } function getColorString(uint256 tokenId, uint256 componentId) private view returns (string memory) { return uint256(uint8(bytes1(colors[tokenId][componentId]))).toString(); } function getColorStyles(uint256 tokenId) private view returns (bytes memory) { bytes memory style = ":root {"; for (uint256 i; i < 4; i++) { style = abi.encodePacked(style, "--c", i.toString(), ":rgb(", getColorString(tokenId, i*3), ",", getColorString(tokenId, i*3+1), ",", getColorString(tokenId, i*3+2), ");"); } return abi.encodePacked(style, "}"); } function getColorValues(uint256 tokenId) private view returns (bytes memory) { bytes memory values; for (uint256 i; i < 5; i++) { values = abi.encodePacked(values, "rgb(", getColorString(tokenId, (i%4)*3), ",", getColorString(tokenId, (i%4)*3+1), ",", getColorString(tokenId, (i%4)*3+2), ");"); } return values; } function getColorArray(uint256 tokenId) private view returns (bytes memory) { bytes memory array = "[["; for (uint256 i; i < 4; i++) { array = abi.encodePacked(array, "[", getColorString(tokenId, i*3), ",", getColorString(tokenId, i*3+1), ",", getColorString(tokenId, i*3+2), "]", i == 1 ? "],[" : (i == 3 ? "" : ",")); } return abi.encodePacked(array, "]]"); } function getSVG(uint256 tokenId) private view returns (bytes memory) { bytes memory style = getColorStyles(tokenId); bytes memory values = getColorValues(tokenId); uint256 pixelAmount = pixels[tokenId]; return abi.encodePacked( xmlPrefix, '<style>', style, '</style>', '<defs>', '<text id="token">', tokenId.toString(), '</text>', '<text id="pixels">', pixelAmount.toString(), '</text>', '<rect id="frame" width="2" height="', (pixelAmount / 10000).toString(), '">', '<animate attributeName="fill" dur="2s" keyTimes="0;0.25;0.5;0.75;1" values="', values, '" repeatCount="indefinite"/>' '</rect>' '</defs>', xml, xmlSuffix ); } function getImage(uint256 tokenId) public view returns (string memory) { bytes memory svg = getSVG(tokenId); return string(abi.encodePacked( "data:image/svg+xml;base64,", Base64.encode(svg) )); } function buildHTML(uint256 tokenId) internal view returns (bytes memory) { return abi.encodePacked( htmlPrefix, 'let palInt=', getColorArray(tokenId), ';', 'let pixels=', pixels[tokenId].toString(), ';', script, htmlSuffix ); } function getHTML(uint256 tokenId) public view returns (string memory) { if (!_exists(tokenId)) { revert NotExists(); } bytes memory html = buildHTML(tokenId); return string(html); } function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) { if (!_exists(tokenId)) { revert NotExists(); } string memory pixelAmount = pixels[tokenId].toString(); bytes memory html = buildHTML(tokenId); bytes memory attributes = abi.encodePacked( '[', '{"trait_type":"Pixels","value":"', pixelAmount, '"},', '{"trait_type":"Allowance","value":"', allowance[tokenId].toString(), '"}', ']' ); bytes memory dataURI = abi.encodePacked( '{', '"name":"Pixel Deck ', tokenId.toString(), '",', '"description":"', description, '",', '"image":"', getImage(tokenId), '",', '"external_url":"', externalURL, '?palInt=', getColorArray(tokenId), '&pixels=', pixelAmount, '",', '"animation_url":"data:text/html;base64,', Base64.encode(html), '",' '"attributes":', attributes, '}' ); return string( abi.encodePacked( "data:application/json;base64,", Base64.encode(dataURI) ) ); } function getBalance() external view returns (uint256) { return address(this).balance; } function withdraw(address recipient, uint256 amount) external onlyOwner { Address.sendValue(payable(recipient), amount); } function addToAllowlist(address[] calldata addresses, uint256[] calldata amount) external onlyOwner { for (uint256 i; i < addresses.length; i++) { allowlist[addresses[i]] = amount[i]; } } function removeFromAllowlist(address[] calldata addresses) external onlyOwner { for (uint256 i; i < addresses.length; i++) { delete allowlist[addresses[i]]; } } function supportsInterface(bytes4 interfaceId) public view override(ERC721A, IERC721A) returns (bool) { return super.supportsInterface(interfaceId); } function _sequentialUpTo() internal pure override returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert Errors.InsufficientBalance(address(this).balance, amount); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert Errors.FailedCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {Errors.FailedCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case * of an unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {Errors.FailedCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly ("memory-safe") { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert Errors.FailedCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Base64.sol) pragma solidity ^0.8.20; /** * @dev Provides a set of functions to operate with Base64 strings. */ library Base64 { /** * @dev Base64 Encoding/Decoding Table * See sections 4 and 5 of https://datatracker.ietf.org/doc/html/rfc4648 */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; string internal constant _TABLE_URL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { return _encode(data, _TABLE, true); } /** * @dev Converts a `bytes` to its Bytes64Url `string` representation. * Output is not padded with `=` as specified in https://www.rfc-editor.org/rfc/rfc4648[rfc4648]. */ function encodeURL(bytes memory data) internal pure returns (string memory) { return _encode(data, _TABLE_URL, false); } /** * @dev Internal table-agnostic conversion */ function _encode(bytes memory data, string memory table, bool withPadding) private pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // If padding is enabled, the final length should be `bytes` data length divided by 3 rounded up and then // multiplied by 4 so that it leaves room for padding the last chunk // - `data.length + 2` -> Prepare for division rounding up // - `/ 3` -> Number of 3-bytes chunks (rounded up) // - `4 *` -> 4 characters for each chunk // This is equivalent to: 4 * Math.ceil(data.length / 3) // // If padding is disabled, the final length should be `bytes` data length multiplied by 4/3 rounded up as // opposed to when padding is required to fill the last chunk. // - `4 * data.length` -> 4 characters for each chunk // - ` + 2` -> Prepare for division rounding up // - `/ 3` -> Number of 3-bytes chunks (rounded up) // This is equivalent to: Math.ceil((4 * data.length) / 3) uint256 resultLength = withPadding ? 4 * ((data.length + 2) / 3) : (4 * data.length + 2) / 3; string memory result = new string(resultLength); assembly ("memory-safe") { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 0x20) let dataPtr := data let endPtr := add(data, mload(data)) // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and // set it to zero to make sure no dirty bytes are read in that section. let afterPtr := add(endPtr, 0x20) let afterCache := mload(afterPtr) mstore(afterPtr, 0x00) // Run over the input, 3 bytes at a time for { } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 byte (24 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F to bitmask the least significant 6 bits. // Use this as an index into the lookup table, mload an entire word // so the desired character is in the least significant byte, and // mstore8 this least significant byte into the result and continue. mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // Reset the value that was cached mstore(afterPtr, afterCache) if withPadding { // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to avoid relying on the error API for critical functionality. * * _Available since v5.1._ */ library Errors { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error InsufficientBalance(uint256 balance, uint256 needed); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedCall(); /** * @dev The deployment failed. */ error FailedDeployment(); /** * @dev A necessary precompile is missing. */ error MissingPrecompile(address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/Math.sol) pragma solidity ^0.8.20; import {Panic} from "../Panic.sol"; import {SafeCast} from "./SafeCast.sol"; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an success flag (no overflow). */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { 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 success flag (no division by zero). */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * SafeCast.toUint(condition)); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. Panic.panic(Panic.DIVISION_BY_ZERO); } // The following calculation ensures accurate ceiling division without overflow. // Since a is non-zero, (a - 1) / b will not overflow. // The largest possible result occurs when (a - 1) / b is type(uint256).max, // but the largest value we can obtain is type(uint256).max - 1, which happens // when a = type(uint256).max and b = 1. unchecked { return SafeCast.toUint(a > 0) * ((a - 1) / b + 1); } } /** * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * * 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²⁵⁶ and mod 2²⁵⁶ - 1, then use // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2²⁵⁶ + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0. if (denominator <= prod1) { Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW)); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2²⁵⁶ / 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²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv ≡ 1 mod 2⁴. 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⁸ inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶ inverse *= 2 - denominator * inverse; // inverse mod 2³² inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴ inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸ inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶ // 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²⁵⁶. Since the preconditions guarantee that the outcome is // less than 2²⁵⁶, 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; } } /** * @dev 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) { return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0); } /** * @dev Calculate the modular multiplicative inverse of a number in Z/nZ. * * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0. * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible. * * If the input value is not inversible, 0 is returned. * * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}. */ function invMod(uint256 a, uint256 n) internal pure returns (uint256) { unchecked { if (n == 0) return 0; // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version) // Used to compute integers x and y such that: ax + ny = gcd(a, n). // When the gcd is 1, then the inverse of a modulo n exists and it's x. // ax + ny = 1 // ax = 1 + (-y)n // ax ≡ 1 (mod n) # x is the inverse of a modulo n // If the remainder is 0 the gcd is n right away. uint256 remainder = a % n; uint256 gcd = n; // Therefore the initial coefficients are: // ax + ny = gcd(a, n) = n // 0a + 1n = n int256 x = 0; int256 y = 1; while (remainder != 0) { uint256 quotient = gcd / remainder; (gcd, remainder) = ( // The old remainder is the next gcd to try. remainder, // Compute the next remainder. // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd // where gcd is at most n (capped to type(uint256).max) gcd - remainder * quotient ); (x, y) = ( // Increment the coefficient of a. y, // Decrement the coefficient of n. // Can overflow, but the result is casted to uint256 so that the // next value of y is "wrapped around" to a value between 0 and n - 1. x - y * int256(quotient) ); } if (gcd != 1) return 0; // No inverse exists. return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative. } } /** * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`. * * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that * `a**(p-2)` is the modular multiplicative inverse of a in Fp. * * NOTE: this function does NOT check that `p` is a prime greater than `2`. */ function invModPrime(uint256 a, uint256 p) internal view returns (uint256) { unchecked { return Math.modExp(a, p - 2, p); } } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m) * * Requirements: * - modulus can't be zero * - underlying staticcall to precompile must succeed * * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make * sure the chain you're using it on supports the precompiled contract for modular exponentiation * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, * the underlying function will succeed given the lack of a revert, but the result may be incorrectly * interpreted as 0. */ function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) { (bool success, uint256 result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m). * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying * to operate modulo 0 or if the underlying precompile reverted. * * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack * of a revert, but the result may be incorrectly interpreted as 0. */ function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) { if (m == 0) return (false, 0); assembly ("memory-safe") { let ptr := mload(0x40) // | Offset | Content | Content (Hex) | // |-----------|------------|--------------------------------------------------------------------| // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x60:0x7f | value of b | 0x<.............................................................b> | // | 0x80:0x9f | value of e | 0x<.............................................................e> | // | 0xa0:0xbf | value of m | 0x<.............................................................m> | mstore(ptr, 0x20) mstore(add(ptr, 0x20), 0x20) mstore(add(ptr, 0x40), 0x20) mstore(add(ptr, 0x60), b) mstore(add(ptr, 0x80), e) mstore(add(ptr, 0xa0), m) // Given the result < m, it's guaranteed to fit in 32 bytes, // so we can use the memory scratch space located at offset 0. success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20) result := mload(0x00) } } /** * @dev Variant of {modExp} that supports inputs of arbitrary length. */ function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) { (bool success, bytes memory result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Variant of {tryModExp} that supports inputs of arbitrary length. */ function tryModExp( bytes memory b, bytes memory e, bytes memory m ) internal view returns (bool success, bytes memory result) { if (_zeroBytes(m)) return (false, new bytes(0)); uint256 mLen = m.length; // Encode call args in result and move the free memory pointer result = abi.encodePacked(b.length, e.length, mLen, b, e, m); assembly ("memory-safe") { let dataPtr := add(result, 0x20) // Write result on top of args to avoid allocating extra memory. success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen) // Overwrite the length. // result.length > returndatasize() is guaranteed because returndatasize() == m.length mstore(result, mLen) // Set the memory pointer after the returned data. mstore(0x40, add(dataPtr, mLen)) } } /** * @dev Returns whether the provided byte array is zero. */ function _zeroBytes(bytes memory byteArray) private pure returns (bool) { for (uint256 i = 0; i < byteArray.length; ++i) { if (byteArray[i] != 0) { return false; } } return true; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * This method is based on Newton's method for computing square roots; the algorithm is restricted to only * using integer operations. */ function sqrt(uint256 a) internal pure returns (uint256) { unchecked { // Take care of easy edge cases when a == 0 or a == 1 if (a <= 1) { return a; } // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between // the current value as `ε_n = | x_n - sqrt(a) |`. // // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is // bigger than any uint256. // // By noticing that // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)` // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar // to the msb function. uint256 aa = a; uint256 xn = 1; if (aa >= (1 << 128)) { aa >>= 128; xn <<= 64; } if (aa >= (1 << 64)) { aa >>= 64; xn <<= 32; } if (aa >= (1 << 32)) { aa >>= 32; xn <<= 16; } if (aa >= (1 << 16)) { aa >>= 16; xn <<= 8; } if (aa >= (1 << 8)) { aa >>= 8; xn <<= 4; } if (aa >= (1 << 4)) { aa >>= 4; xn <<= 2; } if (aa >= (1 << 2)) { xn <<= 1; } // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1). // // We can refine our estimation by noticing that the middle of that interval minimizes the error. // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2). // This is going to be our x_0 (and ε_0) xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2) // From here, Newton's method give us: // x_{n+1} = (x_n + a / x_n) / 2 // // One should note that: // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a // = ((x_n² + a) / (2 * x_n))² - a // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²) // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²) // = (x_n² - a)² / (2 * x_n)² // = ((x_n² - a) / (2 * x_n))² // ≥ 0 // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n // // This gives us the proof of quadratic convergence of the sequence: // ε_{n+1} = | x_{n+1} - sqrt(a) | // = | (x_n + a / x_n) / 2 - sqrt(a) | // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) | // = | (x_n - sqrt(a))² / (2 * x_n) | // = | ε_n² / (2 * x_n) | // = ε_n² / | (2 * x_n) | // // For the first iteration, we have a special case where x_0 is known: // ε_1 = ε_0² / | (2 * x_0) | // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2))) // ≤ 2**(2*e-4) / (3 * 2**(e-1)) // ≤ 2**(e-3) / 3 // ≤ 2**(e-3-log2(3)) // ≤ 2**(e-4.5) // // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n: // ε_{n+1} = ε_n² / | (2 * x_n) | // ≤ (2**(e-k))² / (2 * 2**(e-1)) // ≤ 2**(2*e-2*k) / 2**e // ≤ 2**(e-2*k) xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5 xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9 xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18 xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36 xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72 // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either // sqrt(a) or sqrt(a) + 1. return xn - SafeCast.toUint(xn > a / xn); } } /** * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 exp; unchecked { exp = 128 * SafeCast.toUint(value > (1 << 128) - 1); value >>= exp; result += exp; exp = 64 * SafeCast.toUint(value > (1 << 64) - 1); value >>= exp; result += exp; exp = 32 * SafeCast.toUint(value > (1 << 32) - 1); value >>= exp; result += exp; exp = 16 * SafeCast.toUint(value > (1 << 16) - 1); value >>= exp; result += exp; exp = 8 * SafeCast.toUint(value > (1 << 8) - 1); value >>= exp; result += exp; exp = 4 * SafeCast.toUint(value > (1 << 4) - 1); value >>= exp; result += exp; exp = 2 * SafeCast.toUint(value > (1 << 2) - 1); value >>= exp; result += exp; result += SafeCast.toUint(value > 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 isGt; unchecked { isGt = SafeCast.toUint(value > (1 << 128) - 1); value >>= isGt * 128; result += isGt * 16; isGt = SafeCast.toUint(value > (1 << 64) - 1); value >>= isGt * 64; result += isGt * 8; isGt = SafeCast.toUint(value > (1 << 32) - 1); value >>= isGt * 32; result += isGt * 4; isGt = SafeCast.toUint(value > (1 << 16) - 1); value >>= isGt * 16; result += isGt * 2; result += SafeCast.toUint(value > (1 << 8) - 1); } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } /** * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump. */ function toUint(bool b) internal pure returns (uint256 u) { assembly ("memory-safe") { u := iszero(iszero(b)) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; import {SafeCast} from "./SafeCast.sol"; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * int256(SafeCast.toUint(condition))); } } /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // Formula from the "Bit Twiddling Hacks" by Sean Eron Anderson. // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift, // taking advantage of the most significant (or "sign" bit) in two's complement representation. // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result, // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative). int256 mask = n >> 255; // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it. return uint256((n + mask) ^ mask); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol) pragma solidity ^0.8.20; /** * @dev Helper library for emitting standardized panic codes. * * ```solidity * contract Example { * using Panic for uint256; * * // Use any of the declared internal constants * function foo() { Panic.GENERIC.panic(); } * * // Alternatively * function foo() { Panic.panic(Panic.GENERIC); } * } * ``` * * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. * * _Available since v5.1._ */ // slither-disable-next-line unused-state library Panic { /// @dev generic / unspecified error uint256 internal constant GENERIC = 0x00; /// @dev used by the assert() builtin uint256 internal constant ASSERT = 0x01; /// @dev arithmetic underflow or overflow uint256 internal constant UNDER_OVERFLOW = 0x11; /// @dev division or modulo by zero uint256 internal constant DIVISION_BY_ZERO = 0x12; /// @dev enum conversion error uint256 internal constant ENUM_CONVERSION_ERROR = 0x21; /// @dev invalid encoding in storage uint256 internal constant STORAGE_ENCODING_ERROR = 0x22; /// @dev empty array pop uint256 internal constant EMPTY_ARRAY_POP = 0x31; /// @dev array out of bounds access uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32; /// @dev resource error (too large allocation or too large array) uint256 internal constant RESOURCE_ERROR = 0x41; /// @dev calling invalid internal function uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51; /// @dev Reverts with a panic code. Recommended to use with /// the internal constants with predefined codes. function panic(uint256 code) internal pure { assembly ("memory-safe") { mstore(0x00, 0x4e487b71) mstore(0x20, code) revert(0x1c, 0x24) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; assembly ("memory-safe") { ptr := add(buffer, add(32, length)) } while (true) { ptr--; assembly ("memory-safe") { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal * representation, according to EIP-55. */ function toChecksumHexString(address addr) internal pure returns (string memory) { bytes memory buffer = bytes(toHexString(addr)); // hash the hex part of buffer (skip length + 2 bytes, length 40) uint256 hashValue; assembly ("memory-safe") { hashValue := shr(96, keccak256(add(buffer, 0x22), 40)) } for (uint256 i = 41; i > 1; --i) { // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f) if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) { // case shift by xoring with 0x20 buffer[i] ^= 0x20; } hashValue >>= 4; } return string(buffer); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * The `_sequentialUpTo()` function can be overriden to enable spot mints * (i.e. non-consecutive mints) for `tokenId`s greater than `_sequentialUpTo()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // The amount of tokens minted above `_sequentialUpTo()`. // We call these spot mints (i.e. non-sequential mints). uint256 private _spotMinted; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); if (_sequentialUpTo() < _startTokenId()) _revert(SequentialUpToTooSmall.selector); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID for sequential mints. * * Override this function to change the starting token ID for sequential mints. * * Note: The value returned must never change after any tokens have been minted. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the maximum token ID (inclusive) for sequential mints. * * Override this function to return a value less than 2**256 - 1, * but greater than `_startTokenId()`, to enable spot (non-sequential) mints. * * Note: The value returned must never change after any tokens have been minted. */ function _sequentialUpTo() internal view virtual returns (uint256) { return type(uint256).max; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256 result) { // Counter underflow is impossible as `_burnCounter` cannot be incremented // more than `_currentIndex + _spotMinted - _startTokenId()` times. unchecked { // With spot minting, the intermediate `result` can be temporarily negative, // and the computation must be unchecked. result = _currentIndex - _burnCounter - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += _spotMinted; } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256 result) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { result = _currentIndex - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += _spotMinted; } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } /** * @dev Returns the total number of tokens that are spot-minted. */ function _totalSpotMinted() internal view virtual returns (uint256) { return _spotMinted; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) _revert(BalanceQueryForZeroAddress.selector); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Returns whether the ownership slot at `index` is initialized. * An uninitialized slot does not necessarily mean that the slot has no owner. */ function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) { return _packedOwnerships[index] != 0; } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * @dev Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; if (tokenId > _sequentialUpTo()) { if (_packedOwnershipExists(packed)) return packed; _revert(OwnerQueryForNonexistentToken.selector); } // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; if (packed & _BITMASK_BURNED == 0) return packed; // Otherwise, the token is burned, and we must revert. // This handles the case of batch burned tokens, where only the burned bit // of the starting slot is set, and remaining slots are left uninitialized. _revert(OwnerQueryForNonexistentToken.selector); } } // Otherwise, the data exists and we can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. // If the token is not burned, return `packed`. Otherwise, revert. if (packed & _BITMASK_BURNED == 0) return packed; } _revert(OwnerQueryForNonexistentToken.selector); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) _revert(ApprovalQueryForNonexistentToken.selector); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool result) { if (_startTokenId() <= tokenId) { if (tokenId > _sequentialUpTo()) return _packedOwnershipExists(_packedOwnerships[tokenId]); if (tokenId < _currentIndex) { uint256 packed; while ((packed = _packedOwnerships[tokenId]) == 0) --tokenId; result = packed & _BITMASK_BURNED == 0; } } } /** * @dev Returns whether `packed` represents a token that exists. */ function _packedOwnershipExists(uint256 packed) private pure returns (bool result) { assembly { // The following is equivalent to `owner != address(0) && burned == false`. // Symbolically tested. result := gt(and(packed, _BITMASK_ADDRESS), and(packed, _BITMASK_BURNED)) } } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS)); if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. from, // `from`. toMasked, // `to`. tokenId // `tokenId`. ) } if (toMasked == 0) _revert(TransferToZeroAddress.selector); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { _revert(TransferToNonERC721ReceiverImplementer.selector); } assembly { revert(add(32, reason), mload(reason)) } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) _revert(MintZeroQuantity.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); uint256 end = startTokenId + quantity; uint256 tokenId = startTokenId; if (end - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); do { assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } // The `!=` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. } while (++tokenId != end); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) _revert(MintToZeroAddress.selector); if (quantity == 0) _revert(MintZeroQuantity.selector); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); if (startTokenId + quantity - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } while (index < end); // This prevents reentrancy to `_safeMint`. // It does not prevent reentrancy to `_safeMintSpot`. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } /** * @dev Mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * Emits a {Transfer} event for each mint. */ function _mintSpot(address to, uint256 tokenId) internal virtual { if (tokenId <= _sequentialUpTo()) _revert(SpotMintTokenIdTooSmall.selector); uint256 prevOwnershipPacked = _packedOwnerships[tokenId]; if (_packedOwnershipExists(prevOwnershipPacked)) _revert(TokenAlreadyExists.selector); _beforeTokenTransfers(address(0), to, tokenId, 1); // Overflows are incredibly unrealistic. // The `numberMinted` for `to` is incremented by 1, and has a max limit of 2**64 - 1. // `_spotMinted` is incremented by 1, and has a max limit of 2**256 - 1. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `true` (as `quantity == 1`). _packedOwnerships[tokenId] = _packOwnershipData( to, _nextInitializedFlag(1) | _nextExtraData(address(0), to, prevOwnershipPacked) ); // Updates: // - `balance += 1`. // - `numberMinted += 1`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += (1 << _BITPOS_NUMBER_MINTED) | 1; // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } ++_spotMinted; } _afterTokenTransfers(address(0), to, tokenId, 1); } /** * @dev Safely mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * See {_mintSpot}. * * Emits a {Transfer} event. */ function _safeMintSpot( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mintSpot(to, tokenId); unchecked { if (to.code.length != 0) { uint256 currentSpotMinted = _spotMinted; if (!_checkContractOnERC721Received(address(0), to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } // This prevents reentrancy to `_safeMintSpot`. // It does not prevent reentrancy to `_safeMint`. if (_spotMinted != currentSpotMinted) revert(); } } } /** * @dev Equivalent to `_safeMintSpot(to, tokenId, '')`. */ function _safeMintSpot(address to, uint256 tokenId) internal virtual { _safeMintSpot(to, tokenId, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @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: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck && _msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { _revert(ApprovalCallerNotOwnerNorApproved.selector); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as `_burnCounter` cannot be exceed `_currentIndex + _spotMinted` times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721ABurnable.sol'; import '../ERC721A.sol'; /** * @title ERC721ABurnable. * * @dev ERC721A token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual override { _burn(tokenId, true); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721ABurnable. */ interface IERC721ABurnable is IERC721A { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); /** * `_sequentialUpTo()` must be greater than `_startTokenId()`. */ error SequentialUpToTooSmall(); /** * The `tokenId` of a sequential mint exceeds `_sequentialUpTo()`. */ error SequentialMintExceedsLimit(); /** * Spot minting requires a `tokenId` greater than `_sequentialUpTo()`. */ error SpotMintTokenIdTooSmall(); /** * Cannot mint over a token that already exists. */ error TokenAlreadyExists(); /** * The feature is not compatible with spot mints. */ error NotCompatibleWithSpotMints(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @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`, * 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 be 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, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * 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 payable; /** * @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 payable; /** * @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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; function _sendLogPayloadImplementation(bytes memory payload) internal view { address consoleAddress = CONSOLE_ADDRESS; /// @solidity memory-safe-assembly assembly { pop( staticcall( gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0 ) ) } } function _castToPure( function(bytes memory) internal view fnIn ) internal pure returns (function(bytes memory) pure fnOut) { assembly { fnOut := fnIn } } function _sendLogPayload(bytes memory payload) internal pure { _castToPure(_sendLogPayloadImplementation)(payload); } function log() internal pure { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); } function logUint(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function logString(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function log(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint256 p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); } function log(uint256 p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); } function log(uint256 p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); } function log(uint256 p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); } function log(string memory p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); } function log(string memory p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); } function log(bool p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); } function log(address p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint256 p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); } function log(uint256 p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); } function log(uint256 p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); } function log(uint256 p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); } function log(uint256 p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); } function log(uint256 p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); } function log(uint256 p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); } function log(uint256 p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); } function log(uint256 p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); } function log(uint256 p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); } function log(uint256 p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); } function log(uint256 p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); } function log(uint256 p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); } function log(string memory p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); } function log(string memory p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); } function log(string memory p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); } function log(string memory p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); } function log(bool p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); } function log(bool p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); } function log(bool p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); } function log(address p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); } function log(address p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); } function log(address p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
{ "evmVersion": "paris", "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_mintPrice","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"address","name":"_pixelAddress","type":"address"},{"internalType":"uint256","name":"_pixelPrice","type":"uint256"},{"internalType":"uint256","name":"_pixelAllowance","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"}],"name":"InvalidAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"LimitExceeded","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"name":"NoSupply","type":"error"},{"inputs":[],"name":"NotAllowed","type":"error"},{"inputs":[],"name":"NotCompatibleWithSpotMints","type":"error"},{"inputs":[],"name":"NotExists","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"SequentialMintExceedsLimit","type":"error"},{"inputs":[],"name":"SequentialUpToTooSmall","type":"error"},{"inputs":[],"name":"SpotMintTokenIdTooSmall","type":"error"},{"inputs":[],"name":"TokenAlreadyExists","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"DepositPixels","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"MintPixels","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"WithdrawPixels","type":"event"},{"inputs":[],"name":"accessMode","outputs":[{"internalType":"enum Dex.Access","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"amount","type":"uint256[]"}],"name":"addToAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowlist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"pixelAmount","type":"uint256"}],"name":"depositPixels","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getHTML","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getImage","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"pixelAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"pixelAmount","type":"uint256"}],"name":"mintPixels","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pixelAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pixelPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pixels","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"removeFromAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"rescuePixels","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"enum Dex.Access","name":"_accessMode","type":"uint8"}],"name":"setAccessMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes12[]","name":"colorBytes","type":"bytes12[]"}],"name":"setColors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_externalURL","type":"string"}],"name":"setExternalURL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_htmlPrefix","type":"string"},{"internalType":"string","name":"_htmlSuffix","type":"string"}],"name":"setHTMLContainer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pixelAddress","type":"address"}],"name":"setPixelAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"},{"internalType":"uint256","name":"_pixelPrice","type":"uint256"}],"name":"setPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_xmlPrefix","type":"string"},{"internalType":"string","name":"_xmlSuffix","type":"string"}],"name":"setSVGContainer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_xml","type":"string"}],"name":"setSVGXML","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_script","type":"string"}],"name":"setScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"pixelAmount","type":"uint256"}],"name":"withdrawPixels","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000601b60006101000a81548160ff0219169083600281111561002a57610029610294565b5b021790555034801561003b57600080fd5b506040516166aa3803806166aa833981810160405281019061005d91906104cc565b338787816002908161006f91906107bd565b50806003908161007f91906107bd565b5061008e6101ba60201b60201c565b6000819055506100a26101ba60201b60201c565b6100b06101bf60201b60201c565b10156100cd576100cc63fed8210f60e01b6101c460201b60201c565b5b5050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036101415760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610138919061089e565b60405180910390fd5b610150816101ce60201b60201c565b5084600a8190555083600b8190555082600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600d8190555080600e81905550505050505050506108b9565b600090565b600090565b8060005260046000fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61032a826102e1565b810181811067ffffffffffffffff82111715610349576103486102f2565b5b80604052505050565b600061035c6102c3565b90506103688282610321565b919050565b600067ffffffffffffffff821115610388576103876102f2565b5b610391826102e1565b9050602081019050919050565b60005b838110156103bc5780820151818401526020810190506103a1565b60008484015250505050565b60006103db6103d68461036d565b610352565b9050828152602081018484840111156103f7576103f66102dc565b5b61040284828561039e565b509392505050565b600082601f83011261041f5761041e6102d7565b5b815161042f8482602086016103c8565b91505092915050565b6000819050919050565b61044b81610438565b811461045657600080fd5b50565b60008151905061046881610442565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104998261046e565b9050919050565b6104a98161048e565b81146104b457600080fd5b50565b6000815190506104c6816104a0565b92915050565b600080600080600080600060e0888a0312156104eb576104ea6102cd565b5b600088015167ffffffffffffffff811115610509576105086102d2565b5b6105158a828b0161040a565b975050602088015167ffffffffffffffff811115610536576105356102d2565b5b6105428a828b0161040a565b96505060406105538a828b01610459565b95505060606105648a828b01610459565b94505060806105758a828b016104b7565b93505060a06105868a828b01610459565b92505060c06105978a828b01610459565b91505092959891949750929550565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806105f857607f821691505b60208210810361060b5761060a6105b1565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026106737fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610636565b61067d8683610636565b95508019841693508086168417925050509392505050565b6000819050919050565b60006106ba6106b56106b084610438565b610695565b610438565b9050919050565b6000819050919050565b6106d48361069f565b6106e86106e0826106c1565b848454610643565b825550505050565b600090565b6106fd6106f0565b6107088184846106cb565b505050565b5b8181101561072c576107216000826106f5565b60018101905061070e565b5050565b601f8211156107715761074281610611565b61074b84610626565b8101602085101561075a578190505b61076e61076685610626565b83018261070d565b50505b505050565b600082821c905092915050565b600061079460001984600802610776565b1980831691505092915050565b60006107ad8383610783565b9150826002028217905092915050565b6107c6826105a6565b67ffffffffffffffff8111156107df576107de6102f2565b5b6107e982546105e0565b6107f4828285610730565b600060209050601f8311600181146108275760008415610815578287015190505b61081f85826107a1565b865550610887565b601f19841661083586610611565b60005b8281101561085d57848901518255600182019150602085019450602081019050610838565b8683101561087a5784890151610876601f891682610783565b8355505b6001600288020188555050505b505050505050565b6108988161048e565b82525050565b60006020820190506108b3600083018461088f565b92915050565b615de2806108c86000396000f3fe6080604052600436106102935760003560e01c806378a4ab851161015a578063b88d4fde116100c1578063e985e9c51161007a578063e985e9c5146109cc578063efd9495414610a09578063f2fde38b14610a32578063f3fef3a314610a5b578063f6153ccd14610a84578063ffb8717314610aaf57610293565b8063b88d4fde146108cb578063bf9e3edf146108e7578063c12dc64414610910578063c87b56dd14610939578063cdf74f0014610976578063d5abeb01146109a157610293565b806395d89b411161011357806395d89b41146107bf5780639622dc4b146107ea578063a22cb46514610813578063a7cd52cb1461083c578063ad81a45114610879578063b21ed050146108a257610293565b806378a4ab85146106b15780637b5c6e28146106da5780637e31d2cc146107055780638da5cb5b1461072e5780638da7f2321461075957806390c3f38f1461079657610293565b80632607aafa116101fe57806358afc838116101b757806358afc838146105b05780636352211e146105cc5780636817c76c1461060957806370a0823114610634578063715018a61461067157806375ca6b1c1461068857610293565b80632607aafa1461049f5780632a6f0c2d146104dc5780632bc91110146105055780632e43d7dc1461052e57806342842e0e1461056b57806342966c681461058757610293565b8063102581d211610250578063102581d2146103ab578063104b6cb7146103e857806312065fe014610411578063156e29f61461043c57806318160ddd1461045857806323b872dd1461048357610293565b806301dbcd4a1461029857806301ffc9a7146102c157806305fefda7146102fe57806306fdde0314610327578063081812fc14610352578063095ea7b31461038f575b600080fd5b3480156102a457600080fd5b506102bf60048036038101906102ba91906139f3565b610ada565b005b3480156102cd57600080fd5b506102e860048036038101906102e39190613a98565b610af8565b6040516102f59190613ae0565b60405180910390f35b34801561030a57600080fd5b5061032560048036038101906103209190613b31565b610b0a565b005b34801561033357600080fd5b5061033c610b24565b6040516103499190613c01565b60405180910390f35b34801561035e57600080fd5b5061037960048036038101906103749190613c23565b610bb6565b6040516103869190613c91565b60405180910390f35b6103a960048036038101906103a49190613cd8565b610c14565b005b3480156103b757600080fd5b506103d260048036038101906103cd9190613c23565b610c24565b6040516103df9190613c01565b60405180910390f35b3480156103f457600080fd5b5061040f600480360381019061040a9190613d6e565b610c7b565b005b34801561041d57600080fd5b50610426610d0d565b6040516104339190613dca565b60405180910390f35b61045660048036038101906104519190613de5565b610d15565b005b34801561046457600080fd5b5061046d6111a9565b60405161047a9190613dca565b60405180910390f35b61049d60048036038101906104989190613e38565b6111f6565b005b3480156104ab57600080fd5b506104c660048036038101906104c19190613c23565b6114b7565b6040516104d39190613c01565b60405180910390f35b3480156104e857600080fd5b5061050360048036038101906104fe91906139f3565b6114f6565b005b34801561051157600080fd5b5061052c60048036038101906105279190613b31565b611514565b005b34801561053a57600080fd5b5061055560048036038101906105509190613c23565b611713565b6040516105629190613dca565b60405180910390f35b61058560048036038101906105809190613e38565b61172b565b005b34801561059357600080fd5b506105ae60048036038101906105a99190613c23565b61174b565b005b6105ca60048036038101906105c59190613de5565b611759565b005b3480156105d857600080fd5b506105f360048036038101906105ee9190613c23565b6119cf565b6040516106009190613c91565b60405180910390f35b34801561061557600080fd5b5061061e6119e1565b60405161062b9190613dca565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190613e8b565b6119e7565b6040516106689190613dca565b60405180910390f35b34801561067d57600080fd5b50610686611a7e565b005b34801561069457600080fd5b506106af60048036038101906106aa9190613eb8565b611a92565b005b3480156106bd57600080fd5b506106d860048036038101906106d391906139f3565b611ac4565b005b3480156106e657600080fd5b506106ef611ae2565b6040516106fc9190613fb0565b60405180910390f35b34801561071157600080fd5b5061072c60048036038101906107279190613ff0565b611af5565b005b34801561073a57600080fd5b50610743611b2a565b6040516107509190613c91565b60405180910390f35b34801561076557600080fd5b50610780600480360381019061077b9190613c23565b611b54565b60405161078d9190613dca565b60405180910390f35b3480156107a257600080fd5b506107bd60048036038101906107b891906139f3565b611b6c565b005b3480156107cb57600080fd5b506107d4611b8a565b6040516107e19190613c01565b60405180910390f35b3480156107f657600080fd5b50610811600480360381019061080c9190613eb8565b611c1c565b005b34801561081f57600080fd5b5061083a60048036038101906108359190614049565b611c4e565b005b34801561084857600080fd5b50610863600480360381019061085e9190613e8b565b611d59565b6040516108709190613dca565b60405180910390f35b34801561088557600080fd5b506108a0600480360381019061089b9190613b31565b611d71565b005b3480156108ae57600080fd5b506108c960048036038101906108c491906140df565b611f07565b005b6108e560048036038101906108e09190614290565b611fb5565b005b3480156108f357600080fd5b5061090e60048036038101906109099190614369565b612007565b005b34801561091c57600080fd5b5061093760048036038101906109329190613cd8565b612099565b005b34801561094557600080fd5b50610960600480360381019061095b9190613c23565b61221d565b60405161096d9190613c01565b60405180910390f35b34801561098257600080fd5b5061098b612353565b6040516109989190613c91565b60405180910390f35b3480156109ad57600080fd5b506109b6612379565b6040516109c39190613dca565b60405180910390f35b3480156109d857600080fd5b506109f360048036038101906109ee91906143b6565b61237f565b604051610a009190613ae0565b60405180910390f35b348015610a1557600080fd5b50610a306004803603810190610a2b9190613e8b565b612413565b005b348015610a3e57600080fd5b50610a596004803603810190610a549190613e8b565b61245f565b005b348015610a6757600080fd5b50610a826004803603810190610a7d9190613cd8565b6124e5565b005b348015610a9057600080fd5b50610a996124fb565b604051610aa69190613dca565b60405180910390f35b348015610abb57600080fd5b50610ac4612501565b604051610ad19190613dca565b60405180910390f35b610ae2612507565b818160159182610af392919061460d565b505050565b6000610b038261258e565b9050919050565b610b12612507565b81600a8190555080600d819055505050565b606060028054610b3390614430565b80601f0160208091040260200160405190810160405280929190818152602001828054610b5f90614430565b8015610bac5780601f10610b8157610100808354040283529160200191610bac565b820191906000526020600020905b815481529060010190602001808311610b8f57829003601f168201915b5050505050905090565b6000610bc182612620565b610bd657610bd563cf4700e460e01b6126cc565b5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b610c20828260016126d6565b5050565b6060610c2f82612620565b610c65576040517f5861b41d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610c7083612805565b905080915050919050565b610c83612507565b60005b82829050811015610d0857601c6000848484818110610ca857610ca76146dd565b5b9050602002016020810190610cbd9190613e8b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090558080600101915050610c86565b505050565b600047905090565b610d1d611b2a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d8b5750600280811115610d6657610d65613f39565b5b601b60009054906101000a900460ff166002811115610d8857610d87613f39565b5b14155b8015610e17575060016002811115610da657610da5613f39565b5b601b60009054906101000a900460ff166002811115610dc857610dc7613f39565b5b141580610e1657506001601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015155b5b15610e4e576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600e541015610e9757600e546040517fcdab4c87000000000000000000000000000000000000000000000000000000008152600401610e8e9190613dca565b60405180910390fd5b610e9f611b2a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610ef4575080600d54610ee3919061473b565b600a54610ef0919061477d565b3414155b15610f505780600d54610f07919061473b565b600a54610f14919061477d565b6040517f3728b83d000000000000000000000000000000000000000000000000000000008152600401610f479190613dca565b60405180910390fd5b600b546001610f5d6111a9565b610f67919061477d565b1115610fac57600b546040517fba666df7000000000000000000000000000000000000000000000000000000008152600401610fa39190613dca565b60405180910390fd5b610fb6838361285c565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166340c10f1930846040518363ffffffff1660e01b81526004016110189291906147b1565b600060405180830381600087803b15801561103257600080fd5b505af1158015611046573d6000803e3d6000fd5b50505050600e54601860008581526020019081526020016000208190555081601960008581526020019081526020016000208190555081601a600082825461108e919061477d565b9250508190555061109d611b2a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561110b5750600160028111156110e7576110e6613f39565b5b601b60009054906101000a900460ff16600281111561110957611108613f39565b5b145b15611168576001601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461116091906147da565b925050819055505b7f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f84848460405161119b9392919061480e565b60405180910390a150505050565b60006111b36129e3565b600154600054030390507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6111e66129e8565b146111f357600854810190505b90565b6000611201826129ed565b905073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161693508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146112765761127563a114810060e01b6126cc565b5b60008061128284612b06565b915091506112988187611293612b2d565b612b35565b6112c3576112ad866112a8612b2d565b61237f565b6112c2576112c16359c896be60e01b6126cc565b5b5b6112d08686866001612b79565b80156112db57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506113a985611385888887612b7f565b7c020000000000000000000000000000000000000000000000000000000017612ba7565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361142f576000600185019050600060046000838152602001908152602001600020540361142d57600054811461142c578360046000838152602001908152602001600020819055505b5b505b600073ffffffffffffffffffffffffffffffffffffffff8673ffffffffffffffffffffffffffffffffffffffff161690508481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600081036114a1576114a063ea553b3460e01b6126cc565b5b6114ae8787876001612bd2565b50505050505050565b606060006114c483612bd8565b90506114cf81612c6c565b6040516020016114df91906148cd565b604051602081830303815290604052915050919050565b6114fe612507565b81816014918261150f92919061460d565b505050565b61151d826119cf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611581576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80601960008481526020019081526020016000205410156115ec5760196000838152602001908152602001600020546040517fcdab4c870000000000000000000000000000000000000000000000000000000081526004016115e39190613dca565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b815260040161164e9291906147b1565b6020604051808303816000875af115801561166d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116919190614904565b50816019600085815260200190815260200160002060008282546116b591906147da565b9250508190555081601a60008282546116ce91906147da565b925050819055507f3b521c8af34195400740571d0d05a52b949b36ed6e7d8ef4845b43d38eaf02cd8383604051611706929190614931565b60405180910390a1505050565b60186020528060005260406000206000915090505481565b61174683838360405180602001604052806000815250611fb5565b505050565b611756816001612c99565b50565b611762826119cf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117c6576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80601860008481526020019081526020016000205410156118315760186000838152602001908152602001600020546040517fcdab4c870000000000000000000000000000000000000000000000000000000081526004016118289190613dca565b60405180910390fd5b611839611b2a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611881575080600d5461187d919061473b565b3414155b156118d05780600d54611894919061473b565b6040517f3728b83d0000000000000000000000000000000000000000000000000000000081526004016118c79190613dca565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166340c10f1985846040518363ffffffff1660e01b81526004016119329291906147b1565b600060405180830381600087803b15801561194c57600080fd5b505af1158015611960573d6000803e3d6000fd5b505050508160186000858152602001908152602001600020600082825461198791906147da565b925050819055507f6cafb7f3cd36588f49632a9262ae220fe89116aff66b393b9ca986e11f440e188484846040516119c19392919061480e565b60405180910390a150505050565b60006119da826129ed565b9050919050565b600a5481565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a2d57611a2c638f4eb60460e01b6126cc565b5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611a86612507565b611a906000612eca565b565b611a9a612507565b838360129182611aab92919061460d565b50818160139182611abd92919061460d565b5050505050565b611acc612507565b818160119182611add92919061460d565b505050565b601b60009054906101000a900460ff1681565b611afd612507565b80601b60006101000a81548160ff02191690836002811115611b2257611b21613f39565b5b021790555050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60196020528060005260406000206000915090505481565b611b74612507565b818160169182611b8592919061460d565b505050565b606060038054611b9990614430565b80601f0160208091040260200160405190810160405280929190818152602001828054611bc590614430565b8015611c125780601f10611be757610100808354040283529160200191611c12565b820191906000526020600020905b815481529060010190602001808311611bf557829003601f168201915b5050505050905090565b611c24612507565b8383600f9182611c3592919061460d565b50818160109182611c4792919061460d565b5050505050565b8060076000611c5b612b2d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611d08612b2d565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d4d9190613ae0565b60405180910390a35050565b601c6020528060005260406000206000915090505481565b611d7a826119cf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dde576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401611e429392919061495a565b6020604051808303816000875af1158015611e61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e859190614904565b5081601960008581526020019081526020016000206000828254611ea9919061477d565b9250508190555081601a6000828254611ec2919061477d565b925050819055507f3dac84b5d37fa4f94e5f8c709a8d72c1f4aa9d224e42860925a21d422ba340338383604051611efa929190614931565b60405180910390a1505050565b611f0f612507565b60005b84849050811015611fae57828282818110611f3057611f2f6146dd565b5b90506020020135601c6000878785818110611f4e57611f4d6146dd565b5b9050602002016020810190611f639190613e8b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508080600101915050611f12565b5050505050565b611fc08484846111f6565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461200157611feb84848484612f90565b61200057611fff63d1a57ed660e01b6126cc565b5b5b50505050565b61200f612507565b60005b82829050811015612094578282828181106120305761202f6146dd565b5b905060200201602081019061204591906149e9565b60176000600184612056919061477d565b815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff021916908360a01c02179055508080600101915050612012565b505050565b6120a1612507565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000601a548273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016121069190613c91565b602060405180830381865afa158015612123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121479190614a2b565b61215191906147da565b90508281101561219857806040517fcdab4c8700000000000000000000000000000000000000000000000000000000815260040161218f9190613dca565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016121d39291906147b1565b6020604051808303816000875af11580156121f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122169190614904565b5050505050565b606061222882612620565b61225e576040517f5861b41d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061227c60196000858152602001908152602001600020546130bf565b9050600061228984612805565b90506000826122aa60186000888152602001908152602001600020546130bf565b6040516020016122bb929190614c46565b604051602081830303815290604052905060006122d7866130bf565b60166122e2886114b7565b60156122ed8a61318d565b886122f789612c6c565b8860405160200161230f9897969594939291906150e0565b604051602081830303815290604052905061232981612c6c565b6040516020016123399190615238565b604051602081830303815290604052945050505050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61241b612507565b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b612467612507565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036124d95760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016124d09190613c91565b60405180910390fd5b6124e281612eca565b50565b6124ed612507565b6124f78282613323565b5050565b601a5481565b600d5481565b61250f613412565b73ffffffffffffffffffffffffffffffffffffffff1661252d611b2a565b73ffffffffffffffffffffffffffffffffffffffff161461258c57612550613412565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016125839190613c91565b60405180910390fd5b565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806125e957506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806126195750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008161262b6129e3565b116126c6576126386129e8565b8211156126625761265b600460008481526020019081526020016000205461341a565b90506126c7565b6000548210156126c55760005b600060046000858152602001908152602001600020549150810361269e57826126979061525a565b925061266f565b60007c01000000000000000000000000000000000000000000000000000000008216149150505b5b5b919050565b8060005260046000fd5b60006126e1836119cf565b905081801561272357508073ffffffffffffffffffffffffffffffffffffffff1661270a612b2d565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561274f5761273981612734612b2d565b61237f565b61274e5761274d63cfb3b94260e01b6126cc565b5b5b836006600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550828473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a450505050565b6060600f6128128361318d565b61282e60196000868152602001908152602001600020546130bf565b60116010604051602001612846959493929190615367565b6040516020818303038152906040529050919050565b6128646129e8565b811161287b5761287a63524a12cc60e01b6126cc565b5b60006004600083815260200190815260200160002054905061289c8161341a565b156128b2576128b163c991cbb160e01b6126cc565b5b6128c0600084846001612b79565b6128e0836128d060008685612b7f565b6128da600161345b565b17612ba7565b6004600084815260200190815260200160002081905550600160406001901b17600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161690506000810361299657612995632e07630060e01b6126cc565b5b828160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460086000815460010191905081905550506129de600084846001612bd2565b505050565b600090565b600090565b6000816129f86129e3565b11612af05760046000838152602001908152602001600020549050612a1b6129e8565b821115612a4057612a2b8161341a565b612b0157612a3f63df2d9b4260e01b6126cc565b5b60008103612ac7576000548210612a6257612a6163df2d9b4260e01b6126cc565b5b5b60046000836001900393508381526020019081526020016000205490506000810315612ac25760007c010000000000000000000000000000000000000000000000000000000082160315612b0157612ac163df2d9b4260e01b6126cc565b5b612a63565b60007c010000000000000000000000000000000000000000000000000000000082160315612b01575b612b0063df2d9b4260e01b6126cc565b5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612b9686868461346b565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60606000612be583613474565b90506000612bf28461357b565b9050600060196000868152602001908152602001600020549050601283612c18876130bf565b612c21846130bf565b612c3761271086612c32919061540d565b6130bf565b8660146013604051602001612c539897969594939291906157ce565b6040516020818303038152906040529350505050919050565b6060612c9282604051806060016040528060408152602001615d6d604091396001613644565b9050919050565b6000612ca4836129ed565b90506000819050600080612cb786612b06565b915091508415612cff57612cd38184612cce612b2d565b612b35565b612cfe57612ce883612ce3612b2d565b61237f565b612cfd57612cfc6359c896be60e01b6126cc565b5b5b5b612d0d836000886001612b79565b8015612d1857600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612dc083612d7d85600088612b7f565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717612ba7565b600460008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851603612e465760006001870190506000600460008381526020019081526020016000205403612e44576000548114612e43578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612eb0836000886001612bd2565b600160008154809291906001019190505550505050505050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612fb6612b2d565b8786866040518563ffffffff1660e01b8152600401612fd89493929190615903565b6020604051808303816000875af192505050801561301457506040513d601f19601f820116820180604052508101906130119190615964565b60015b61306c573d8060008114613044576040519150601f19603f3d011682016040523d82523d6000602084013e613049565b606091505b5060008151036130645761306363d1a57ed660e01b6126cc565b5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6060600060016130ce846137d8565b01905060008167ffffffffffffffff8111156130ed576130ec614165565b5b6040519080825280601f01601f19166020018201604052801561311f5781602001600182028036833780820191505090505b509050600082602001820190505b600115613182578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581613176576131756153de565b5b0494506000850361312d575b819350505050919050565b606060006040518060400160405280600281526020017f5b5b000000000000000000000000000000000000000000000000000000000000815250905060005b60048110156132fa57816131ec856003846131e7919061473b565b61392b565b61320e8660016003866131ff919061473b565b613209919061477d565b61392b565b613230876002600387613221919061473b565b61322b919061477d565b61392b565b60018514613291576003851461327b576040518060400160405280600181526020017f2c0000000000000000000000000000000000000000000000000000000000000081525061328c565b604051806020016040528060008152505b6132c8565b6040518060400160405280600381526020017f5d2c5b00000000000000000000000000000000000000000000000000000000008152505b6040516020016132dc9594939291906159dd565b604051602081830303815290604052915080806001019150506131cc565b508060405160200161330c9190615aa0565b604051602081830303815290604052915050919050565b8047101561336a5747816040517fcf479181000000000000000000000000000000000000000000000000000000008152600401613361929190614931565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161339090615ae8565b60006040518083038185875af1925050503d80600081146133cd576040519150601f19603f3d011682016040523d82523d6000602084013e6133d2565b606091505b505090508061340d576040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b600033905090565b60007c0100000000000000000000000000000000000000000000000000000000821673ffffffffffffffffffffffffffffffffffffffff8316119050919050565b60006001821460e11b9050919050565b60009392505050565b606060006040518060400160405280600781526020017f3a726f6f74207b00000000000000000000000000000000000000000000000000815250905060005b600481101561355257816134c6826130bf565b6134dc866003856134d7919061473b565b61392b565b6134fe8760016003876134ef919061473b565b6134f9919061477d565b61392b565b613520886002600388613511919061473b565b61351b919061477d565b61392b565b604051602001613534959493929190615be1565b604051602081830303815290604052915080806001019150506134b3565b50806040516020016135649190615c63565b604051602081830303815290604052915050919050565b60608060005b600581101561363a57816135ad85600360048561359e9190615c85565b6135a8919061473b565b61392b565b6135db86600160036004876135c29190615c85565b6135cc919061473b565b6135d6919061477d565b61392b565b61360987600260036004886135f09190615c85565b6135fa919061473b565b613604919061477d565b61392b565b60405160200161361c9493929190615d02565b60405160208183030381529060405291508080600101915050613581565b5080915050919050565b60606000845103613666576040518060200160405280600081525090506137d1565b60008261369857600360028651600461367f919061473b565b613689919061477d565b613693919061540d565b6136bf565b6003600286516136a8919061477d565b6136b2919061540d565b60046136be919061473b565b5b905060008167ffffffffffffffff8111156136dd576136dc614165565b5b6040519080825280601f01601f19166020018201604052801561370f5781602001600182028036833780820191505090505b50905060018501602082018788518901602081018051600082525b82841015613785576003840193508351603f8160121c168701518653600186019550603f81600c1c168701518653600186019550603f8160061c168701518653600186019550603f811687015186536001860195505061372a565b80825289156137c55760038c5106600181146137a857600281146137bb576137c3565b603d6001870353603d60028703536137c3565b603d60018703535b505b50505050505080925050505b9392505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613836577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161382c5761382b6153de565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310613873576d04ee2d6d415b85acef81000000008381613869576138686153de565b5b0492506020810190505b662386f26fc1000083106138a257662386f26fc100008381613898576138976153de565b5b0492506010810190505b6305f5e10083106138cb576305f5e10083816138c1576138c06153de565b5b0492506008810190505b61271083106138f05761271083816138e6576138e56153de565b5b0492506004810190505b606483106139135760648381613909576139086153de565b5b0492506002810190505b600a8310613922576001810190505b80915050919050565b60606139726017600085815260200190815260200160002060009054906101000a900460a01b83600c8110613963576139626146dd565b5b1a60f81b60f81c60ff166130bf565b905092915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126139b3576139b261398e565b5b8235905067ffffffffffffffff8111156139d0576139cf613993565b5b6020830191508360018202830111156139ec576139eb613998565b5b9250929050565b60008060208385031215613a0a57613a09613984565b5b600083013567ffffffffffffffff811115613a2857613a27613989565b5b613a348582860161399d565b92509250509250929050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a7581613a40565b8114613a8057600080fd5b50565b600081359050613a9281613a6c565b92915050565b600060208284031215613aae57613aad613984565b5b6000613abc84828501613a83565b91505092915050565b60008115159050919050565b613ada81613ac5565b82525050565b6000602082019050613af56000830184613ad1565b92915050565b6000819050919050565b613b0e81613afb565b8114613b1957600080fd5b50565b600081359050613b2b81613b05565b92915050565b60008060408385031215613b4857613b47613984565b5b6000613b5685828601613b1c565b9250506020613b6785828601613b1c565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613bab578082015181840152602081019050613b90565b60008484015250505050565b6000601f19601f8301169050919050565b6000613bd382613b71565b613bdd8185613b7c565b9350613bed818560208601613b8d565b613bf681613bb7565b840191505092915050565b60006020820190508181036000830152613c1b8184613bc8565b905092915050565b600060208284031215613c3957613c38613984565b5b6000613c4784828501613b1c565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613c7b82613c50565b9050919050565b613c8b81613c70565b82525050565b6000602082019050613ca66000830184613c82565b92915050565b613cb581613c70565b8114613cc057600080fd5b50565b600081359050613cd281613cac565b92915050565b60008060408385031215613cef57613cee613984565b5b6000613cfd85828601613cc3565b9250506020613d0e85828601613b1c565b9150509250929050565b60008083601f840112613d2e57613d2d61398e565b5b8235905067ffffffffffffffff811115613d4b57613d4a613993565b5b602083019150836020820283011115613d6757613d66613998565b5b9250929050565b60008060208385031215613d8557613d84613984565b5b600083013567ffffffffffffffff811115613da357613da2613989565b5b613daf85828601613d18565b92509250509250929050565b613dc481613afb565b82525050565b6000602082019050613ddf6000830184613dbb565b92915050565b600080600060608486031215613dfe57613dfd613984565b5b6000613e0c86828701613cc3565b9350506020613e1d86828701613b1c565b9250506040613e2e86828701613b1c565b9150509250925092565b600080600060608486031215613e5157613e50613984565b5b6000613e5f86828701613cc3565b9350506020613e7086828701613cc3565b9250506040613e8186828701613b1c565b9150509250925092565b600060208284031215613ea157613ea0613984565b5b6000613eaf84828501613cc3565b91505092915050565b60008060008060408587031215613ed257613ed1613984565b5b600085013567ffffffffffffffff811115613ef057613eef613989565b5b613efc8782880161399d565b9450945050602085013567ffffffffffffffff811115613f1f57613f1e613989565b5b613f2b8782880161399d565b925092505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613f7957613f78613f39565b5b50565b6000819050613f8a82613f68565b919050565b6000613f9a82613f7c565b9050919050565b613faa81613f8f565b82525050565b6000602082019050613fc56000830184613fa1565b92915050565b60038110613fd857600080fd5b50565b600081359050613fea81613fcb565b92915050565b60006020828403121561400657614005613984565b5b600061401484828501613fdb565b91505092915050565b61402681613ac5565b811461403157600080fd5b50565b6000813590506140438161401d565b92915050565b600080604083850312156140605761405f613984565b5b600061406e85828601613cc3565b925050602061407f85828601614034565b9150509250929050565b60008083601f84011261409f5761409e61398e565b5b8235905067ffffffffffffffff8111156140bc576140bb613993565b5b6020830191508360208202830111156140d8576140d7613998565b5b9250929050565b600080600080604085870312156140f9576140f8613984565b5b600085013567ffffffffffffffff81111561411757614116613989565b5b61412387828801613d18565b9450945050602085013567ffffffffffffffff81111561414657614145613989565b5b61415287828801614089565b925092505092959194509250565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61419d82613bb7565b810181811067ffffffffffffffff821117156141bc576141bb614165565b5b80604052505050565b60006141cf61397a565b90506141db8282614194565b919050565b600067ffffffffffffffff8211156141fb576141fa614165565b5b61420482613bb7565b9050602081019050919050565b82818337600083830152505050565b600061423361422e846141e0565b6141c5565b90508281526020810184848401111561424f5761424e614160565b5b61425a848285614211565b509392505050565b600082601f8301126142775761427661398e565b5b8135614287848260208601614220565b91505092915050565b600080600080608085870312156142aa576142a9613984565b5b60006142b887828801613cc3565b94505060206142c987828801613cc3565b93505060406142da87828801613b1c565b925050606085013567ffffffffffffffff8111156142fb576142fa613989565b5b61430787828801614262565b91505092959194509250565b60008083601f8401126143295761432861398e565b5b8235905067ffffffffffffffff81111561434657614345613993565b5b60208301915083602082028301111561436257614361613998565b5b9250929050565b600080602083850312156143805761437f613984565b5b600083013567ffffffffffffffff81111561439e5761439d613989565b5b6143aa85828601614313565b92509250509250929050565b600080604083850312156143cd576143cc613984565b5b60006143db85828601613cc3565b92505060206143ec85828601613cc3565b9150509250929050565b600082905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061444857607f821691505b60208210810361445b5761445a614401565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026144c37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614486565b6144cd8683614486565b95508019841693508086168417925050509392505050565b6000819050919050565b600061450a61450561450084613afb565b6144e5565b613afb565b9050919050565b6000819050919050565b614524836144ef565b61453861453082614511565b848454614493565b825550505050565b600090565b61454d614540565b61455881848461451b565b505050565b5b8181101561457c57614571600082614545565b60018101905061455e565b5050565b601f8211156145c15761459281614461565b61459b84614476565b810160208510156145aa578190505b6145be6145b685614476565b83018261455d565b50505b505050565b600082821c905092915050565b60006145e4600019846008026145c6565b1980831691505092915050565b60006145fd83836145d3565b9150826002028217905092915050565b61461783836143f6565b67ffffffffffffffff8111156146305761462f614165565b5b61463a8254614430565b614645828285614580565b6000601f8311600181146146745760008415614662578287013590505b61466c85826145f1565b8655506146d4565b601f19841661468286614461565b60005b828110156146aa57848901358255600182019150602085019450602081019050614685565b868310156146c757848901356146c3601f8916826145d3565b8355505b6001600288020188555050505b50505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061474682613afb565b915061475183613afb565b925082820261475f81613afb565b915082820484148315176147765761477561470c565b5b5092915050565b600061478882613afb565b915061479383613afb565b92508282019050808211156147ab576147aa61470c565b5b92915050565b60006040820190506147c66000830185613c82565b6147d36020830184613dbb565b9392505050565b60006147e582613afb565b91506147f083613afb565b92508282039050818111156148085761480761470c565b5b92915050565b60006060820190506148236000830186613c82565b6148306020830185613dbb565b61483d6040830184613dbb565b949350505050565b600081905092915050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000600082015250565b6000614886601a83614845565b915061489182614850565b601a82019050919050565b60006148a782613b71565b6148b18185614845565b93506148c1818560208601613b8d565b80840191505092915050565b60006148d882614879565b91506148e4828461489c565b915081905092915050565b6000815190506148fe8161401d565b92915050565b60006020828403121561491a57614919613984565b5b6000614928848285016148ef565b91505092915050565b60006040820190506149466000830185613dbb565b6149536020830184613dbb565b9392505050565b600060608201905061496f6000830186613c82565b61497c6020830185613c82565b6149896040830184613dbb565b949350505050565b60007fffffffffffffffffffffffff000000000000000000000000000000000000000082169050919050565b6149c681614991565b81146149d157600080fd5b50565b6000813590506149e3816149bd565b92915050565b6000602082840312156149ff576149fe613984565b5b6000614a0d848285016149d4565b91505092915050565b600081519050614a2581613b05565b92915050565b600060208284031215614a4157614a40613984565b5b6000614a4f84828501614a16565b91505092915050565b7f5b00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614a8e600183614845565b9150614a9982614a58565b600182019050919050565b7f7b2274726169745f74797065223a22506978656c73222c2276616c7565223a22600082015250565b6000614ada602083614845565b9150614ae582614aa4565b602082019050919050565b7f227d2c0000000000000000000000000000000000000000000000000000000000600082015250565b6000614b26600383614845565b9150614b3182614af0565b600382019050919050565b7f7b2274726169745f74797065223a22416c6c6f77616e6365222c2276616c756560008201527f223a220000000000000000000000000000000000000000000000000000000000602082015250565b6000614b98602383614845565b9150614ba382614b3c565b602382019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b6000614be4600283614845565b9150614bef82614bae565b600282019050919050565b7f5d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614c30600183614845565b9150614c3b82614bfa565b600182019050919050565b6000614c5182614a81565b9150614c5c82614acd565b9150614c68828561489c565b9150614c7382614b19565b9150614c7e82614b8b565b9150614c8a828461489c565b9150614c9582614bd7565b9150614ca082614c23565b91508190509392505050565b7f7b00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614ce2600183614845565b9150614ced82614cac565b600182019050919050565b7f226e616d65223a22506978656c204465636b2000000000000000000000000000600082015250565b6000614d2e601383614845565b9150614d3982614cf8565b601382019050919050565b7f222c000000000000000000000000000000000000000000000000000000000000600082015250565b6000614d7a600283614845565b9150614d8582614d44565b600282019050919050565b7f226465736372697074696f6e223a220000000000000000000000000000000000600082015250565b6000614dc6600f83614845565b9150614dd182614d90565b600f82019050919050565b60008154614de981614430565b614df38186614845565b94506001821660008114614e0e5760018114614e2357614e56565b60ff1983168652811515820286019350614e56565b614e2c85614461565b60005b83811015614e4e57815481890152600182019150602081019050614e2f565b838801955050505b50505092915050565b7f22696d616765223a220000000000000000000000000000000000000000000000600082015250565b6000614e95600983614845565b9150614ea082614e5f565b600982019050919050565b7f2265787465726e616c5f75726c223a2200000000000000000000000000000000600082015250565b6000614ee1601083614845565b9150614eec82614eab565b601082019050919050565b7f3f70616c496e743d000000000000000000000000000000000000000000000000600082015250565b6000614f2d600883614845565b9150614f3882614ef7565b600882019050919050565b600081519050919050565b600081905092915050565b6000614f6482614f43565b614f6e8185614f4e565b9350614f7e818560208601613b8d565b80840191505092915050565b7f26706978656c733d000000000000000000000000000000000000000000000000600082015250565b6000614fc0600883614845565b9150614fcb82614f8a565b600882019050919050565b7f22616e696d6174696f6e5f75726c223a22646174613a746578742f68746d6c3b60008201527f6261736536342c00000000000000000000000000000000000000000000000000602082015250565b6000615032602783614845565b915061503d82614fd6565b602782019050919050565b7f222c2261747472696275746573223a0000000000000000000000000000000000600082015250565b600061507e600f83614845565b915061508982615048565b600f82019050919050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b60006150ca600183614845565b91506150d582615094565b600182019050919050565b60006150eb82614cd5565b91506150f682614d21565b9150615102828b61489c565b915061510d82614d6d565b915061511882614db9565b9150615124828a614ddc565b915061512f82614d6d565b915061513a82614e88565b9150615146828961489c565b915061515182614d6d565b915061515c82614ed4565b91506151688288614ddc565b915061517382614f20565b915061517f8287614f59565b915061518a82614fb3565b9150615196828661489c565b91506151a182614d6d565b91506151ac82615025565b91506151b8828561489c565b91506151c382615071565b91506151cf8284614f59565b91506151da826150bd565b91508190509998505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000600082015250565b6000615222601d83614845565b915061522d826151ec565b601d82019050919050565b600061524382615215565b915061524f828461489c565b915081905092915050565b600061526582613afb565b9150600082036152785761527761470c565b5b600182039050919050565b7f6c65742070616c496e743d000000000000000000000000000000000000000000600082015250565b60006152b9600b83614845565b91506152c482615283565b600b82019050919050565b7f3b00000000000000000000000000000000000000000000000000000000000000600082015250565b6000615305600183614845565b9150615310826152cf565b600182019050919050565b7f6c657420706978656c733d000000000000000000000000000000000000000000600082015250565b6000615351600b83614845565b915061535c8261531b565b600b82019050919050565b60006153738288614ddc565b915061537e826152ac565b915061538a8287614f59565b9150615395826152f8565b91506153a082615344565b91506153ac828661489c565b91506153b7826152f8565b91506153c38285614ddc565b91506153cf8284614ddc565b91508190509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061541882613afb565b915061542383613afb565b925082615433576154326153de565b5b828204905092915050565b7f3c7374796c653e00000000000000000000000000000000000000000000000000600082015250565b6000615474600783614845565b915061547f8261543e565b600782019050919050565b7f3c2f7374796c653e000000000000000000000000000000000000000000000000600082015250565b60006154c0600883614845565b91506154cb8261548a565b600882019050919050565b7f3c646566733e0000000000000000000000000000000000000000000000000000600082015250565b600061550c600683614845565b9150615517826154d6565b600682019050919050565b7f3c746578742069643d22746f6b656e223e000000000000000000000000000000600082015250565b6000615558601183614845565b915061556382615522565b601182019050919050565b7f3c2f746578743e00000000000000000000000000000000000000000000000000600082015250565b60006155a4600783614845565b91506155af8261556e565b600782019050919050565b7f3c746578742069643d22706978656c73223e0000000000000000000000000000600082015250565b60006155f0601283614845565b91506155fb826155ba565b601282019050919050565b7f3c726563742069643d226672616d65222077696474683d22322220686569676860008201527f743d220000000000000000000000000000000000000000000000000000000000602082015250565b6000615662602383614845565b915061566d82615606565b602382019050919050565b7f223e000000000000000000000000000000000000000000000000000000000000600082015250565b60006156ae600283614845565b91506156b982615678565b600282019050919050565b7f3c616e696d617465206174747269627574654e616d653d2266696c6c2220647560008201527f723d22327322206b657954696d65733d22303b302e32353b302e353b302e373560208201527f3b31222076616c7565733d220000000000000000000000000000000000000000604082015250565b6000615746604c83614845565b9150615751826156c4565b604c82019050919050565b7f2220726570656174436f756e743d22696e646566696e697465222f3e3c2f726560008201527f63743e3c2f646566733e00000000000000000000000000000000000000000000602082015250565b60006157b8602a83614845565b91506157c38261575c565b602a82019050919050565b60006157da828b614ddc565b91506157e582615467565b91506157f1828a614f59565b91506157fc826154b3565b9150615807826154ff565b91506158128261554b565b915061581e828961489c565b915061582982615597565b9150615834826155e3565b9150615840828861489c565b915061584b82615597565b915061585682615655565b9150615862828761489c565b915061586d826156a1565b915061587882615739565b91506158848286614f59565b915061588f826157ab565b915061589b8285614ddc565b91506158a78284614ddc565b91508190509998505050505050505050565b600082825260208201905092915050565b60006158d582614f43565b6158df81856158b9565b93506158ef818560208601613b8d565b6158f881613bb7565b840191505092915050565b60006080820190506159186000830187613c82565b6159256020830186613c82565b6159326040830185613dbb565b818103606083015261594481846158ca565b905095945050505050565b60008151905061595e81613a6c565b92915050565b60006020828403121561597a57615979613984565b5b60006159888482850161594f565b91505092915050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b60006159c7600183614845565b91506159d282615991565b600182019050919050565b60006159e98288614f59565b91506159f482614a81565b9150615a00828761489c565b9150615a0b826159ba565b9150615a17828661489c565b9150615a22826159ba565b9150615a2e828561489c565b9150615a3982614c23565b9150615a45828461489c565b91508190509695505050505050565b7f5d5d000000000000000000000000000000000000000000000000000000000000600082015250565b6000615a8a600283614845565b9150615a9582615a54565b600282019050919050565b6000615aac8284614f59565b9150615ab782615a7d565b915081905092915050565b50565b6000615ad2600083614f4e565b9150615add82615ac2565b600082019050919050565b6000615af382615ac5565b9150819050919050565b7f2d2d630000000000000000000000000000000000000000000000000000000000600082015250565b6000615b33600383614845565b9150615b3e82615afd565b600382019050919050565b7f3a72676228000000000000000000000000000000000000000000000000000000600082015250565b6000615b7f600583614845565b9150615b8a82615b49565b600582019050919050565b7f293b000000000000000000000000000000000000000000000000000000000000600082015250565b6000615bcb600283614845565b9150615bd682615b95565b600282019050919050565b6000615bed8288614f59565b9150615bf882615b26565b9150615c04828761489c565b9150615c0f82615b72565b9150615c1b828661489c565b9150615c26826159ba565b9150615c32828561489c565b9150615c3d826159ba565b9150615c49828461489c565b9150615c5482615bbe565b91508190509695505050505050565b6000615c6f8284614f59565b9150615c7a826150bd565b915081905092915050565b6000615c9082613afb565b9150615c9b83613afb565b925082615cab57615caa6153de565b5b828206905092915050565b7f7267622800000000000000000000000000000000000000000000000000000000600082015250565b6000615cec600483614845565b9150615cf782615cb6565b600482019050919050565b6000615d0e8287614f59565b9150615d1982615cdf565b9150615d25828661489c565b9150615d30826159ba565b9150615d3c828561489c565b9150615d47826159ba565b9150615d53828461489c565b9150615d5e82615bbe565b91508190509594505050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212202f282f9fa65f60be34bdd8d4de9fbc10418aa4cfe118f695f4f01aaba268423c64736f6c634300081a003300000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000006f05b59d3b200000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000b6c10b092acf393c9beab16177f6ff7309012a56000000000000000000000000000000000000000000000000000000e8d4a51000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000750584c2044455800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000650584c4445580000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102935760003560e01c806378a4ab851161015a578063b88d4fde116100c1578063e985e9c51161007a578063e985e9c5146109cc578063efd9495414610a09578063f2fde38b14610a32578063f3fef3a314610a5b578063f6153ccd14610a84578063ffb8717314610aaf57610293565b8063b88d4fde146108cb578063bf9e3edf146108e7578063c12dc64414610910578063c87b56dd14610939578063cdf74f0014610976578063d5abeb01146109a157610293565b806395d89b411161011357806395d89b41146107bf5780639622dc4b146107ea578063a22cb46514610813578063a7cd52cb1461083c578063ad81a45114610879578063b21ed050146108a257610293565b806378a4ab85146106b15780637b5c6e28146106da5780637e31d2cc146107055780638da5cb5b1461072e5780638da7f2321461075957806390c3f38f1461079657610293565b80632607aafa116101fe57806358afc838116101b757806358afc838146105b05780636352211e146105cc5780636817c76c1461060957806370a0823114610634578063715018a61461067157806375ca6b1c1461068857610293565b80632607aafa1461049f5780632a6f0c2d146104dc5780632bc91110146105055780632e43d7dc1461052e57806342842e0e1461056b57806342966c681461058757610293565b8063102581d211610250578063102581d2146103ab578063104b6cb7146103e857806312065fe014610411578063156e29f61461043c57806318160ddd1461045857806323b872dd1461048357610293565b806301dbcd4a1461029857806301ffc9a7146102c157806305fefda7146102fe57806306fdde0314610327578063081812fc14610352578063095ea7b31461038f575b600080fd5b3480156102a457600080fd5b506102bf60048036038101906102ba91906139f3565b610ada565b005b3480156102cd57600080fd5b506102e860048036038101906102e39190613a98565b610af8565b6040516102f59190613ae0565b60405180910390f35b34801561030a57600080fd5b5061032560048036038101906103209190613b31565b610b0a565b005b34801561033357600080fd5b5061033c610b24565b6040516103499190613c01565b60405180910390f35b34801561035e57600080fd5b5061037960048036038101906103749190613c23565b610bb6565b6040516103869190613c91565b60405180910390f35b6103a960048036038101906103a49190613cd8565b610c14565b005b3480156103b757600080fd5b506103d260048036038101906103cd9190613c23565b610c24565b6040516103df9190613c01565b60405180910390f35b3480156103f457600080fd5b5061040f600480360381019061040a9190613d6e565b610c7b565b005b34801561041d57600080fd5b50610426610d0d565b6040516104339190613dca565b60405180910390f35b61045660048036038101906104519190613de5565b610d15565b005b34801561046457600080fd5b5061046d6111a9565b60405161047a9190613dca565b60405180910390f35b61049d60048036038101906104989190613e38565b6111f6565b005b3480156104ab57600080fd5b506104c660048036038101906104c19190613c23565b6114b7565b6040516104d39190613c01565b60405180910390f35b3480156104e857600080fd5b5061050360048036038101906104fe91906139f3565b6114f6565b005b34801561051157600080fd5b5061052c60048036038101906105279190613b31565b611514565b005b34801561053a57600080fd5b5061055560048036038101906105509190613c23565b611713565b6040516105629190613dca565b60405180910390f35b61058560048036038101906105809190613e38565b61172b565b005b34801561059357600080fd5b506105ae60048036038101906105a99190613c23565b61174b565b005b6105ca60048036038101906105c59190613de5565b611759565b005b3480156105d857600080fd5b506105f360048036038101906105ee9190613c23565b6119cf565b6040516106009190613c91565b60405180910390f35b34801561061557600080fd5b5061061e6119e1565b60405161062b9190613dca565b60405180910390f35b34801561064057600080fd5b5061065b60048036038101906106569190613e8b565b6119e7565b6040516106689190613dca565b60405180910390f35b34801561067d57600080fd5b50610686611a7e565b005b34801561069457600080fd5b506106af60048036038101906106aa9190613eb8565b611a92565b005b3480156106bd57600080fd5b506106d860048036038101906106d391906139f3565b611ac4565b005b3480156106e657600080fd5b506106ef611ae2565b6040516106fc9190613fb0565b60405180910390f35b34801561071157600080fd5b5061072c60048036038101906107279190613ff0565b611af5565b005b34801561073a57600080fd5b50610743611b2a565b6040516107509190613c91565b60405180910390f35b34801561076557600080fd5b50610780600480360381019061077b9190613c23565b611b54565b60405161078d9190613dca565b60405180910390f35b3480156107a257600080fd5b506107bd60048036038101906107b891906139f3565b611b6c565b005b3480156107cb57600080fd5b506107d4611b8a565b6040516107e19190613c01565b60405180910390f35b3480156107f657600080fd5b50610811600480360381019061080c9190613eb8565b611c1c565b005b34801561081f57600080fd5b5061083a60048036038101906108359190614049565b611c4e565b005b34801561084857600080fd5b50610863600480360381019061085e9190613e8b565b611d59565b6040516108709190613dca565b60405180910390f35b34801561088557600080fd5b506108a0600480360381019061089b9190613b31565b611d71565b005b3480156108ae57600080fd5b506108c960048036038101906108c491906140df565b611f07565b005b6108e560048036038101906108e09190614290565b611fb5565b005b3480156108f357600080fd5b5061090e60048036038101906109099190614369565b612007565b005b34801561091c57600080fd5b5061093760048036038101906109329190613cd8565b612099565b005b34801561094557600080fd5b50610960600480360381019061095b9190613c23565b61221d565b60405161096d9190613c01565b60405180910390f35b34801561098257600080fd5b5061098b612353565b6040516109989190613c91565b60405180910390f35b3480156109ad57600080fd5b506109b6612379565b6040516109c39190613dca565b60405180910390f35b3480156109d857600080fd5b506109f360048036038101906109ee91906143b6565b61237f565b604051610a009190613ae0565b60405180910390f35b348015610a1557600080fd5b50610a306004803603810190610a2b9190613e8b565b612413565b005b348015610a3e57600080fd5b50610a596004803603810190610a549190613e8b565b61245f565b005b348015610a6757600080fd5b50610a826004803603810190610a7d9190613cd8565b6124e5565b005b348015610a9057600080fd5b50610a996124fb565b604051610aa69190613dca565b60405180910390f35b348015610abb57600080fd5b50610ac4612501565b604051610ad19190613dca565b60405180910390f35b610ae2612507565b818160159182610af392919061460d565b505050565b6000610b038261258e565b9050919050565b610b12612507565b81600a8190555080600d819055505050565b606060028054610b3390614430565b80601f0160208091040260200160405190810160405280929190818152602001828054610b5f90614430565b8015610bac5780601f10610b8157610100808354040283529160200191610bac565b820191906000526020600020905b815481529060010190602001808311610b8f57829003601f168201915b5050505050905090565b6000610bc182612620565b610bd657610bd563cf4700e460e01b6126cc565b5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b610c20828260016126d6565b5050565b6060610c2f82612620565b610c65576040517f5861b41d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610c7083612805565b905080915050919050565b610c83612507565b60005b82829050811015610d0857601c6000848484818110610ca857610ca76146dd565b5b9050602002016020810190610cbd9190613e8b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090558080600101915050610c86565b505050565b600047905090565b610d1d611b2a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610d8b5750600280811115610d6657610d65613f39565b5b601b60009054906101000a900460ff166002811115610d8857610d87613f39565b5b14155b8015610e17575060016002811115610da657610da5613f39565b5b601b60009054906101000a900460ff166002811115610dc857610dc7613f39565b5b141580610e1657506001601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015155b5b15610e4e576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600e541015610e9757600e546040517fcdab4c87000000000000000000000000000000000000000000000000000000008152600401610e8e9190613dca565b60405180910390fd5b610e9f611b2a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610ef4575080600d54610ee3919061473b565b600a54610ef0919061477d565b3414155b15610f505780600d54610f07919061473b565b600a54610f14919061477d565b6040517f3728b83d000000000000000000000000000000000000000000000000000000008152600401610f479190613dca565b60405180910390fd5b600b546001610f5d6111a9565b610f67919061477d565b1115610fac57600b546040517fba666df7000000000000000000000000000000000000000000000000000000008152600401610fa39190613dca565b60405180910390fd5b610fb6838361285c565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166340c10f1930846040518363ffffffff1660e01b81526004016110189291906147b1565b600060405180830381600087803b15801561103257600080fd5b505af1158015611046573d6000803e3d6000fd5b50505050600e54601860008581526020019081526020016000208190555081601960008581526020019081526020016000208190555081601a600082825461108e919061477d565b9250508190555061109d611b2a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561110b5750600160028111156110e7576110e6613f39565b5b601b60009054906101000a900460ff16600281111561110957611108613f39565b5b145b15611168576001601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461116091906147da565b925050819055505b7f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f84848460405161119b9392919061480e565b60405180910390a150505050565b60006111b36129e3565b600154600054030390507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6111e66129e8565b146111f357600854810190505b90565b6000611201826129ed565b905073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161693508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146112765761127563a114810060e01b6126cc565b5b60008061128284612b06565b915091506112988187611293612b2d565b612b35565b6112c3576112ad866112a8612b2d565b61237f565b6112c2576112c16359c896be60e01b6126cc565b5b5b6112d08686866001612b79565b80156112db57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506113a985611385888887612b7f565b7c020000000000000000000000000000000000000000000000000000000017612ba7565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361142f576000600185019050600060046000838152602001908152602001600020540361142d57600054811461142c578360046000838152602001908152602001600020819055505b5b505b600073ffffffffffffffffffffffffffffffffffffffff8673ffffffffffffffffffffffffffffffffffffffff161690508481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600081036114a1576114a063ea553b3460e01b6126cc565b5b6114ae8787876001612bd2565b50505050505050565b606060006114c483612bd8565b90506114cf81612c6c565b6040516020016114df91906148cd565b604051602081830303815290604052915050919050565b6114fe612507565b81816014918261150f92919061460d565b505050565b61151d826119cf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611581576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80601960008481526020019081526020016000205410156115ec5760196000838152602001908152602001600020546040517fcdab4c870000000000000000000000000000000000000000000000000000000081526004016115e39190613dca565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b815260040161164e9291906147b1565b6020604051808303816000875af115801561166d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116919190614904565b50816019600085815260200190815260200160002060008282546116b591906147da565b9250508190555081601a60008282546116ce91906147da565b925050819055507f3b521c8af34195400740571d0d05a52b949b36ed6e7d8ef4845b43d38eaf02cd8383604051611706929190614931565b60405180910390a1505050565b60186020528060005260406000206000915090505481565b61174683838360405180602001604052806000815250611fb5565b505050565b611756816001612c99565b50565b611762826119cf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117c6576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80601860008481526020019081526020016000205410156118315760186000838152602001908152602001600020546040517fcdab4c870000000000000000000000000000000000000000000000000000000081526004016118289190613dca565b60405180910390fd5b611839611b2a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611881575080600d5461187d919061473b565b3414155b156118d05780600d54611894919061473b565b6040517f3728b83d0000000000000000000000000000000000000000000000000000000081526004016118c79190613dca565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166340c10f1985846040518363ffffffff1660e01b81526004016119329291906147b1565b600060405180830381600087803b15801561194c57600080fd5b505af1158015611960573d6000803e3d6000fd5b505050508160186000858152602001908152602001600020600082825461198791906147da565b925050819055507f6cafb7f3cd36588f49632a9262ae220fe89116aff66b393b9ca986e11f440e188484846040516119c19392919061480e565b60405180910390a150505050565b60006119da826129ed565b9050919050565b600a5481565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a2d57611a2c638f4eb60460e01b6126cc565b5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611a86612507565b611a906000612eca565b565b611a9a612507565b838360129182611aab92919061460d565b50818160139182611abd92919061460d565b5050505050565b611acc612507565b818160119182611add92919061460d565b505050565b601b60009054906101000a900460ff1681565b611afd612507565b80601b60006101000a81548160ff02191690836002811115611b2257611b21613f39565b5b021790555050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60196020528060005260406000206000915090505481565b611b74612507565b818160169182611b8592919061460d565b505050565b606060038054611b9990614430565b80601f0160208091040260200160405190810160405280929190818152602001828054611bc590614430565b8015611c125780601f10611be757610100808354040283529160200191611c12565b820191906000526020600020905b815481529060010190602001808311611bf557829003601f168201915b5050505050905090565b611c24612507565b8383600f9182611c3592919061460d565b50818160109182611c4792919061460d565b5050505050565b8060076000611c5b612b2d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611d08612b2d565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d4d9190613ae0565b60405180910390a35050565b601c6020528060005260406000206000915090505481565b611d7a826119cf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dde576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401611e429392919061495a565b6020604051808303816000875af1158015611e61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e859190614904565b5081601960008581526020019081526020016000206000828254611ea9919061477d565b9250508190555081601a6000828254611ec2919061477d565b925050819055507f3dac84b5d37fa4f94e5f8c709a8d72c1f4aa9d224e42860925a21d422ba340338383604051611efa929190614931565b60405180910390a1505050565b611f0f612507565b60005b84849050811015611fae57828282818110611f3057611f2f6146dd565b5b90506020020135601c6000878785818110611f4e57611f4d6146dd565b5b9050602002016020810190611f639190613e8b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508080600101915050611f12565b5050505050565b611fc08484846111f6565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461200157611feb84848484612f90565b61200057611fff63d1a57ed660e01b6126cc565b5b5b50505050565b61200f612507565b60005b82829050811015612094578282828181106120305761202f6146dd565b5b905060200201602081019061204591906149e9565b60176000600184612056919061477d565b815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff021916908360a01c02179055508080600101915050612012565b505050565b6120a1612507565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000601a548273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016121069190613c91565b602060405180830381865afa158015612123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121479190614a2b565b61215191906147da565b90508281101561219857806040517fcdab4c8700000000000000000000000000000000000000000000000000000000815260040161218f9190613dca565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016121d39291906147b1565b6020604051808303816000875af11580156121f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122169190614904565b5050505050565b606061222882612620565b61225e576040517f5861b41d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061227c60196000858152602001908152602001600020546130bf565b9050600061228984612805565b90506000826122aa60186000888152602001908152602001600020546130bf565b6040516020016122bb929190614c46565b604051602081830303815290604052905060006122d7866130bf565b60166122e2886114b7565b60156122ed8a61318d565b886122f789612c6c565b8860405160200161230f9897969594939291906150e0565b604051602081830303815290604052905061232981612c6c565b6040516020016123399190615238565b604051602081830303815290604052945050505050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61241b612507565b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b612467612507565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036124d95760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016124d09190613c91565b60405180910390fd5b6124e281612eca565b50565b6124ed612507565b6124f78282613323565b5050565b601a5481565b600d5481565b61250f613412565b73ffffffffffffffffffffffffffffffffffffffff1661252d611b2a565b73ffffffffffffffffffffffffffffffffffffffff161461258c57612550613412565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016125839190613c91565b60405180910390fd5b565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806125e957506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806126195750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008161262b6129e3565b116126c6576126386129e8565b8211156126625761265b600460008481526020019081526020016000205461341a565b90506126c7565b6000548210156126c55760005b600060046000858152602001908152602001600020549150810361269e57826126979061525a565b925061266f565b60007c01000000000000000000000000000000000000000000000000000000008216149150505b5b5b919050565b8060005260046000fd5b60006126e1836119cf565b905081801561272357508073ffffffffffffffffffffffffffffffffffffffff1661270a612b2d565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561274f5761273981612734612b2d565b61237f565b61274e5761274d63cfb3b94260e01b6126cc565b5b5b836006600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550828473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a450505050565b6060600f6128128361318d565b61282e60196000868152602001908152602001600020546130bf565b60116010604051602001612846959493929190615367565b6040516020818303038152906040529050919050565b6128646129e8565b811161287b5761287a63524a12cc60e01b6126cc565b5b60006004600083815260200190815260200160002054905061289c8161341a565b156128b2576128b163c991cbb160e01b6126cc565b5b6128c0600084846001612b79565b6128e0836128d060008685612b7f565b6128da600161345b565b17612ba7565b6004600084815260200190815260200160002081905550600160406001901b17600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161690506000810361299657612995632e07630060e01b6126cc565b5b828160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460086000815460010191905081905550506129de600084846001612bd2565b505050565b600090565b600090565b6000816129f86129e3565b11612af05760046000838152602001908152602001600020549050612a1b6129e8565b821115612a4057612a2b8161341a565b612b0157612a3f63df2d9b4260e01b6126cc565b5b60008103612ac7576000548210612a6257612a6163df2d9b4260e01b6126cc565b5b5b60046000836001900393508381526020019081526020016000205490506000810315612ac25760007c010000000000000000000000000000000000000000000000000000000082160315612b0157612ac163df2d9b4260e01b6126cc565b5b612a63565b60007c010000000000000000000000000000000000000000000000000000000082160315612b01575b612b0063df2d9b4260e01b6126cc565b5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612b9686868461346b565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60606000612be583613474565b90506000612bf28461357b565b9050600060196000868152602001908152602001600020549050601283612c18876130bf565b612c21846130bf565b612c3761271086612c32919061540d565b6130bf565b8660146013604051602001612c539897969594939291906157ce565b6040516020818303038152906040529350505050919050565b6060612c9282604051806060016040528060408152602001615d6d604091396001613644565b9050919050565b6000612ca4836129ed565b90506000819050600080612cb786612b06565b915091508415612cff57612cd38184612cce612b2d565b612b35565b612cfe57612ce883612ce3612b2d565b61237f565b612cfd57612cfc6359c896be60e01b6126cc565b5b5b5b612d0d836000886001612b79565b8015612d1857600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612dc083612d7d85600088612b7f565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717612ba7565b600460008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851603612e465760006001870190506000600460008381526020019081526020016000205403612e44576000548114612e43578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612eb0836000886001612bd2565b600160008154809291906001019190505550505050505050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612fb6612b2d565b8786866040518563ffffffff1660e01b8152600401612fd89493929190615903565b6020604051808303816000875af192505050801561301457506040513d601f19601f820116820180604052508101906130119190615964565b60015b61306c573d8060008114613044576040519150601f19603f3d011682016040523d82523d6000602084013e613049565b606091505b5060008151036130645761306363d1a57ed660e01b6126cc565b5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6060600060016130ce846137d8565b01905060008167ffffffffffffffff8111156130ed576130ec614165565b5b6040519080825280601f01601f19166020018201604052801561311f5781602001600182028036833780820191505090505b509050600082602001820190505b600115613182578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581613176576131756153de565b5b0494506000850361312d575b819350505050919050565b606060006040518060400160405280600281526020017f5b5b000000000000000000000000000000000000000000000000000000000000815250905060005b60048110156132fa57816131ec856003846131e7919061473b565b61392b565b61320e8660016003866131ff919061473b565b613209919061477d565b61392b565b613230876002600387613221919061473b565b61322b919061477d565b61392b565b60018514613291576003851461327b576040518060400160405280600181526020017f2c0000000000000000000000000000000000000000000000000000000000000081525061328c565b604051806020016040528060008152505b6132c8565b6040518060400160405280600381526020017f5d2c5b00000000000000000000000000000000000000000000000000000000008152505b6040516020016132dc9594939291906159dd565b604051602081830303815290604052915080806001019150506131cc565b508060405160200161330c9190615aa0565b604051602081830303815290604052915050919050565b8047101561336a5747816040517fcf479181000000000000000000000000000000000000000000000000000000008152600401613361929190614931565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161339090615ae8565b60006040518083038185875af1925050503d80600081146133cd576040519150601f19603f3d011682016040523d82523d6000602084013e6133d2565b606091505b505090508061340d576040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b600033905090565b60007c0100000000000000000000000000000000000000000000000000000000821673ffffffffffffffffffffffffffffffffffffffff8316119050919050565b60006001821460e11b9050919050565b60009392505050565b606060006040518060400160405280600781526020017f3a726f6f74207b00000000000000000000000000000000000000000000000000815250905060005b600481101561355257816134c6826130bf565b6134dc866003856134d7919061473b565b61392b565b6134fe8760016003876134ef919061473b565b6134f9919061477d565b61392b565b613520886002600388613511919061473b565b61351b919061477d565b61392b565b604051602001613534959493929190615be1565b604051602081830303815290604052915080806001019150506134b3565b50806040516020016135649190615c63565b604051602081830303815290604052915050919050565b60608060005b600581101561363a57816135ad85600360048561359e9190615c85565b6135a8919061473b565b61392b565b6135db86600160036004876135c29190615c85565b6135cc919061473b565b6135d6919061477d565b61392b565b61360987600260036004886135f09190615c85565b6135fa919061473b565b613604919061477d565b61392b565b60405160200161361c9493929190615d02565b60405160208183030381529060405291508080600101915050613581565b5080915050919050565b60606000845103613666576040518060200160405280600081525090506137d1565b60008261369857600360028651600461367f919061473b565b613689919061477d565b613693919061540d565b6136bf565b6003600286516136a8919061477d565b6136b2919061540d565b60046136be919061473b565b5b905060008167ffffffffffffffff8111156136dd576136dc614165565b5b6040519080825280601f01601f19166020018201604052801561370f5781602001600182028036833780820191505090505b50905060018501602082018788518901602081018051600082525b82841015613785576003840193508351603f8160121c168701518653600186019550603f81600c1c168701518653600186019550603f8160061c168701518653600186019550603f811687015186536001860195505061372a565b80825289156137c55760038c5106600181146137a857600281146137bb576137c3565b603d6001870353603d60028703536137c3565b603d60018703535b505b50505050505080925050505b9392505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613836577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161382c5761382b6153de565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310613873576d04ee2d6d415b85acef81000000008381613869576138686153de565b5b0492506020810190505b662386f26fc1000083106138a257662386f26fc100008381613898576138976153de565b5b0492506010810190505b6305f5e10083106138cb576305f5e10083816138c1576138c06153de565b5b0492506008810190505b61271083106138f05761271083816138e6576138e56153de565b5b0492506004810190505b606483106139135760648381613909576139086153de565b5b0492506002810190505b600a8310613922576001810190505b80915050919050565b60606139726017600085815260200190815260200160002060009054906101000a900460a01b83600c8110613963576139626146dd565b5b1a60f81b60f81c60ff166130bf565b905092915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126139b3576139b261398e565b5b8235905067ffffffffffffffff8111156139d0576139cf613993565b5b6020830191508360018202830111156139ec576139eb613998565b5b9250929050565b60008060208385031215613a0a57613a09613984565b5b600083013567ffffffffffffffff811115613a2857613a27613989565b5b613a348582860161399d565b92509250509250929050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a7581613a40565b8114613a8057600080fd5b50565b600081359050613a9281613a6c565b92915050565b600060208284031215613aae57613aad613984565b5b6000613abc84828501613a83565b91505092915050565b60008115159050919050565b613ada81613ac5565b82525050565b6000602082019050613af56000830184613ad1565b92915050565b6000819050919050565b613b0e81613afb565b8114613b1957600080fd5b50565b600081359050613b2b81613b05565b92915050565b60008060408385031215613b4857613b47613984565b5b6000613b5685828601613b1c565b9250506020613b6785828601613b1c565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613bab578082015181840152602081019050613b90565b60008484015250505050565b6000601f19601f8301169050919050565b6000613bd382613b71565b613bdd8185613b7c565b9350613bed818560208601613b8d565b613bf681613bb7565b840191505092915050565b60006020820190508181036000830152613c1b8184613bc8565b905092915050565b600060208284031215613c3957613c38613984565b5b6000613c4784828501613b1c565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613c7b82613c50565b9050919050565b613c8b81613c70565b82525050565b6000602082019050613ca66000830184613c82565b92915050565b613cb581613c70565b8114613cc057600080fd5b50565b600081359050613cd281613cac565b92915050565b60008060408385031215613cef57613cee613984565b5b6000613cfd85828601613cc3565b9250506020613d0e85828601613b1c565b9150509250929050565b60008083601f840112613d2e57613d2d61398e565b5b8235905067ffffffffffffffff811115613d4b57613d4a613993565b5b602083019150836020820283011115613d6757613d66613998565b5b9250929050565b60008060208385031215613d8557613d84613984565b5b600083013567ffffffffffffffff811115613da357613da2613989565b5b613daf85828601613d18565b92509250509250929050565b613dc481613afb565b82525050565b6000602082019050613ddf6000830184613dbb565b92915050565b600080600060608486031215613dfe57613dfd613984565b5b6000613e0c86828701613cc3565b9350506020613e1d86828701613b1c565b9250506040613e2e86828701613b1c565b9150509250925092565b600080600060608486031215613e5157613e50613984565b5b6000613e5f86828701613cc3565b9350506020613e7086828701613cc3565b9250506040613e8186828701613b1c565b9150509250925092565b600060208284031215613ea157613ea0613984565b5b6000613eaf84828501613cc3565b91505092915050565b60008060008060408587031215613ed257613ed1613984565b5b600085013567ffffffffffffffff811115613ef057613eef613989565b5b613efc8782880161399d565b9450945050602085013567ffffffffffffffff811115613f1f57613f1e613989565b5b613f2b8782880161399d565b925092505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613f7957613f78613f39565b5b50565b6000819050613f8a82613f68565b919050565b6000613f9a82613f7c565b9050919050565b613faa81613f8f565b82525050565b6000602082019050613fc56000830184613fa1565b92915050565b60038110613fd857600080fd5b50565b600081359050613fea81613fcb565b92915050565b60006020828403121561400657614005613984565b5b600061401484828501613fdb565b91505092915050565b61402681613ac5565b811461403157600080fd5b50565b6000813590506140438161401d565b92915050565b600080604083850312156140605761405f613984565b5b600061406e85828601613cc3565b925050602061407f85828601614034565b9150509250929050565b60008083601f84011261409f5761409e61398e565b5b8235905067ffffffffffffffff8111156140bc576140bb613993565b5b6020830191508360208202830111156140d8576140d7613998565b5b9250929050565b600080600080604085870312156140f9576140f8613984565b5b600085013567ffffffffffffffff81111561411757614116613989565b5b61412387828801613d18565b9450945050602085013567ffffffffffffffff81111561414657614145613989565b5b61415287828801614089565b925092505092959194509250565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61419d82613bb7565b810181811067ffffffffffffffff821117156141bc576141bb614165565b5b80604052505050565b60006141cf61397a565b90506141db8282614194565b919050565b600067ffffffffffffffff8211156141fb576141fa614165565b5b61420482613bb7565b9050602081019050919050565b82818337600083830152505050565b600061423361422e846141e0565b6141c5565b90508281526020810184848401111561424f5761424e614160565b5b61425a848285614211565b509392505050565b600082601f8301126142775761427661398e565b5b8135614287848260208601614220565b91505092915050565b600080600080608085870312156142aa576142a9613984565b5b60006142b887828801613cc3565b94505060206142c987828801613cc3565b93505060406142da87828801613b1c565b925050606085013567ffffffffffffffff8111156142fb576142fa613989565b5b61430787828801614262565b91505092959194509250565b60008083601f8401126143295761432861398e565b5b8235905067ffffffffffffffff81111561434657614345613993565b5b60208301915083602082028301111561436257614361613998565b5b9250929050565b600080602083850312156143805761437f613984565b5b600083013567ffffffffffffffff81111561439e5761439d613989565b5b6143aa85828601614313565b92509250509250929050565b600080604083850312156143cd576143cc613984565b5b60006143db85828601613cc3565b92505060206143ec85828601613cc3565b9150509250929050565b600082905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061444857607f821691505b60208210810361445b5761445a614401565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026144c37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614486565b6144cd8683614486565b95508019841693508086168417925050509392505050565b6000819050919050565b600061450a61450561450084613afb565b6144e5565b613afb565b9050919050565b6000819050919050565b614524836144ef565b61453861453082614511565b848454614493565b825550505050565b600090565b61454d614540565b61455881848461451b565b505050565b5b8181101561457c57614571600082614545565b60018101905061455e565b5050565b601f8211156145c15761459281614461565b61459b84614476565b810160208510156145aa578190505b6145be6145b685614476565b83018261455d565b50505b505050565b600082821c905092915050565b60006145e4600019846008026145c6565b1980831691505092915050565b60006145fd83836145d3565b9150826002028217905092915050565b61461783836143f6565b67ffffffffffffffff8111156146305761462f614165565b5b61463a8254614430565b614645828285614580565b6000601f8311600181146146745760008415614662578287013590505b61466c85826145f1565b8655506146d4565b601f19841661468286614461565b60005b828110156146aa57848901358255600182019150602085019450602081019050614685565b868310156146c757848901356146c3601f8916826145d3565b8355505b6001600288020188555050505b50505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061474682613afb565b915061475183613afb565b925082820261475f81613afb565b915082820484148315176147765761477561470c565b5b5092915050565b600061478882613afb565b915061479383613afb565b92508282019050808211156147ab576147aa61470c565b5b92915050565b60006040820190506147c66000830185613c82565b6147d36020830184613dbb565b9392505050565b60006147e582613afb565b91506147f083613afb565b92508282039050818111156148085761480761470c565b5b92915050565b60006060820190506148236000830186613c82565b6148306020830185613dbb565b61483d6040830184613dbb565b949350505050565b600081905092915050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000600082015250565b6000614886601a83614845565b915061489182614850565b601a82019050919050565b60006148a782613b71565b6148b18185614845565b93506148c1818560208601613b8d565b80840191505092915050565b60006148d882614879565b91506148e4828461489c565b915081905092915050565b6000815190506148fe8161401d565b92915050565b60006020828403121561491a57614919613984565b5b6000614928848285016148ef565b91505092915050565b60006040820190506149466000830185613dbb565b6149536020830184613dbb565b9392505050565b600060608201905061496f6000830186613c82565b61497c6020830185613c82565b6149896040830184613dbb565b949350505050565b60007fffffffffffffffffffffffff000000000000000000000000000000000000000082169050919050565b6149c681614991565b81146149d157600080fd5b50565b6000813590506149e3816149bd565b92915050565b6000602082840312156149ff576149fe613984565b5b6000614a0d848285016149d4565b91505092915050565b600081519050614a2581613b05565b92915050565b600060208284031215614a4157614a40613984565b5b6000614a4f84828501614a16565b91505092915050565b7f5b00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614a8e600183614845565b9150614a9982614a58565b600182019050919050565b7f7b2274726169745f74797065223a22506978656c73222c2276616c7565223a22600082015250565b6000614ada602083614845565b9150614ae582614aa4565b602082019050919050565b7f227d2c0000000000000000000000000000000000000000000000000000000000600082015250565b6000614b26600383614845565b9150614b3182614af0565b600382019050919050565b7f7b2274726169745f74797065223a22416c6c6f77616e6365222c2276616c756560008201527f223a220000000000000000000000000000000000000000000000000000000000602082015250565b6000614b98602383614845565b9150614ba382614b3c565b602382019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b6000614be4600283614845565b9150614bef82614bae565b600282019050919050565b7f5d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614c30600183614845565b9150614c3b82614bfa565b600182019050919050565b6000614c5182614a81565b9150614c5c82614acd565b9150614c68828561489c565b9150614c7382614b19565b9150614c7e82614b8b565b9150614c8a828461489c565b9150614c9582614bd7565b9150614ca082614c23565b91508190509392505050565b7f7b00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614ce2600183614845565b9150614ced82614cac565b600182019050919050565b7f226e616d65223a22506978656c204465636b2000000000000000000000000000600082015250565b6000614d2e601383614845565b9150614d3982614cf8565b601382019050919050565b7f222c000000000000000000000000000000000000000000000000000000000000600082015250565b6000614d7a600283614845565b9150614d8582614d44565b600282019050919050565b7f226465736372697074696f6e223a220000000000000000000000000000000000600082015250565b6000614dc6600f83614845565b9150614dd182614d90565b600f82019050919050565b60008154614de981614430565b614df38186614845565b94506001821660008114614e0e5760018114614e2357614e56565b60ff1983168652811515820286019350614e56565b614e2c85614461565b60005b83811015614e4e57815481890152600182019150602081019050614e2f565b838801955050505b50505092915050565b7f22696d616765223a220000000000000000000000000000000000000000000000600082015250565b6000614e95600983614845565b9150614ea082614e5f565b600982019050919050565b7f2265787465726e616c5f75726c223a2200000000000000000000000000000000600082015250565b6000614ee1601083614845565b9150614eec82614eab565b601082019050919050565b7f3f70616c496e743d000000000000000000000000000000000000000000000000600082015250565b6000614f2d600883614845565b9150614f3882614ef7565b600882019050919050565b600081519050919050565b600081905092915050565b6000614f6482614f43565b614f6e8185614f4e565b9350614f7e818560208601613b8d565b80840191505092915050565b7f26706978656c733d000000000000000000000000000000000000000000000000600082015250565b6000614fc0600883614845565b9150614fcb82614f8a565b600882019050919050565b7f22616e696d6174696f6e5f75726c223a22646174613a746578742f68746d6c3b60008201527f6261736536342c00000000000000000000000000000000000000000000000000602082015250565b6000615032602783614845565b915061503d82614fd6565b602782019050919050565b7f222c2261747472696275746573223a0000000000000000000000000000000000600082015250565b600061507e600f83614845565b915061508982615048565b600f82019050919050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b60006150ca600183614845565b91506150d582615094565b600182019050919050565b60006150eb82614cd5565b91506150f682614d21565b9150615102828b61489c565b915061510d82614d6d565b915061511882614db9565b9150615124828a614ddc565b915061512f82614d6d565b915061513a82614e88565b9150615146828961489c565b915061515182614d6d565b915061515c82614ed4565b91506151688288614ddc565b915061517382614f20565b915061517f8287614f59565b915061518a82614fb3565b9150615196828661489c565b91506151a182614d6d565b91506151ac82615025565b91506151b8828561489c565b91506151c382615071565b91506151cf8284614f59565b91506151da826150bd565b91508190509998505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000600082015250565b6000615222601d83614845565b915061522d826151ec565b601d82019050919050565b600061524382615215565b915061524f828461489c565b915081905092915050565b600061526582613afb565b9150600082036152785761527761470c565b5b600182039050919050565b7f6c65742070616c496e743d000000000000000000000000000000000000000000600082015250565b60006152b9600b83614845565b91506152c482615283565b600b82019050919050565b7f3b00000000000000000000000000000000000000000000000000000000000000600082015250565b6000615305600183614845565b9150615310826152cf565b600182019050919050565b7f6c657420706978656c733d000000000000000000000000000000000000000000600082015250565b6000615351600b83614845565b915061535c8261531b565b600b82019050919050565b60006153738288614ddc565b915061537e826152ac565b915061538a8287614f59565b9150615395826152f8565b91506153a082615344565b91506153ac828661489c565b91506153b7826152f8565b91506153c38285614ddc565b91506153cf8284614ddc565b91508190509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061541882613afb565b915061542383613afb565b925082615433576154326153de565b5b828204905092915050565b7f3c7374796c653e00000000000000000000000000000000000000000000000000600082015250565b6000615474600783614845565b915061547f8261543e565b600782019050919050565b7f3c2f7374796c653e000000000000000000000000000000000000000000000000600082015250565b60006154c0600883614845565b91506154cb8261548a565b600882019050919050565b7f3c646566733e0000000000000000000000000000000000000000000000000000600082015250565b600061550c600683614845565b9150615517826154d6565b600682019050919050565b7f3c746578742069643d22746f6b656e223e000000000000000000000000000000600082015250565b6000615558601183614845565b915061556382615522565b601182019050919050565b7f3c2f746578743e00000000000000000000000000000000000000000000000000600082015250565b60006155a4600783614845565b91506155af8261556e565b600782019050919050565b7f3c746578742069643d22706978656c73223e0000000000000000000000000000600082015250565b60006155f0601283614845565b91506155fb826155ba565b601282019050919050565b7f3c726563742069643d226672616d65222077696474683d22322220686569676860008201527f743d220000000000000000000000000000000000000000000000000000000000602082015250565b6000615662602383614845565b915061566d82615606565b602382019050919050565b7f223e000000000000000000000000000000000000000000000000000000000000600082015250565b60006156ae600283614845565b91506156b982615678565b600282019050919050565b7f3c616e696d617465206174747269627574654e616d653d2266696c6c2220647560008201527f723d22327322206b657954696d65733d22303b302e32353b302e353b302e373560208201527f3b31222076616c7565733d220000000000000000000000000000000000000000604082015250565b6000615746604c83614845565b9150615751826156c4565b604c82019050919050565b7f2220726570656174436f756e743d22696e646566696e697465222f3e3c2f726560008201527f63743e3c2f646566733e00000000000000000000000000000000000000000000602082015250565b60006157b8602a83614845565b91506157c38261575c565b602a82019050919050565b60006157da828b614ddc565b91506157e582615467565b91506157f1828a614f59565b91506157fc826154b3565b9150615807826154ff565b91506158128261554b565b915061581e828961489c565b915061582982615597565b9150615834826155e3565b9150615840828861489c565b915061584b82615597565b915061585682615655565b9150615862828761489c565b915061586d826156a1565b915061587882615739565b91506158848286614f59565b915061588f826157ab565b915061589b8285614ddc565b91506158a78284614ddc565b91508190509998505050505050505050565b600082825260208201905092915050565b60006158d582614f43565b6158df81856158b9565b93506158ef818560208601613b8d565b6158f881613bb7565b840191505092915050565b60006080820190506159186000830187613c82565b6159256020830186613c82565b6159326040830185613dbb565b818103606083015261594481846158ca565b905095945050505050565b60008151905061595e81613a6c565b92915050565b60006020828403121561597a57615979613984565b5b60006159888482850161594f565b91505092915050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b60006159c7600183614845565b91506159d282615991565b600182019050919050565b60006159e98288614f59565b91506159f482614a81565b9150615a00828761489c565b9150615a0b826159ba565b9150615a17828661489c565b9150615a22826159ba565b9150615a2e828561489c565b9150615a3982614c23565b9150615a45828461489c565b91508190509695505050505050565b7f5d5d000000000000000000000000000000000000000000000000000000000000600082015250565b6000615a8a600283614845565b9150615a9582615a54565b600282019050919050565b6000615aac8284614f59565b9150615ab782615a7d565b915081905092915050565b50565b6000615ad2600083614f4e565b9150615add82615ac2565b600082019050919050565b6000615af382615ac5565b9150819050919050565b7f2d2d630000000000000000000000000000000000000000000000000000000000600082015250565b6000615b33600383614845565b9150615b3e82615afd565b600382019050919050565b7f3a72676228000000000000000000000000000000000000000000000000000000600082015250565b6000615b7f600583614845565b9150615b8a82615b49565b600582019050919050565b7f293b000000000000000000000000000000000000000000000000000000000000600082015250565b6000615bcb600283614845565b9150615bd682615b95565b600282019050919050565b6000615bed8288614f59565b9150615bf882615b26565b9150615c04828761489c565b9150615c0f82615b72565b9150615c1b828661489c565b9150615c26826159ba565b9150615c32828561489c565b9150615c3d826159ba565b9150615c49828461489c565b9150615c5482615bbe565b91508190509695505050505050565b6000615c6f8284614f59565b9150615c7a826150bd565b915081905092915050565b6000615c9082613afb565b9150615c9b83613afb565b925082615cab57615caa6153de565b5b828206905092915050565b7f7267622800000000000000000000000000000000000000000000000000000000600082015250565b6000615cec600483614845565b9150615cf782615cb6565b600482019050919050565b6000615d0e8287614f59565b9150615d1982615cdf565b9150615d25828661489c565b9150615d30826159ba565b9150615d3c828561489c565b9150615d47826159ba565b9150615d53828461489c565b9150615d5e82615bbe565b91508190509594505050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212202f282f9fa65f60be34bdd8d4de9fbc10418aa4cfe118f695f4f01aaba268423c64736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000006f05b59d3b200000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000b6c10b092acf393c9beab16177f6ff7309012a56000000000000000000000000000000000000000000000000000000e8d4a51000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000750584c2044455800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000650584c4445580000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): PXL DEX
Arg [1] : _symbol (string): PXLDEX
Arg [2] : _mintPrice (uint256): 500000000000000000
Arg [3] : _maxSupply (uint256): 256
Arg [4] : _pixelAddress (address): 0xb6C10b092ACF393C9beab16177F6fF7309012a56
Arg [5] : _pixelPrice (uint256): 1000000000000
Arg [6] : _pixelAllowance (uint256): 500000
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 00000000000000000000000000000000000000000000000006f05b59d3b20000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 000000000000000000000000b6c10b092acf393c9beab16177f6ff7309012a56
Arg [5] : 000000000000000000000000000000000000000000000000000000e8d4a51000
Arg [6] : 000000000000000000000000000000000000000000000000000000000007a120
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [8] : 50584c2044455800000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [10] : 50584c4445580000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,357.49 | 70.9897 | $238,347.5 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.