|
{ |
|
"id": "6a91b3cbd98a3e68e5dea2f7b8f3ecdc", |
|
"_format": "hh-sol-build-info-1", |
|
"solcVersion": "0.8.18", |
|
"solcLongVersion": "0.8.18+commit.87f61d96", |
|
"input": { |
|
"language": "Solidity", |
|
"sources": { |
|
".deps/npm/@openzeppelin/contracts/utils/Strings.sol": { |
|
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" |
|
}, |
|
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol": { |
|
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" |
|
}, |
|
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol": { |
|
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" |
|
} |
|
}, |
|
"settings": { |
|
"optimizer": { |
|
"enabled": false, |
|
"runs": 200 |
|
}, |
|
"outputSelection": { |
|
"*": { |
|
"": [ |
|
"ast" |
|
], |
|
"*": [ |
|
"abi", |
|
"metadata", |
|
"devdoc", |
|
"userdoc", |
|
"storageLayout", |
|
"evm.legacyAssembly", |
|
"evm.bytecode", |
|
"evm.deployedBytecode", |
|
"evm.methodIdentifiers", |
|
"evm.gasEstimates", |
|
"evm.assembly" |
|
] |
|
} |
|
} |
|
} |
|
}, |
|
"output": { |
|
"contracts": { |
|
".deps/npm/@openzeppelin/contracts/utils/Strings.sol": { |
|
"Strings": { |
|
"abi": [], |
|
"devdoc": { |
|
"details": "String operations.", |
|
"kind": "dev", |
|
"methods": {}, |
|
"version": 1 |
|
}, |
|
"evm": { |
|
"assembly": " /* \".deps/npm/@openzeppelin/contracts/utils/Strings.sol\":220:2779 library Strings {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \".deps/npm/@openzeppelin/contracts/utils/Strings.sol\":220:2779 library Strings {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033\n}\n", |
|
"bytecode": { |
|
"functionDebugData": {}, |
|
"generatedSources": [], |
|
"linkReferences": {}, |
|
"object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033", |
|
"opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DIV 0xAF ADDMOD PUSH31 0x7CFC141511C09ECB44889964DBA39C326908A011AC5C95EF25B8093164736F PUSH13 0x63430008120033000000000000 ", |
|
"sourceMap": "220:2559:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" |
|
}, |
|
"deployedBytecode": { |
|
"functionDebugData": {}, |
|
"generatedSources": [], |
|
"immutableReferences": {}, |
|
"linkReferences": {}, |
|
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033", |
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DIV 0xAF ADDMOD PUSH31 0x7CFC141511C09ECB44889964DBA39C326908A011AC5C95EF25B8093164736F PUSH13 0x63430008120033000000000000 ", |
|
"sourceMap": "220:2559:0:-:0;;;;;;;;" |
|
}, |
|
"gasEstimates": { |
|
"creation": { |
|
"codeDepositCost": "17200", |
|
"executionCost": "97", |
|
"totalCost": "17297" |
|
}, |
|
"internal": { |
|
"equal(string memory,string memory)": "infinite", |
|
"toHexString(address)": "infinite", |
|
"toHexString(uint256)": "infinite", |
|
"toHexString(uint256,uint256)": "infinite", |
|
"toString(int256)": "infinite", |
|
"toString(uint256)": "infinite" |
|
} |
|
}, |
|
"legacyAssembly": { |
|
".code": [ |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH #[$]", |
|
"source": 0, |
|
"value": "0000000000000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH [$]", |
|
"source": 0, |
|
"value": "0000000000000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "B" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "DUP3", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "DUP3", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "DUP3", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "CODECOPY", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "DUP1", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "MLOAD", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "BYTE", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "73" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "EQ", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH [tag]", |
|
"source": 0, |
|
"value": "1" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "JUMPI", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "MSTORE", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "4" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "MSTORE", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "24" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "REVERT", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "tag", |
|
"source": 0, |
|
"value": "1" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "JUMPDEST", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "ADDRESS", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "MSTORE", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "73" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "DUP2", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "MSTORE8", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "DUP3", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "DUP2", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "RETURN", |
|
"source": 0 |
|
} |
|
], |
|
".data": { |
|
"0": { |
|
".auxdata": "a264697066735822122004af087e7cfc141511c09ecb44889964dba39c326908a011ac5c95ef25b8093164736f6c63430008120033", |
|
".code": [ |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSHDEPLOYADDRESS", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "ADDRESS", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "EQ", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "80" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "40" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "MSTORE", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "PUSH", |
|
"source": 0, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "DUP1", |
|
"source": 0 |
|
}, |
|
{ |
|
"begin": 220, |
|
"end": 2779, |
|
"name": "REVERT", |
|
"source": 0 |
|
} |
|
] |
|
} |
|
}, |
|
"sourceList": [ |
|
".deps/npm/@openzeppelin/contracts/utils/Strings.sol", |
|
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol", |
|
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol", |
|
"#utility.yul" |
|
] |
|
}, |
|
"methodIdentifiers": {} |
|
}, |
|
"metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"String operations.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\".deps/npm/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/npm/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b81d9ff6559ea5c47fc573e17ece6d9ba5d6839e213e6ebc3b4c5c8fe4199d7f\",\"dweb:/ipfs/QmPCW1bFisUzJkyjroY3yipwfism9RRCigCcK1hbXtVM8n\"]},\".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7\",\"dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6\"]}},\"version\":1}", |
|
"storageLayout": { |
|
"storage": [], |
|
"types": null |
|
}, |
|
"userdoc": { |
|
"kind": "user", |
|
"methods": {}, |
|
"version": 1 |
|
} |
|
} |
|
}, |
|
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol": { |
|
"Math": { |
|
"abi": [], |
|
"devdoc": { |
|
"details": "Standard math utilities missing in the Solidity language.", |
|
"kind": "dev", |
|
"methods": {}, |
|
"version": 1 |
|
}, |
|
"evm": { |
|
"assembly": " /* \".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":202:12784 library Math {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":202:12784 library Math {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa2646970667358221220cc60d619142539c74ac21b6a23798f2730f0977b223eaa2401d029326ecd420864736f6c63430008120033\n}\n", |
|
"bytecode": { |
|
"functionDebugData": {}, |
|
"generatedSources": [], |
|
"linkReferences": {}, |
|
"object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cc60d619142539c74ac21b6a23798f2730f0977b223eaa2401d029326ecd420864736f6c63430008120033", |
|
"opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCC PUSH1 0xD6 NOT EQ 0x25 CODECOPY 0xC7 0x4A 0xC2 SHL PUSH11 0x23798F2730F0977B223EAA 0x24 ADD 0xD0 0x29 ORIGIN PUSH15 0xCD420864736F6C6343000812003300 ", |
|
"sourceMap": "202:12582:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" |
|
}, |
|
"deployedBytecode": { |
|
"functionDebugData": {}, |
|
"generatedSources": [], |
|
"immutableReferences": {}, |
|
"linkReferences": {}, |
|
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cc60d619142539c74ac21b6a23798f2730f0977b223eaa2401d029326ecd420864736f6c63430008120033", |
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCC PUSH1 0xD6 NOT EQ 0x25 CODECOPY 0xC7 0x4A 0xC2 SHL PUSH11 0x23798F2730F0977B223EAA 0x24 ADD 0xD0 0x29 ORIGIN PUSH15 0xCD420864736F6C6343000812003300 ", |
|
"sourceMap": "202:12582:1:-:0;;;;;;;;" |
|
}, |
|
"gasEstimates": { |
|
"creation": { |
|
"codeDepositCost": "17200", |
|
"executionCost": "97", |
|
"totalCost": "17297" |
|
}, |
|
"internal": { |
|
"average(uint256,uint256)": "infinite", |
|
"ceilDiv(uint256,uint256)": "infinite", |
|
"log10(uint256)": "infinite", |
|
"log10(uint256,enum Math.Rounding)": "infinite", |
|
"log2(uint256)": "infinite", |
|
"log2(uint256,enum Math.Rounding)": "infinite", |
|
"log256(uint256)": "infinite", |
|
"log256(uint256,enum Math.Rounding)": "infinite", |
|
"max(uint256,uint256)": "infinite", |
|
"min(uint256,uint256)": "infinite", |
|
"mulDiv(uint256,uint256,uint256)": "infinite", |
|
"mulDiv(uint256,uint256,uint256,enum Math.Rounding)": "infinite", |
|
"sqrt(uint256)": "infinite", |
|
"sqrt(uint256,enum Math.Rounding)": "infinite" |
|
} |
|
}, |
|
"legacyAssembly": { |
|
".code": [ |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH #[$]", |
|
"source": 1, |
|
"value": "0000000000000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH [$]", |
|
"source": 1, |
|
"value": "0000000000000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "B" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "DUP3", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "DUP3", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "DUP3", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "CODECOPY", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "DUP1", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "MLOAD", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "BYTE", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "73" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "EQ", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH [tag]", |
|
"source": 1, |
|
"value": "1" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "JUMPI", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "MSTORE", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "4" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "MSTORE", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "24" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "REVERT", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "tag", |
|
"source": 1, |
|
"value": "1" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "JUMPDEST", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "ADDRESS", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "MSTORE", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "73" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "DUP2", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "MSTORE8", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "DUP3", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "DUP2", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "RETURN", |
|
"source": 1 |
|
} |
|
], |
|
".data": { |
|
"0": { |
|
".auxdata": "a2646970667358221220cc60d619142539c74ac21b6a23798f2730f0977b223eaa2401d029326ecd420864736f6c63430008120033", |
|
".code": [ |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSHDEPLOYADDRESS", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "ADDRESS", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "EQ", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "80" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "40" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "MSTORE", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "PUSH", |
|
"source": 1, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "DUP1", |
|
"source": 1 |
|
}, |
|
{ |
|
"begin": 202, |
|
"end": 12784, |
|
"name": "REVERT", |
|
"source": 1 |
|
} |
|
] |
|
} |
|
}, |
|
"sourceList": [ |
|
".deps/npm/@openzeppelin/contracts/utils/Strings.sol", |
|
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol", |
|
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol", |
|
"#utility.yul" |
|
] |
|
}, |
|
"methodIdentifiers": {} |
|
}, |
|
"metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/npm/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]}},\"version\":1}", |
|
"storageLayout": { |
|
"storage": [], |
|
"types": null |
|
}, |
|
"userdoc": { |
|
"kind": "user", |
|
"methods": {}, |
|
"version": 1 |
|
} |
|
} |
|
}, |
|
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol": { |
|
"SignedMath": { |
|
"abi": [], |
|
"devdoc": { |
|
"details": "Standard signed math utilities missing in the Solidity language.", |
|
"kind": "dev", |
|
"methods": {}, |
|
"version": 1 |
|
}, |
|
"evm": { |
|
"assembly": " /* \".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":215:1262 library SignedMath {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":215:1262 library SignedMath {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212201730d8873780b53529d8093e544019304ae1994a54bdbf295e1fbff413a93c7e64736f6c63430008120033\n}\n", |
|
"bytecode": { |
|
"functionDebugData": {}, |
|
"generatedSources": [], |
|
"linkReferences": {}, |
|
"object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201730d8873780b53529d8093e544019304ae1994a54bdbf295e1fbff413a93c7e64736f6c63430008120033", |
|
"opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 OR ADDRESS 0xD8 DUP8 CALLDATACOPY DUP1 0xB5 CALLDATALOAD 0x29 0xD8 MULMOD RETURNDATACOPY SLOAD BLOCKHASH NOT ADDRESS 0x4A 0xE1 SWAP10 0x4A SLOAD 0xBD 0xBF 0x29 0x5E 0x1F 0xBF DELEGATECALL SGT 0xA9 EXTCODECOPY PUSH31 0x64736F6C634300081200330000000000000000000000000000000000000000 ", |
|
"sourceMap": "215:1047:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" |
|
}, |
|
"deployedBytecode": { |
|
"functionDebugData": {}, |
|
"generatedSources": [], |
|
"immutableReferences": {}, |
|
"linkReferences": {}, |
|
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201730d8873780b53529d8093e544019304ae1994a54bdbf295e1fbff413a93c7e64736f6c63430008120033", |
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 OR ADDRESS 0xD8 DUP8 CALLDATACOPY DUP1 0xB5 CALLDATALOAD 0x29 0xD8 MULMOD RETURNDATACOPY SLOAD BLOCKHASH NOT ADDRESS 0x4A 0xE1 SWAP10 0x4A SLOAD 0xBD 0xBF 0x29 0x5E 0x1F 0xBF DELEGATECALL SGT 0xA9 EXTCODECOPY PUSH31 0x64736F6C634300081200330000000000000000000000000000000000000000 ", |
|
"sourceMap": "215:1047:2:-:0;;;;;;;;" |
|
}, |
|
"gasEstimates": { |
|
"creation": { |
|
"codeDepositCost": "17200", |
|
"executionCost": "97", |
|
"totalCost": "17297" |
|
}, |
|
"internal": { |
|
"abs(int256)": "infinite", |
|
"average(int256,int256)": "infinite", |
|
"max(int256,int256)": "infinite", |
|
"min(int256,int256)": "infinite" |
|
} |
|
}, |
|
"legacyAssembly": { |
|
".code": [ |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH #[$]", |
|
"source": 2, |
|
"value": "0000000000000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH [$]", |
|
"source": 2, |
|
"value": "0000000000000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "B" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "DUP3", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "DUP3", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "DUP3", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "CODECOPY", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "DUP1", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "MLOAD", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "BYTE", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "73" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "EQ", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH [tag]", |
|
"source": 2, |
|
"value": "1" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "JUMPI", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "MSTORE", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "4" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "MSTORE", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "24" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "REVERT", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "tag", |
|
"source": 2, |
|
"value": "1" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "JUMPDEST", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "ADDRESS", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "MSTORE", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "73" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "DUP2", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "MSTORE8", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "DUP3", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "DUP2", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "RETURN", |
|
"source": 2 |
|
} |
|
], |
|
".data": { |
|
"0": { |
|
".auxdata": "a26469706673582212201730d8873780b53529d8093e544019304ae1994a54bdbf295e1fbff413a93c7e64736f6c63430008120033", |
|
".code": [ |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSHDEPLOYADDRESS", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "ADDRESS", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "EQ", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "80" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "40" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "MSTORE", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "PUSH", |
|
"source": 2, |
|
"value": "0" |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "DUP1", |
|
"source": 2 |
|
}, |
|
{ |
|
"begin": 215, |
|
"end": 1262, |
|
"name": "REVERT", |
|
"source": 2 |
|
} |
|
] |
|
} |
|
}, |
|
"sourceList": [ |
|
".deps/npm/@openzeppelin/contracts/utils/Strings.sol", |
|
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol", |
|
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol", |
|
"#utility.yul" |
|
] |
|
}, |
|
"methodIdentifiers": {} |
|
}, |
|
"metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7\",\"dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6\"]}},\"version\":1}", |
|
"storageLayout": { |
|
"storage": [], |
|
"types": null |
|
}, |
|
"userdoc": { |
|
"kind": "user", |
|
"methods": {}, |
|
"version": 1 |
|
} |
|
} |
|
} |
|
}, |
|
"sources": { |
|
".deps/npm/@openzeppelin/contracts/utils/Strings.sol": { |
|
"ast": { |
|
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/Strings.sol", |
|
"exportedSymbols": { |
|
"Math": [ |
|
1094 |
|
], |
|
"SignedMath": [ |
|
1199 |
|
], |
|
"Strings": [ |
|
228 |
|
] |
|
}, |
|
"id": 229, |
|
"license": "MIT", |
|
"nodeType": "SourceUnit", |
|
"nodes": [ |
|
{ |
|
"id": 1, |
|
"literals": [ |
|
"solidity", |
|
"^", |
|
"0.8", |
|
".0" |
|
], |
|
"nodeType": "PragmaDirective", |
|
"src": "101:23:0" |
|
}, |
|
{ |
|
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/math/Math.sol", |
|
"file": "./math/Math.sol", |
|
"id": 2, |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "ImportDirective", |
|
"scope": 229, |
|
"sourceUnit": 1095, |
|
"src": "126:25:0", |
|
"symbolAliases": [], |
|
"unitAlias": "" |
|
}, |
|
{ |
|
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol", |
|
"file": "./math/SignedMath.sol", |
|
"id": 3, |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "ImportDirective", |
|
"scope": 229, |
|
"sourceUnit": 1200, |
|
"src": "152:31:0", |
|
"symbolAliases": [], |
|
"unitAlias": "" |
|
}, |
|
{ |
|
"abstract": false, |
|
"baseContracts": [], |
|
"canonicalName": "Strings", |
|
"contractDependencies": [], |
|
"contractKind": "library", |
|
"documentation": { |
|
"id": 4, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "185:34:0", |
|
"text": " @dev String operations." |
|
}, |
|
"fullyImplemented": true, |
|
"id": 228, |
|
"linearizedBaseContracts": [ |
|
228 |
|
], |
|
"name": "Strings", |
|
"nameLocation": "228:7:0", |
|
"nodeType": "ContractDefinition", |
|
"nodes": [ |
|
{ |
|
"constant": true, |
|
"id": 7, |
|
"mutability": "constant", |
|
"name": "_SYMBOLS", |
|
"nameLocation": "267:8:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 228, |
|
"src": "242:54:0", |
|
"stateVariable": true, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes16", |
|
"typeString": "bytes16" |
|
}, |
|
"typeName": { |
|
"id": 5, |
|
"name": "bytes16", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "242:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes16", |
|
"typeString": "bytes16" |
|
} |
|
}, |
|
"value": { |
|
"hexValue": "30313233343536373839616263646566", |
|
"id": 6, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "string", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "278:18:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f", |
|
"typeString": "literal_string \"0123456789abcdef\"" |
|
}, |
|
"value": "0123456789abcdef" |
|
}, |
|
"visibility": "private" |
|
}, |
|
{ |
|
"constant": true, |
|
"id": 10, |
|
"mutability": "constant", |
|
"name": "_ADDRESS_LENGTH", |
|
"nameLocation": "325:15:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 228, |
|
"src": "302:43:0", |
|
"stateVariable": true, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
}, |
|
"typeName": { |
|
"id": 8, |
|
"name": "uint8", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "302:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
}, |
|
"value": { |
|
"hexValue": "3230", |
|
"id": 9, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "343:2:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_20_by_1", |
|
"typeString": "int_const 20" |
|
}, |
|
"value": "20" |
|
}, |
|
"visibility": "private" |
|
}, |
|
{ |
|
"body": { |
|
"id": 57, |
|
"nodeType": "Block", |
|
"src": "518:625:0", |
|
"statements": [ |
|
{ |
|
"id": 56, |
|
"nodeType": "UncheckedBlock", |
|
"src": "528:609:0", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
19 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 19, |
|
"mutability": "mutable", |
|
"name": "length", |
|
"nameLocation": "560:6:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 56, |
|
"src": "552:14:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 18, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "552:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 26, |
|
"initialValue": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 25, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"arguments": [ |
|
{ |
|
"id": 22, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 13, |
|
"src": "580:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"expression": { |
|
"id": 20, |
|
"name": "Math", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1094, |
|
"src": "569:4:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_contract$_Math_$1094_$", |
|
"typeString": "type(library Math)" |
|
} |
|
}, |
|
"id": 21, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"memberLocation": "574:5:0", |
|
"memberName": "log10", |
|
"nodeType": "MemberAccess", |
|
"referencedDeclaration": 931, |
|
"src": "569:10:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 23, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "569:17:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 24, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "589:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "569:21:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "552:38:0" |
|
}, |
|
{ |
|
"assignments": [ |
|
28 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 28, |
|
"mutability": "mutable", |
|
"name": "buffer", |
|
"nameLocation": "618:6:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 56, |
|
"src": "604:20:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string" |
|
}, |
|
"typeName": { |
|
"id": 27, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "604:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 33, |
|
"initialValue": { |
|
"arguments": [ |
|
{ |
|
"id": 31, |
|
"name": "length", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 19, |
|
"src": "638:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 30, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "NewExpression", |
|
"src": "627:10:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$", |
|
"typeString": "function (uint256) pure returns (string memory)" |
|
}, |
|
"typeName": { |
|
"id": 29, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "631:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
} |
|
}, |
|
"id": 32, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "627:18:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "604:41:0" |
|
}, |
|
{ |
|
"assignments": [ |
|
35 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 35, |
|
"mutability": "mutable", |
|
"name": "ptr", |
|
"nameLocation": "667:3:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 56, |
|
"src": "659:11:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 34, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "659:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 36, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "659:11:0" |
|
}, |
|
{ |
|
"AST": { |
|
"nodeType": "YulBlock", |
|
"src": "740:67:0", |
|
"statements": [ |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "758:35:0", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"name": "buffer", |
|
"nodeType": "YulIdentifier", |
|
"src": "769:6:0" |
|
}, |
|
{ |
|
"arguments": [ |
|
{ |
|
"kind": "number", |
|
"nodeType": "YulLiteral", |
|
"src": "781:2:0", |
|
"type": "", |
|
"value": "32" |
|
}, |
|
{ |
|
"name": "length", |
|
"nodeType": "YulIdentifier", |
|
"src": "785:6:0" |
|
} |
|
], |
|
"functionName": { |
|
"name": "add", |
|
"nodeType": "YulIdentifier", |
|
"src": "777:3:0" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "777:15:0" |
|
} |
|
], |
|
"functionName": { |
|
"name": "add", |
|
"nodeType": "YulIdentifier", |
|
"src": "765:3:0" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "765:28:0" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "ptr", |
|
"nodeType": "YulIdentifier", |
|
"src": "758:3:0" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": "@solidity memory-safe-assembly", |
|
"evmVersion": "paris", |
|
"externalReferences": [ |
|
{ |
|
"declaration": 28, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "769:6:0", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 19, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "785:6:0", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 35, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "758:3:0", |
|
"valueSize": 1 |
|
} |
|
], |
|
"id": 37, |
|
"nodeType": "InlineAssembly", |
|
"src": "731:76:0" |
|
}, |
|
{ |
|
"body": { |
|
"id": 52, |
|
"nodeType": "Block", |
|
"src": "833:267:0", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 40, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "UnaryOperation", |
|
"operator": "--", |
|
"prefix": false, |
|
"src": "851:5:0", |
|
"subExpression": { |
|
"id": 39, |
|
"name": "ptr", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 35, |
|
"src": "851:3:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 41, |
|
"nodeType": "ExpressionStatement", |
|
"src": "851:5:0" |
|
}, |
|
{ |
|
"AST": { |
|
"nodeType": "YulBlock", |
|
"src": "934:84:0", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"name": "ptr", |
|
"nodeType": "YulIdentifier", |
|
"src": "964:3:0" |
|
}, |
|
{ |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"name": "value", |
|
"nodeType": "YulIdentifier", |
|
"src": "978:5:0" |
|
}, |
|
{ |
|
"kind": "number", |
|
"nodeType": "YulLiteral", |
|
"src": "985:2:0", |
|
"type": "", |
|
"value": "10" |
|
} |
|
], |
|
"functionName": { |
|
"name": "mod", |
|
"nodeType": "YulIdentifier", |
|
"src": "974:3:0" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "974:14:0" |
|
}, |
|
{ |
|
"name": "_SYMBOLS", |
|
"nodeType": "YulIdentifier", |
|
"src": "990:8:0" |
|
} |
|
], |
|
"functionName": { |
|
"name": "byte", |
|
"nodeType": "YulIdentifier", |
|
"src": "969:4:0" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "969:30:0" |
|
} |
|
], |
|
"functionName": { |
|
"name": "mstore8", |
|
"nodeType": "YulIdentifier", |
|
"src": "956:7:0" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "956:44:0" |
|
}, |
|
"nodeType": "YulExpressionStatement", |
|
"src": "956:44:0" |
|
} |
|
] |
|
}, |
|
"documentation": "@solidity memory-safe-assembly", |
|
"evmVersion": "paris", |
|
"externalReferences": [ |
|
{ |
|
"declaration": 7, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "990:8:0", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 35, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "964:3:0", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 13, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "978:5:0", |
|
"valueSize": 1 |
|
} |
|
], |
|
"id": 42, |
|
"nodeType": "InlineAssembly", |
|
"src": "925:93:0" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 45, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 43, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 13, |
|
"src": "1035:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "/=", |
|
"rightHandSide": { |
|
"hexValue": "3130", |
|
"id": 44, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1044:2:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"src": "1035:11:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 46, |
|
"nodeType": "ExpressionStatement", |
|
"src": "1035:11:0" |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 49, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 47, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 13, |
|
"src": "1068:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 48, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1077:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "1068:10:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 51, |
|
"nodeType": "IfStatement", |
|
"src": "1064:21:0", |
|
"trueBody": { |
|
"id": 50, |
|
"nodeType": "Break", |
|
"src": "1080:5:0" |
|
} |
|
} |
|
] |
|
}, |
|
"condition": { |
|
"hexValue": "74727565", |
|
"id": 38, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "bool", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "827:4:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
"value": "true" |
|
}, |
|
"id": 53, |
|
"nodeType": "WhileStatement", |
|
"src": "820:280:0" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 54, |
|
"name": "buffer", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 28, |
|
"src": "1120:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
}, |
|
"functionReturnParameters": 17, |
|
"id": 55, |
|
"nodeType": "Return", |
|
"src": "1113:13:0" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 11, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "352:90:0", |
|
"text": " @dev Converts a `uint256` to its ASCII `string` decimal representation." |
|
}, |
|
"id": 58, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "toString", |
|
"nameLocation": "456:8:0", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 14, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 13, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "473:5:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 58, |
|
"src": "465:13:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 12, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "465:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "464:15:0" |
|
}, |
|
"returnParameters": { |
|
"id": 17, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 16, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 58, |
|
"src": "503:13:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string" |
|
}, |
|
"typeName": { |
|
"id": 15, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "503:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "502:15:0" |
|
}, |
|
"scope": 228, |
|
"src": "447:696:0", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 85, |
|
"nodeType": "Block", |
|
"src": "1313:103:0", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 72, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 70, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 61, |
|
"src": "1354:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 71, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1362:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "1354:9:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"hexValue": "", |
|
"id": 74, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "string", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1372:2:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", |
|
"typeString": "literal_string \"\"" |
|
}, |
|
"value": "" |
|
}, |
|
"id": 75, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "1354:20:0", |
|
"trueExpression": { |
|
"hexValue": "2d", |
|
"id": 73, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "string", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1366:3:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", |
|
"typeString": "literal_string \"-\"" |
|
}, |
|
"value": "-" |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
}, |
|
{ |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"id": 79, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 61, |
|
"src": "1400:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
], |
|
"expression": { |
|
"id": 77, |
|
"name": "SignedMath", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1199, |
|
"src": "1385:10:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_contract$_SignedMath_$1199_$", |
|
"typeString": "type(library SignedMath)" |
|
} |
|
}, |
|
"id": 78, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"memberLocation": "1396:3:0", |
|
"memberName": "abs", |
|
"nodeType": "MemberAccess", |
|
"referencedDeclaration": 1198, |
|
"src": "1385:14:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", |
|
"typeString": "function (int256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 80, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "1385:21:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 76, |
|
"name": "toString", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
58, |
|
86 |
|
], |
|
"referencedDeclaration": 58, |
|
"src": "1376:8:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", |
|
"typeString": "function (uint256) pure returns (string memory)" |
|
} |
|
}, |
|
"id": 81, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "1376:31:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
}, |
|
{ |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
], |
|
"expression": { |
|
"id": 68, |
|
"name": "abi", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 4294967295, |
|
"src": "1337:3:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_magic_abi", |
|
"typeString": "abi" |
|
} |
|
}, |
|
"id": 69, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"memberLocation": "1341:12:0", |
|
"memberName": "encodePacked", |
|
"nodeType": "MemberAccess", |
|
"src": "1337:16:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", |
|
"typeString": "function () pure returns (bytes memory)" |
|
} |
|
}, |
|
"id": 82, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "1337:71:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
], |
|
"id": 67, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "1330:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_string_storage_ptr_$", |
|
"typeString": "type(string storage pointer)" |
|
}, |
|
"typeName": { |
|
"id": 66, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1330:6:0", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 83, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "1330:79:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
}, |
|
"functionReturnParameters": 65, |
|
"id": 84, |
|
"nodeType": "Return", |
|
"src": "1323:86:0" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 59, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "1149:89:0", |
|
"text": " @dev Converts a `int256` to its ASCII `string` decimal representation." |
|
}, |
|
"id": 86, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "toString", |
|
"nameLocation": "1252:8:0", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 62, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 61, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "1268:5:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 86, |
|
"src": "1261:12:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 60, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1261:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1260:14:0" |
|
}, |
|
"returnParameters": { |
|
"id": 65, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 64, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 86, |
|
"src": "1298:13:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string" |
|
}, |
|
"typeName": { |
|
"id": 63, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1298:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1297:15:0" |
|
}, |
|
"scope": 228, |
|
"src": "1243:173:0", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 105, |
|
"nodeType": "Block", |
|
"src": "1595:100:0", |
|
"statements": [ |
|
{ |
|
"id": 104, |
|
"nodeType": "UncheckedBlock", |
|
"src": "1605:84:0", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"id": 95, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 89, |
|
"src": "1648:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 101, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"arguments": [ |
|
{ |
|
"id": 98, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 89, |
|
"src": "1667:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"expression": { |
|
"id": 96, |
|
"name": "Math", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1094, |
|
"src": "1655:4:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_contract$_Math_$1094_$", |
|
"typeString": "type(library Math)" |
|
} |
|
}, |
|
"id": 97, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"memberLocation": "1660:6:0", |
|
"memberName": "log256", |
|
"nodeType": "MemberAccess", |
|
"referencedDeclaration": 1054, |
|
"src": "1655:11:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 99, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "1655:18:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 100, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1676:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "1655:22:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 94, |
|
"name": "toHexString", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
106, |
|
182, |
|
202 |
|
], |
|
"referencedDeclaration": 182, |
|
"src": "1636:11:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$", |
|
"typeString": "function (uint256,uint256) pure returns (string memory)" |
|
} |
|
}, |
|
"id": 102, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "1636:42:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
}, |
|
"functionReturnParameters": 93, |
|
"id": 103, |
|
"nodeType": "Return", |
|
"src": "1629:49:0" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 87, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "1422:94:0", |
|
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation." |
|
}, |
|
"id": 106, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "toHexString", |
|
"nameLocation": "1530:11:0", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 90, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 89, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "1550:5:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 106, |
|
"src": "1542:13:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 88, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1542:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1541:15:0" |
|
}, |
|
"returnParameters": { |
|
"id": 93, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 92, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 106, |
|
"src": "1580:13:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string" |
|
}, |
|
"typeName": { |
|
"id": 91, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1580:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1579:15:0" |
|
}, |
|
"scope": 228, |
|
"src": "1521:174:0", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 181, |
|
"nodeType": "Block", |
|
"src": "1908:347:0", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
117 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 117, |
|
"mutability": "mutable", |
|
"name": "buffer", |
|
"nameLocation": "1931:6:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 181, |
|
"src": "1918:19:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes" |
|
}, |
|
"typeName": { |
|
"id": 116, |
|
"name": "bytes", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1918:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_storage_ptr", |
|
"typeString": "bytes" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 126, |
|
"initialValue": { |
|
"arguments": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 124, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 122, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "32", |
|
"id": 120, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1950:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 121, |
|
"name": "length", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 111, |
|
"src": "1954:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "1950:10:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"hexValue": "32", |
|
"id": 123, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1963:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "1950:14:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 119, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "NewExpression", |
|
"src": "1940:9:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", |
|
"typeString": "function (uint256) pure returns (bytes memory)" |
|
}, |
|
"typeName": { |
|
"id": 118, |
|
"name": "bytes", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1944:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_storage_ptr", |
|
"typeString": "bytes" |
|
} |
|
} |
|
}, |
|
"id": 125, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "1940:25:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "1918:47:0" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 131, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"baseExpression": { |
|
"id": 127, |
|
"name": "buffer", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 117, |
|
"src": "1975:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
}, |
|
"id": 129, |
|
"indexExpression": { |
|
"hexValue": "30", |
|
"id": 128, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1982:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"isConstant": false, |
|
"isLValue": true, |
|
"isPure": false, |
|
"lValueRequested": true, |
|
"nodeType": "IndexAccess", |
|
"src": "1975:9:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes1", |
|
"typeString": "bytes1" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"hexValue": "30", |
|
"id": 130, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "string", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1987:3:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", |
|
"typeString": "literal_string \"0\"" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "1975:15:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes1", |
|
"typeString": "bytes1" |
|
} |
|
}, |
|
"id": 132, |
|
"nodeType": "ExpressionStatement", |
|
"src": "1975:15:0" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 137, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"baseExpression": { |
|
"id": 133, |
|
"name": "buffer", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 117, |
|
"src": "2000:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
}, |
|
"id": 135, |
|
"indexExpression": { |
|
"hexValue": "31", |
|
"id": 134, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2007:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"isConstant": false, |
|
"isLValue": true, |
|
"isPure": false, |
|
"lValueRequested": true, |
|
"nodeType": "IndexAccess", |
|
"src": "2000:9:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes1", |
|
"typeString": "bytes1" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"hexValue": "78", |
|
"id": 136, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "string", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2012:3:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83", |
|
"typeString": "literal_string \"x\"" |
|
}, |
|
"value": "x" |
|
}, |
|
"src": "2000:15:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes1", |
|
"typeString": "bytes1" |
|
} |
|
}, |
|
"id": 138, |
|
"nodeType": "ExpressionStatement", |
|
"src": "2000:15:0" |
|
}, |
|
{ |
|
"body": { |
|
"id": 167, |
|
"nodeType": "Block", |
|
"src": "2070:83:0", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 161, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"baseExpression": { |
|
"id": 153, |
|
"name": "buffer", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 117, |
|
"src": "2084:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
}, |
|
"id": 155, |
|
"indexExpression": { |
|
"id": 154, |
|
"name": "i", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 140, |
|
"src": "2091:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"isConstant": false, |
|
"isLValue": true, |
|
"isPure": false, |
|
"lValueRequested": true, |
|
"nodeType": "IndexAccess", |
|
"src": "2084:9:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes1", |
|
"typeString": "bytes1" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"baseExpression": { |
|
"id": 156, |
|
"name": "_SYMBOLS", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 7, |
|
"src": "2096:8:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes16", |
|
"typeString": "bytes16" |
|
} |
|
}, |
|
"id": 160, |
|
"indexExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 159, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 157, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 109, |
|
"src": "2105:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&", |
|
"rightExpression": { |
|
"hexValue": "307866", |
|
"id": 158, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2113:3:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_15_by_1", |
|
"typeString": "int_const 15" |
|
}, |
|
"value": "0xf" |
|
}, |
|
"src": "2105:11:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "IndexAccess", |
|
"src": "2096:21:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes1", |
|
"typeString": "bytes1" |
|
} |
|
}, |
|
"src": "2084:33:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes1", |
|
"typeString": "bytes1" |
|
} |
|
}, |
|
"id": 162, |
|
"nodeType": "ExpressionStatement", |
|
"src": "2084:33:0" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 165, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 163, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 109, |
|
"src": "2131:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "34", |
|
"id": 164, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2141:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_4_by_1", |
|
"typeString": "int_const 4" |
|
}, |
|
"value": "4" |
|
}, |
|
"src": "2131:11:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 166, |
|
"nodeType": "ExpressionStatement", |
|
"src": "2131:11:0" |
|
} |
|
] |
|
}, |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 149, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 147, |
|
"name": "i", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 140, |
|
"src": "2058:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 148, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2062:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "2058:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 168, |
|
"initializationExpression": { |
|
"assignments": [ |
|
140 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 140, |
|
"mutability": "mutable", |
|
"name": "i", |
|
"nameLocation": "2038:1:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 168, |
|
"src": "2030:9:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 139, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2030:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 146, |
|
"initialValue": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 145, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 143, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "32", |
|
"id": 141, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2042:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 142, |
|
"name": "length", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 111, |
|
"src": "2046:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "2042:10:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 144, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2055:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "2042:14:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "2030:26:0" |
|
}, |
|
"loopExpression": { |
|
"expression": { |
|
"id": 151, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "UnaryOperation", |
|
"operator": "--", |
|
"prefix": true, |
|
"src": "2065:3:0", |
|
"subExpression": { |
|
"id": 150, |
|
"name": "i", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 140, |
|
"src": "2067:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 152, |
|
"nodeType": "ExpressionStatement", |
|
"src": "2065:3:0" |
|
}, |
|
"nodeType": "ForStatement", |
|
"src": "2025:128:0" |
|
}, |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 172, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 170, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 109, |
|
"src": "2170:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 171, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2179:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "2170:10:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
{ |
|
"hexValue": "537472696e67733a20686578206c656e67746820696e73756666696369656e74", |
|
"id": 173, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "string", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2182:34:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2", |
|
"typeString": "literal_string \"Strings: hex length insufficient\"" |
|
}, |
|
"value": "Strings: hex length insufficient" |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
{ |
|
"typeIdentifier": "t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2", |
|
"typeString": "literal_string \"Strings: hex length insufficient\"" |
|
} |
|
], |
|
"id": 169, |
|
"name": "require", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
4294967278, |
|
4294967278 |
|
], |
|
"referencedDeclaration": 4294967278, |
|
"src": "2162:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", |
|
"typeString": "function (bool,string memory) pure" |
|
} |
|
}, |
|
"id": 174, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2162:55:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_tuple$__$", |
|
"typeString": "tuple()" |
|
} |
|
}, |
|
"id": 175, |
|
"nodeType": "ExpressionStatement", |
|
"src": "2162:55:0" |
|
}, |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"id": 178, |
|
"name": "buffer", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 117, |
|
"src": "2241:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
], |
|
"id": 177, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "2234:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_string_storage_ptr_$", |
|
"typeString": "type(string storage pointer)" |
|
}, |
|
"typeName": { |
|
"id": 176, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2234:6:0", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 179, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2234:14:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
}, |
|
"functionReturnParameters": 115, |
|
"id": 180, |
|
"nodeType": "Return", |
|
"src": "2227:21:0" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 107, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "1701:112:0", |
|
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length." |
|
}, |
|
"id": 182, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "toHexString", |
|
"nameLocation": "1827:11:0", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 112, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 109, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "1847:5:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 182, |
|
"src": "1839:13:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 108, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1839:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 111, |
|
"mutability": "mutable", |
|
"name": "length", |
|
"nameLocation": "1862:6:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 182, |
|
"src": "1854:14:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 110, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1854:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1838:31:0" |
|
}, |
|
"returnParameters": { |
|
"id": 115, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 114, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 182, |
|
"src": "1893:13:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string" |
|
}, |
|
"typeName": { |
|
"id": 113, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1893:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1892:15:0" |
|
}, |
|
"scope": 228, |
|
"src": "1818:437:0", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 201, |
|
"nodeType": "Block", |
|
"src": "2480:76:0", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"id": 195, |
|
"name": "addr", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 185, |
|
"src": "2525:4:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_address", |
|
"typeString": "address" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_address", |
|
"typeString": "address" |
|
} |
|
], |
|
"id": 194, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "2517:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_uint160_$", |
|
"typeString": "type(uint160)" |
|
}, |
|
"typeName": { |
|
"id": 193, |
|
"name": "uint160", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2517:7:0", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 196, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2517:13:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint160", |
|
"typeString": "uint160" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint160", |
|
"typeString": "uint160" |
|
} |
|
], |
|
"id": 192, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "2509:7:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_uint256_$", |
|
"typeString": "type(uint256)" |
|
}, |
|
"typeName": { |
|
"id": 191, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2509:7:0", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 197, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2509:22:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
{ |
|
"id": 198, |
|
"name": "_ADDRESS_LENGTH", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 10, |
|
"src": "2533:15:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
{ |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
], |
|
"id": 190, |
|
"name": "toHexString", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
106, |
|
182, |
|
202 |
|
], |
|
"referencedDeclaration": 182, |
|
"src": "2497:11:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$", |
|
"typeString": "function (uint256,uint256) pure returns (string memory)" |
|
} |
|
}, |
|
"id": 199, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2497:52:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
}, |
|
"functionReturnParameters": 189, |
|
"id": 200, |
|
"nodeType": "Return", |
|
"src": "2490:59:0" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 183, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "2261:141:0", |
|
"text": " @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation." |
|
}, |
|
"id": 202, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "toHexString", |
|
"nameLocation": "2416:11:0", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 186, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 185, |
|
"mutability": "mutable", |
|
"name": "addr", |
|
"nameLocation": "2436:4:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 202, |
|
"src": "2428:12:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_address", |
|
"typeString": "address" |
|
}, |
|
"typeName": { |
|
"id": 184, |
|
"name": "address", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2428:7:0", |
|
"stateMutability": "nonpayable", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_address", |
|
"typeString": "address" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "2427:14:0" |
|
}, |
|
"returnParameters": { |
|
"id": 189, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 188, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 202, |
|
"src": "2465:13:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string" |
|
}, |
|
"typeName": { |
|
"id": 187, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2465:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "2464:15:0" |
|
}, |
|
"scope": 228, |
|
"src": "2407:149:0", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 226, |
|
"nodeType": "Block", |
|
"src": "2711:66:0", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"commonType": { |
|
"typeIdentifier": "t_bytes32", |
|
"typeString": "bytes32" |
|
}, |
|
"id": 224, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"id": 215, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 205, |
|
"src": "2744:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
], |
|
"id": 214, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "2738:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$", |
|
"typeString": "type(bytes storage pointer)" |
|
}, |
|
"typeName": { |
|
"id": 213, |
|
"name": "bytes", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2738:5:0", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 216, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2738:8:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
], |
|
"id": 212, |
|
"name": "keccak256", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 4294967288, |
|
"src": "2728:9:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", |
|
"typeString": "function (bytes memory) pure returns (bytes32)" |
|
} |
|
}, |
|
"id": 217, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2728:19:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes32", |
|
"typeString": "bytes32" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"id": 221, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 207, |
|
"src": "2767:1:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string memory" |
|
} |
|
], |
|
"id": 220, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "2761:5:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$", |
|
"typeString": "type(bytes storage pointer)" |
|
}, |
|
"typeName": { |
|
"id": 219, |
|
"name": "bytes", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2761:5:0", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 222, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2761:8:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_bytes_memory_ptr", |
|
"typeString": "bytes memory" |
|
} |
|
], |
|
"id": 218, |
|
"name": "keccak256", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 4294967288, |
|
"src": "2751:9:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", |
|
"typeString": "function (bytes memory) pure returns (bytes32)" |
|
} |
|
}, |
|
"id": 223, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2751:19:0", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bytes32", |
|
"typeString": "bytes32" |
|
} |
|
}, |
|
"src": "2728:42:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"functionReturnParameters": 211, |
|
"id": 225, |
|
"nodeType": "Return", |
|
"src": "2721:49:0" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 203, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "2562:66:0", |
|
"text": " @dev Returns true if the two strings are equal." |
|
}, |
|
"id": 227, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "equal", |
|
"nameLocation": "2642:5:0", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 208, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 205, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "2662:1:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 227, |
|
"src": "2648:15:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string" |
|
}, |
|
"typeName": { |
|
"id": 204, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2648:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 207, |
|
"mutability": "mutable", |
|
"name": "b", |
|
"nameLocation": "2679:1:0", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 227, |
|
"src": "2665:15:0", |
|
"stateVariable": false, |
|
"storageLocation": "memory", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_memory_ptr", |
|
"typeString": "string" |
|
}, |
|
"typeName": { |
|
"id": 206, |
|
"name": "string", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2665:6:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_string_storage_ptr", |
|
"typeString": "string" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "2647:34:0" |
|
}, |
|
"returnParameters": { |
|
"id": 211, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 210, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 227, |
|
"src": "2705:4:0", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
"typeName": { |
|
"id": 209, |
|
"name": "bool", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2705:4:0", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "2704:6:0" |
|
}, |
|
"scope": 228, |
|
"src": "2633:144:0", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
} |
|
], |
|
"scope": 229, |
|
"src": "220:2559:0", |
|
"usedErrors": [] |
|
} |
|
], |
|
"src": "101:2679:0" |
|
}, |
|
"id": 0 |
|
}, |
|
".deps/npm/@openzeppelin/contracts/utils/math/Math.sol": { |
|
"ast": { |
|
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/math/Math.sol", |
|
"exportedSymbols": { |
|
"Math": [ |
|
1094 |
|
] |
|
}, |
|
"id": 1095, |
|
"license": "MIT", |
|
"nodeType": "SourceUnit", |
|
"nodes": [ |
|
{ |
|
"id": 230, |
|
"literals": [ |
|
"solidity", |
|
"^", |
|
"0.8", |
|
".0" |
|
], |
|
"nodeType": "PragmaDirective", |
|
"src": "103:23:1" |
|
}, |
|
{ |
|
"abstract": false, |
|
"baseContracts": [], |
|
"canonicalName": "Math", |
|
"contractDependencies": [], |
|
"contractKind": "library", |
|
"documentation": { |
|
"id": 231, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "128:73:1", |
|
"text": " @dev Standard math utilities missing in the Solidity language." |
|
}, |
|
"fullyImplemented": true, |
|
"id": 1094, |
|
"linearizedBaseContracts": [ |
|
1094 |
|
], |
|
"name": "Math", |
|
"nameLocation": "210:4:1", |
|
"nodeType": "ContractDefinition", |
|
"nodes": [ |
|
{ |
|
"canonicalName": "Math.Rounding", |
|
"id": 235, |
|
"members": [ |
|
{ |
|
"id": 232, |
|
"name": "Down", |
|
"nameLocation": "245:4:1", |
|
"nodeType": "EnumValue", |
|
"src": "245:4:1" |
|
}, |
|
{ |
|
"id": 233, |
|
"name": "Up", |
|
"nameLocation": "287:2:1", |
|
"nodeType": "EnumValue", |
|
"src": "287:2:1" |
|
}, |
|
{ |
|
"id": 234, |
|
"name": "Zero", |
|
"nameLocation": "318:4:1", |
|
"nodeType": "EnumValue", |
|
"src": "318:4:1" |
|
} |
|
], |
|
"name": "Rounding", |
|
"nameLocation": "226:8:1", |
|
"nodeType": "EnumDefinition", |
|
"src": "221:122:1" |
|
}, |
|
{ |
|
"body": { |
|
"id": 252, |
|
"nodeType": "Block", |
|
"src": "480:37:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 247, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 245, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 238, |
|
"src": "497:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"id": 246, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 240, |
|
"src": "501:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "497:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"id": 249, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 240, |
|
"src": "509:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 250, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "497:13:1", |
|
"trueExpression": { |
|
"id": 248, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 238, |
|
"src": "505:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 244, |
|
"id": 251, |
|
"nodeType": "Return", |
|
"src": "490:20:1" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 236, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "349:59:1", |
|
"text": " @dev Returns the largest of two numbers." |
|
}, |
|
"id": 253, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "max", |
|
"nameLocation": "422:3:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 241, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 238, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "434:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 253, |
|
"src": "426:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 237, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "426:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 240, |
|
"mutability": "mutable", |
|
"name": "b", |
|
"nameLocation": "445:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 253, |
|
"src": "437:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 239, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "437:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "425:22:1" |
|
}, |
|
"returnParameters": { |
|
"id": 244, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 243, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 253, |
|
"src": "471:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 242, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "471:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "470:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "413:104:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 270, |
|
"nodeType": "Block", |
|
"src": "655:37:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 265, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 263, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 256, |
|
"src": "672:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<", |
|
"rightExpression": { |
|
"id": 264, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 258, |
|
"src": "676:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "672:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"id": 267, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 258, |
|
"src": "684:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 268, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "672:13:1", |
|
"trueExpression": { |
|
"id": 266, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 256, |
|
"src": "680:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 262, |
|
"id": 269, |
|
"nodeType": "Return", |
|
"src": "665:20:1" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 254, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "523:60:1", |
|
"text": " @dev Returns the smallest of two numbers." |
|
}, |
|
"id": 271, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "min", |
|
"nameLocation": "597:3:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 259, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 256, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "609:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 271, |
|
"src": "601:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 255, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "601:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 258, |
|
"mutability": "mutable", |
|
"name": "b", |
|
"nameLocation": "620:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 271, |
|
"src": "612:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 257, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "612:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "600:22:1" |
|
}, |
|
"returnParameters": { |
|
"id": 262, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 261, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 271, |
|
"src": "646:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 260, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "646:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "645:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "588:104:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 293, |
|
"nodeType": "Block", |
|
"src": "876:82:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 291, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 283, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 281, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 274, |
|
"src": "931:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&", |
|
"rightExpression": { |
|
"id": 282, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 276, |
|
"src": "935:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "931:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 284, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "930:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 290, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 287, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 285, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 274, |
|
"src": "941:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "^", |
|
"rightExpression": { |
|
"id": 286, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 276, |
|
"src": "945:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "941:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 288, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "940:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"hexValue": "32", |
|
"id": 289, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "950:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "940:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "930:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 280, |
|
"id": 292, |
|
"nodeType": "Return", |
|
"src": "923:28:1" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 272, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "698:102:1", |
|
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero." |
|
}, |
|
"id": 294, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "average", |
|
"nameLocation": "814:7:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 277, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 274, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "830:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 294, |
|
"src": "822:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 273, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "822:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 276, |
|
"mutability": "mutable", |
|
"name": "b", |
|
"nameLocation": "841:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 294, |
|
"src": "833:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 275, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "833:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "821:22:1" |
|
}, |
|
"returnParameters": { |
|
"id": 280, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 279, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 294, |
|
"src": "867:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 278, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "867:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "866:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "805:153:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 318, |
|
"nodeType": "Block", |
|
"src": "1228:123:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 306, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 304, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 297, |
|
"src": "1316:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 305, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1321:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "1316:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 315, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 313, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 310, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 308, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 297, |
|
"src": "1330:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "-", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 309, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1334:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "1330:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 311, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "1329:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 312, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 299, |
|
"src": "1339:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "1329:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 314, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1343:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "1329:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 316, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "1316:28:1", |
|
"trueExpression": { |
|
"hexValue": "30", |
|
"id": 307, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1325:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 303, |
|
"id": 317, |
|
"nodeType": "Return", |
|
"src": "1309:35:1" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 295, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "964:188:1", |
|
"text": " @dev Returns the ceiling of the division of two numbers.\n This differs from standard division with `/` in that it rounds up instead\n of rounding down." |
|
}, |
|
"id": 319, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "ceilDiv", |
|
"nameLocation": "1166:7:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 300, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 297, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "1182:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 319, |
|
"src": "1174:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 296, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1174:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 299, |
|
"mutability": "mutable", |
|
"name": "b", |
|
"nameLocation": "1193:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 319, |
|
"src": "1185:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 298, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1185:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1173:22:1" |
|
}, |
|
"returnParameters": { |
|
"id": 303, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 302, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 319, |
|
"src": "1219:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 301, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1219:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1218:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "1157:194:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 441, |
|
"nodeType": "Block", |
|
"src": "1765:4115:1", |
|
"statements": [ |
|
{ |
|
"id": 440, |
|
"nodeType": "UncheckedBlock", |
|
"src": "1775:4099:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
332 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 332, |
|
"mutability": "mutable", |
|
"name": "prod0", |
|
"nameLocation": "2104:5:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 440, |
|
"src": "2096:13:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 331, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2096:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 333, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "2096:13:1" |
|
}, |
|
{ |
|
"assignments": [ |
|
335 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 335, |
|
"mutability": "mutable", |
|
"name": "prod1", |
|
"nameLocation": "2176:5:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 440, |
|
"src": "2168:13:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 334, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "2168:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 336, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "2168:13:1" |
|
}, |
|
{ |
|
"AST": { |
|
"nodeType": "YulBlock", |
|
"src": "2248:157:1", |
|
"statements": [ |
|
{ |
|
"nodeType": "YulVariableDeclaration", |
|
"src": "2266:30:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"name": "x", |
|
"nodeType": "YulIdentifier", |
|
"src": "2283:1:1" |
|
}, |
|
{ |
|
"name": "y", |
|
"nodeType": "YulIdentifier", |
|
"src": "2286:1:1" |
|
}, |
|
{ |
|
"arguments": [ |
|
{ |
|
"kind": "number", |
|
"nodeType": "YulLiteral", |
|
"src": "2293:1:1", |
|
"type": "", |
|
"value": "0" |
|
} |
|
], |
|
"functionName": { |
|
"name": "not", |
|
"nodeType": "YulIdentifier", |
|
"src": "2289:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "2289:6:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "mulmod", |
|
"nodeType": "YulIdentifier", |
|
"src": "2276:6:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "2276:20:1" |
|
}, |
|
"variables": [ |
|
{ |
|
"name": "mm", |
|
"nodeType": "YulTypedName", |
|
"src": "2270:2:1", |
|
"type": "" |
|
} |
|
] |
|
}, |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "2313:18:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"name": "x", |
|
"nodeType": "YulIdentifier", |
|
"src": "2326:1:1" |
|
}, |
|
{ |
|
"name": "y", |
|
"nodeType": "YulIdentifier", |
|
"src": "2329:1:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "mul", |
|
"nodeType": "YulIdentifier", |
|
"src": "2322:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "2322:9:1" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "prod0", |
|
"nodeType": "YulIdentifier", |
|
"src": "2313:5:1" |
|
} |
|
] |
|
}, |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "2348:43:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"name": "mm", |
|
"nodeType": "YulIdentifier", |
|
"src": "2365:2:1" |
|
}, |
|
{ |
|
"name": "prod0", |
|
"nodeType": "YulIdentifier", |
|
"src": "2369:5:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "sub", |
|
"nodeType": "YulIdentifier", |
|
"src": "2361:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "2361:14:1" |
|
}, |
|
{ |
|
"arguments": [ |
|
{ |
|
"name": "mm", |
|
"nodeType": "YulIdentifier", |
|
"src": "2380:2:1" |
|
}, |
|
{ |
|
"name": "prod0", |
|
"nodeType": "YulIdentifier", |
|
"src": "2384:5:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "lt", |
|
"nodeType": "YulIdentifier", |
|
"src": "2377:2:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "2377:13:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "sub", |
|
"nodeType": "YulIdentifier", |
|
"src": "2357:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "2357:34:1" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "prod1", |
|
"nodeType": "YulIdentifier", |
|
"src": "2348:5:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"evmVersion": "paris", |
|
"externalReferences": [ |
|
{ |
|
"declaration": 332, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "2313:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 332, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "2369:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 332, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "2384:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 335, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "2348:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 322, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "2283:1:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 322, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "2326:1:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 324, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "2286:1:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 324, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "2329:1:1", |
|
"valueSize": 1 |
|
} |
|
], |
|
"id": 337, |
|
"nodeType": "InlineAssembly", |
|
"src": "2239:166:1" |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 340, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 338, |
|
"name": "prod1", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 335, |
|
"src": "2486:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 339, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2495:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "2486:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 346, |
|
"nodeType": "IfStatement", |
|
"src": "2482:368:1", |
|
"trueBody": { |
|
"id": 345, |
|
"nodeType": "Block", |
|
"src": "2498:352:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 343, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 341, |
|
"name": "prod0", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 332, |
|
"src": "2816:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 342, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "2824:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "2816:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 330, |
|
"id": 344, |
|
"nodeType": "Return", |
|
"src": "2809:26:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 350, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 348, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "2960:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"id": 349, |
|
"name": "prod1", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 335, |
|
"src": "2974:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "2960:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
{ |
|
"hexValue": "4d6174683a206d756c446976206f766572666c6f77", |
|
"id": 351, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "string", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "2981:23:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_stringliteral_d87093691d63b122ac2c14d1b11554b287e2431cf2b03550b3be7cffb0f86851", |
|
"typeString": "literal_string \"Math: mulDiv overflow\"" |
|
}, |
|
"value": "Math: mulDiv overflow" |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
{ |
|
"typeIdentifier": "t_stringliteral_d87093691d63b122ac2c14d1b11554b287e2431cf2b03550b3be7cffb0f86851", |
|
"typeString": "literal_string \"Math: mulDiv overflow\"" |
|
} |
|
], |
|
"id": 347, |
|
"name": "require", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
4294967278, |
|
4294967278 |
|
], |
|
"referencedDeclaration": 4294967278, |
|
"src": "2952:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", |
|
"typeString": "function (bool,string memory) pure" |
|
} |
|
}, |
|
"id": 352, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "2952:53:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_tuple$__$", |
|
"typeString": "tuple()" |
|
} |
|
}, |
|
"id": 353, |
|
"nodeType": "ExpressionStatement", |
|
"src": "2952:53:1" |
|
}, |
|
{ |
|
"assignments": [ |
|
355 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 355, |
|
"mutability": "mutable", |
|
"name": "remainder", |
|
"nameLocation": "3269:9:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 440, |
|
"src": "3261:17:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 354, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "3261:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 356, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "3261:17:1" |
|
}, |
|
{ |
|
"AST": { |
|
"nodeType": "YulBlock", |
|
"src": "3301:291:1", |
|
"statements": [ |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "3370:38:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"name": "x", |
|
"nodeType": "YulIdentifier", |
|
"src": "3390:1:1" |
|
}, |
|
{ |
|
"name": "y", |
|
"nodeType": "YulIdentifier", |
|
"src": "3393:1:1" |
|
}, |
|
{ |
|
"name": "denominator", |
|
"nodeType": "YulIdentifier", |
|
"src": "3396:11:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "mulmod", |
|
"nodeType": "YulIdentifier", |
|
"src": "3383:6:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "3383:25:1" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "remainder", |
|
"nodeType": "YulIdentifier", |
|
"src": "3370:9:1" |
|
} |
|
] |
|
}, |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "3490:41:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"name": "prod1", |
|
"nodeType": "YulIdentifier", |
|
"src": "3503:5:1" |
|
}, |
|
{ |
|
"arguments": [ |
|
{ |
|
"name": "remainder", |
|
"nodeType": "YulIdentifier", |
|
"src": "3513:9:1" |
|
}, |
|
{ |
|
"name": "prod0", |
|
"nodeType": "YulIdentifier", |
|
"src": "3524:5:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "gt", |
|
"nodeType": "YulIdentifier", |
|
"src": "3510:2:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "3510:20:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "sub", |
|
"nodeType": "YulIdentifier", |
|
"src": "3499:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "3499:32:1" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "prod1", |
|
"nodeType": "YulIdentifier", |
|
"src": "3490:5:1" |
|
} |
|
] |
|
}, |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "3548:30:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"name": "prod0", |
|
"nodeType": "YulIdentifier", |
|
"src": "3561:5:1" |
|
}, |
|
{ |
|
"name": "remainder", |
|
"nodeType": "YulIdentifier", |
|
"src": "3568:9:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "sub", |
|
"nodeType": "YulIdentifier", |
|
"src": "3557:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "3557:21:1" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "prod0", |
|
"nodeType": "YulIdentifier", |
|
"src": "3548:5:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"evmVersion": "paris", |
|
"externalReferences": [ |
|
{ |
|
"declaration": 326, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3396:11:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 332, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3524:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 332, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3548:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 332, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3561:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 335, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3490:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 335, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3503:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 355, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3370:9:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 355, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3513:9:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 355, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3568:9:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 322, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3390:1:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 324, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "3393:1:1", |
|
"valueSize": 1 |
|
} |
|
], |
|
"id": 357, |
|
"nodeType": "InlineAssembly", |
|
"src": "3292:300:1" |
|
}, |
|
{ |
|
"assignments": [ |
|
359 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 359, |
|
"mutability": "mutable", |
|
"name": "twos", |
|
"nameLocation": "3907:4:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 440, |
|
"src": "3899:12:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 358, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "3899:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 367, |
|
"initialValue": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 366, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 360, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "3914:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 364, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 362, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "UnaryOperation", |
|
"operator": "~", |
|
"prefix": true, |
|
"src": "3929:12:1", |
|
"subExpression": { |
|
"id": 361, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "3930:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 363, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "3944:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "3929:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 365, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "3928:18:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "3914:32:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "3899:47:1" |
|
}, |
|
{ |
|
"AST": { |
|
"nodeType": "YulBlock", |
|
"src": "3969:362:1", |
|
"statements": [ |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "4034:37:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"name": "denominator", |
|
"nodeType": "YulIdentifier", |
|
"src": "4053:11:1" |
|
}, |
|
{ |
|
"name": "twos", |
|
"nodeType": "YulIdentifier", |
|
"src": "4066:4:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "div", |
|
"nodeType": "YulIdentifier", |
|
"src": "4049:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "4049:22:1" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "denominator", |
|
"nodeType": "YulIdentifier", |
|
"src": "4034:11:1" |
|
} |
|
] |
|
}, |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "4138:25:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"name": "prod0", |
|
"nodeType": "YulIdentifier", |
|
"src": "4151:5:1" |
|
}, |
|
{ |
|
"name": "twos", |
|
"nodeType": "YulIdentifier", |
|
"src": "4158:4:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "div", |
|
"nodeType": "YulIdentifier", |
|
"src": "4147:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "4147:16:1" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "prod0", |
|
"nodeType": "YulIdentifier", |
|
"src": "4138:5:1" |
|
} |
|
] |
|
}, |
|
{ |
|
"nodeType": "YulAssignment", |
|
"src": "4278:39:1", |
|
"value": { |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"arguments": [ |
|
{ |
|
"kind": "number", |
|
"nodeType": "YulLiteral", |
|
"src": "4298:1:1", |
|
"type": "", |
|
"value": "0" |
|
}, |
|
{ |
|
"name": "twos", |
|
"nodeType": "YulIdentifier", |
|
"src": "4301:4:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "sub", |
|
"nodeType": "YulIdentifier", |
|
"src": "4294:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "4294:12:1" |
|
}, |
|
{ |
|
"name": "twos", |
|
"nodeType": "YulIdentifier", |
|
"src": "4308:4:1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "div", |
|
"nodeType": "YulIdentifier", |
|
"src": "4290:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "4290:23:1" |
|
}, |
|
{ |
|
"kind": "number", |
|
"nodeType": "YulLiteral", |
|
"src": "4315:1:1", |
|
"type": "", |
|
"value": "1" |
|
} |
|
], |
|
"functionName": { |
|
"name": "add", |
|
"nodeType": "YulIdentifier", |
|
"src": "4286:3:1" |
|
}, |
|
"nodeType": "YulFunctionCall", |
|
"src": "4286:31:1" |
|
}, |
|
"variableNames": [ |
|
{ |
|
"name": "twos", |
|
"nodeType": "YulIdentifier", |
|
"src": "4278:4:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"evmVersion": "paris", |
|
"externalReferences": [ |
|
{ |
|
"declaration": 326, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4034:11:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 326, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4053:11:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 332, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4138:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 332, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4151:5:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 359, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4066:4:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 359, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4158:4:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 359, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4278:4:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 359, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4301:4:1", |
|
"valueSize": 1 |
|
}, |
|
{ |
|
"declaration": 359, |
|
"isOffset": false, |
|
"isSlot": false, |
|
"src": "4308:4:1", |
|
"valueSize": 1 |
|
} |
|
], |
|
"id": 368, |
|
"nodeType": "InlineAssembly", |
|
"src": "3960:371:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 373, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 369, |
|
"name": "prod0", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 332, |
|
"src": "4397:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "|=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 372, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 370, |
|
"name": "prod1", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 335, |
|
"src": "4406:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 371, |
|
"name": "twos", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 359, |
|
"src": "4414:4:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "4406:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "4397:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 374, |
|
"nodeType": "ExpressionStatement", |
|
"src": "4397:21:1" |
|
}, |
|
{ |
|
"assignments": [ |
|
376 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 376, |
|
"mutability": "mutable", |
|
"name": "inverse", |
|
"nameLocation": "4744:7:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 440, |
|
"src": "4736:15:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 375, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "4736:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 383, |
|
"initialValue": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 382, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 379, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "33", |
|
"id": 377, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "4755:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_3_by_1", |
|
"typeString": "int_const 3" |
|
}, |
|
"value": "3" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 378, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "4759:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "4755:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 380, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "4754:17:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "^", |
|
"rightExpression": { |
|
"hexValue": "32", |
|
"id": 381, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "4774:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "4754:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "4736:39:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 390, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 384, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "4992:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "*=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 389, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "32", |
|
"id": 385, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "5003:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "-", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 388, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 386, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "5007:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 387, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5021:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5007:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5003:25:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "4992:36:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 391, |
|
"nodeType": "ExpressionStatement", |
|
"src": "4992:36:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 398, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 392, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5061:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "*=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 397, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "32", |
|
"id": 393, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "5072:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "-", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 396, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 394, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "5076:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 395, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5090:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5076:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5072:25:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5061:36:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 399, |
|
"nodeType": "ExpressionStatement", |
|
"src": "5061:36:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 406, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 400, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5131:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "*=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 405, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "32", |
|
"id": 401, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "5142:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "-", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 404, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 402, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "5146:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 403, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5160:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5146:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5142:25:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5131:36:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 407, |
|
"nodeType": "ExpressionStatement", |
|
"src": "5131:36:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 414, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 408, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5201:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "*=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 413, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "32", |
|
"id": 409, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "5212:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "-", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 412, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 410, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "5216:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 411, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5230:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5216:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5212:25:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5201:36:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 415, |
|
"nodeType": "ExpressionStatement", |
|
"src": "5201:36:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 422, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 416, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5271:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "*=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 421, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "32", |
|
"id": 417, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "5282:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "-", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 420, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 418, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "5286:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 419, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5300:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5286:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5282:25:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5271:36:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 423, |
|
"nodeType": "ExpressionStatement", |
|
"src": "5271:36:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 430, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 424, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5342:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "*=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 429, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "32", |
|
"id": 425, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "5353:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "-", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 428, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 426, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 326, |
|
"src": "5357:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 427, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5371:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5357:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5353:25:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5342:36:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 431, |
|
"nodeType": "ExpressionStatement", |
|
"src": "5342:36:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 436, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 432, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 329, |
|
"src": "5812:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 435, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 433, |
|
"name": "prod0", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 332, |
|
"src": "5821:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 434, |
|
"name": "inverse", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 376, |
|
"src": "5829:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5821:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "5812:24:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 437, |
|
"nodeType": "ExpressionStatement", |
|
"src": "5812:24:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 438, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 329, |
|
"src": "5857:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 330, |
|
"id": 439, |
|
"nodeType": "Return", |
|
"src": "5850:13:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 320, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "1357:305:1", |
|
"text": " @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n with further edits by Uniswap Labs also under MIT license." |
|
}, |
|
"id": 442, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "mulDiv", |
|
"nameLocation": "1676:6:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 327, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 322, |
|
"mutability": "mutable", |
|
"name": "x", |
|
"nameLocation": "1691:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 442, |
|
"src": "1683:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 321, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1683:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 324, |
|
"mutability": "mutable", |
|
"name": "y", |
|
"nameLocation": "1702:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 442, |
|
"src": "1694:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 323, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1694:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 326, |
|
"mutability": "mutable", |
|
"name": "denominator", |
|
"nameLocation": "1713:11:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 442, |
|
"src": "1705:19:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 325, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1705:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1682:43:1" |
|
}, |
|
"returnParameters": { |
|
"id": 330, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 329, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "1757:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 442, |
|
"src": "1749:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 328, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1749:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1748:16:1" |
|
}, |
|
"scope": 1094, |
|
"src": "1667:4213:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 485, |
|
"nodeType": "Block", |
|
"src": "6122:189:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
458 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 458, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "6140:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 485, |
|
"src": "6132:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 457, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "6132:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 464, |
|
"initialValue": { |
|
"arguments": [ |
|
{ |
|
"id": 460, |
|
"name": "x", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 445, |
|
"src": "6156:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
{ |
|
"id": 461, |
|
"name": "y", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 447, |
|
"src": "6159:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
{ |
|
"id": 462, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 449, |
|
"src": "6162:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 459, |
|
"name": "mulDiv", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
442, |
|
486 |
|
], |
|
"referencedDeclaration": 442, |
|
"src": "6149:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 463, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "6149:25:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "6132:42:1" |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
"id": 476, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"id": 468, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 465, |
|
"name": "rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 452, |
|
"src": "6188:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"expression": { |
|
"id": 466, |
|
"name": "Rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 235, |
|
"src": "6200:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$", |
|
"typeString": "type(enum Math.Rounding)" |
|
} |
|
}, |
|
"id": 467, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"memberLocation": "6209:2:1", |
|
"memberName": "Up", |
|
"nodeType": "MemberAccess", |
|
"referencedDeclaration": 233, |
|
"src": "6200:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"src": "6188:23:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&&", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 475, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"arguments": [ |
|
{ |
|
"id": 470, |
|
"name": "x", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 445, |
|
"src": "6222:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
{ |
|
"id": 471, |
|
"name": "y", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 447, |
|
"src": "6225:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
{ |
|
"id": 472, |
|
"name": "denominator", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 449, |
|
"src": "6228:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 469, |
|
"name": "mulmod", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 4294967280, |
|
"src": "6215:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 473, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "6215:25:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 474, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "6243:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "6215:29:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"src": "6188:56:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 482, |
|
"nodeType": "IfStatement", |
|
"src": "6184:98:1", |
|
"trueBody": { |
|
"id": 481, |
|
"nodeType": "Block", |
|
"src": "6246:36:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 479, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 477, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 458, |
|
"src": "6260:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "31", |
|
"id": 478, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "6270:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "6260:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 480, |
|
"nodeType": "ExpressionStatement", |
|
"src": "6260:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"expression": { |
|
"id": 483, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 458, |
|
"src": "6298:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 456, |
|
"id": 484, |
|
"nodeType": "Return", |
|
"src": "6291:13:1" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 443, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "5886:121:1", |
|
"text": " @notice Calculates x * y / denominator with full precision, following the selected rounding direction." |
|
}, |
|
"id": 486, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "mulDiv", |
|
"nameLocation": "6021:6:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 453, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 445, |
|
"mutability": "mutable", |
|
"name": "x", |
|
"nameLocation": "6036:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 486, |
|
"src": "6028:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 444, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "6028:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 447, |
|
"mutability": "mutable", |
|
"name": "y", |
|
"nameLocation": "6047:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 486, |
|
"src": "6039:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 446, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "6039:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 449, |
|
"mutability": "mutable", |
|
"name": "denominator", |
|
"nameLocation": "6058:11:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 486, |
|
"src": "6050:19:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 448, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "6050:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 452, |
|
"mutability": "mutable", |
|
"name": "rounding", |
|
"nameLocation": "6080:8:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 486, |
|
"src": "6071:17:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"typeName": { |
|
"id": 451, |
|
"nodeType": "UserDefinedTypeName", |
|
"pathNode": { |
|
"id": 450, |
|
"name": "Rounding", |
|
"nameLocations": [ |
|
"6071:8:1" |
|
], |
|
"nodeType": "IdentifierPath", |
|
"referencedDeclaration": 235, |
|
"src": "6071:8:1" |
|
}, |
|
"referencedDeclaration": 235, |
|
"src": "6071:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "6027:62:1" |
|
}, |
|
"returnParameters": { |
|
"id": 456, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 455, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 486, |
|
"src": "6113:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 454, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "6113:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "6112:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "6012:299:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 597, |
|
"nodeType": "Block", |
|
"src": "6587:1585:1", |
|
"statements": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 496, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 494, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "6601:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 495, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "6606:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "6601:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 500, |
|
"nodeType": "IfStatement", |
|
"src": "6597:45:1", |
|
"trueBody": { |
|
"id": 499, |
|
"nodeType": "Block", |
|
"src": "6609:33:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"hexValue": "30", |
|
"id": 497, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "6630:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"functionReturnParameters": 493, |
|
"id": 498, |
|
"nodeType": "Return", |
|
"src": "6623:8:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"assignments": [ |
|
502 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 502, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "7329:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 597, |
|
"src": "7321:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 501, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "7321:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 511, |
|
"initialValue": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 510, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "31", |
|
"id": 503, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "7338:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<<", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 508, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"arguments": [ |
|
{ |
|
"id": 505, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "7349:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 504, |
|
"name": "log2", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
766, |
|
802 |
|
], |
|
"referencedDeclaration": 766, |
|
"src": "7344:4:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 506, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "7344:7:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 507, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "7355:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "7344:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 509, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "7343:14:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7338:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "7321:36:1" |
|
}, |
|
{ |
|
"id": 596, |
|
"nodeType": "UncheckedBlock", |
|
"src": "7758:408:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 521, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 512, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7782:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 520, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 517, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 513, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7792:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 516, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 514, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "7801:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 515, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7805:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7801:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7792:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 518, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "7791:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 519, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "7816:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "7791:26:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7782:35:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 522, |
|
"nodeType": "ExpressionStatement", |
|
"src": "7782:35:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 532, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 523, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7831:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 531, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 528, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 524, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7841:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 527, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 525, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "7850:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 526, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7854:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7850:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7841:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 529, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "7840:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 530, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "7865:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "7840:26:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7831:35:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 533, |
|
"nodeType": "ExpressionStatement", |
|
"src": "7831:35:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 543, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 534, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7880:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 542, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 539, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 535, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7890:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 538, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 536, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "7899:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 537, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7903:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7899:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7890:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 540, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "7889:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 541, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "7914:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "7889:26:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7880:35:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 544, |
|
"nodeType": "ExpressionStatement", |
|
"src": "7880:35:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 554, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 545, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7929:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 553, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 550, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 546, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7939:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 549, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 547, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "7948:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 548, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7952:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7948:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7939:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 551, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "7938:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 552, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "7963:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "7938:26:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7929:35:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 555, |
|
"nodeType": "ExpressionStatement", |
|
"src": "7929:35:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 565, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 556, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7978:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 564, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 561, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 557, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "7988:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 560, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 558, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "7997:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 559, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8001:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7997:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7988:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 562, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "7987:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 563, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8012:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "7987:26:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "7978:35:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 566, |
|
"nodeType": "ExpressionStatement", |
|
"src": "7978:35:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 576, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 567, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8027:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 575, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 572, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 568, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8037:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 571, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 569, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "8046:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 570, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8050:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8046:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8037:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 573, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "8036:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 574, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8061:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "8036:26:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8027:35:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 577, |
|
"nodeType": "ExpressionStatement", |
|
"src": "8027:35:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 587, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 578, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8076:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 586, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 583, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 579, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8086:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 582, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 580, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "8095:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 581, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8099:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8095:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8086:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 584, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "8085:21:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 585, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8110:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "8085:26:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8076:35:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 588, |
|
"nodeType": "ExpressionStatement", |
|
"src": "8076:35:1" |
|
}, |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"id": 590, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8136:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 593, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 591, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 489, |
|
"src": "8144:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "/", |
|
"rightExpression": { |
|
"id": 592, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 502, |
|
"src": "8148:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8144:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 589, |
|
"name": "min", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 271, |
|
"src": "8132:3:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256,uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 594, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "8132:23:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 493, |
|
"id": 595, |
|
"nodeType": "Return", |
|
"src": "8125:30:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 487, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "6317:208:1", |
|
"text": " @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11)." |
|
}, |
|
"id": 598, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "sqrt", |
|
"nameLocation": "6539:4:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 490, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 489, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "6552:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 598, |
|
"src": "6544:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 488, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "6544:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "6543:11:1" |
|
}, |
|
"returnParameters": { |
|
"id": 493, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 492, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 598, |
|
"src": "6578:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 491, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "6578:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "6577:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "6530:1642:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 633, |
|
"nodeType": "Block", |
|
"src": "8348:161:1", |
|
"statements": [ |
|
{ |
|
"id": 632, |
|
"nodeType": "UncheckedBlock", |
|
"src": "8358:145:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
610 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 610, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "8390:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 632, |
|
"src": "8382:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 609, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "8382:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 614, |
|
"initialValue": { |
|
"arguments": [ |
|
{ |
|
"id": 612, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 601, |
|
"src": "8404:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 611, |
|
"name": "sqrt", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
598, |
|
634 |
|
], |
|
"referencedDeclaration": 598, |
|
"src": "8399:4:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 613, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "8399:7:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "8382:24:1" |
|
}, |
|
{ |
|
"expression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 630, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 615, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 610, |
|
"src": "8427:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
"id": 625, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"id": 619, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 616, |
|
"name": "rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 604, |
|
"src": "8437:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"expression": { |
|
"id": 617, |
|
"name": "Rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 235, |
|
"src": "8449:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$", |
|
"typeString": "type(enum Math.Rounding)" |
|
} |
|
}, |
|
"id": 618, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"memberLocation": "8458:2:1", |
|
"memberName": "Up", |
|
"nodeType": "MemberAccess", |
|
"referencedDeclaration": 233, |
|
"src": "8449:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"src": "8437:23:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&&", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 624, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 622, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 620, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 610, |
|
"src": "8464:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "*", |
|
"rightExpression": { |
|
"id": 621, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 610, |
|
"src": "8473:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8464:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<", |
|
"rightExpression": { |
|
"id": 623, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 601, |
|
"src": "8482:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "8464:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"src": "8437:46:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"hexValue": "30", |
|
"id": 627, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8490:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"id": 628, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "8437:54:1", |
|
"trueExpression": { |
|
"hexValue": "31", |
|
"id": 626, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8486:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
} |
|
], |
|
"id": 629, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "8436:56:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
}, |
|
"src": "8427:65:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 608, |
|
"id": 631, |
|
"nodeType": "Return", |
|
"src": "8420:72:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 599, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "8178:89:1", |
|
"text": " @notice Calculates sqrt(a), following the selected rounding direction." |
|
}, |
|
"id": 634, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "sqrt", |
|
"nameLocation": "8281:4:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 605, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 601, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "8294:1:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 634, |
|
"src": "8286:9:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 600, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "8286:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 604, |
|
"mutability": "mutable", |
|
"name": "rounding", |
|
"nameLocation": "8306:8:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 634, |
|
"src": "8297:17:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"typeName": { |
|
"id": 603, |
|
"nodeType": "UserDefinedTypeName", |
|
"pathNode": { |
|
"id": 602, |
|
"name": "Rounding", |
|
"nameLocations": [ |
|
"8297:8:1" |
|
], |
|
"nodeType": "IdentifierPath", |
|
"referencedDeclaration": 235, |
|
"src": "8297:8:1" |
|
}, |
|
"referencedDeclaration": 235, |
|
"src": "8297:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "8285:30:1" |
|
}, |
|
"returnParameters": { |
|
"id": 608, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 607, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 634, |
|
"src": "8339:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 606, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "8339:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "8338:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "8272:237:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 765, |
|
"nodeType": "Block", |
|
"src": "8694:922:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
643 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 643, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "8712:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 765, |
|
"src": "8704:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 642, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "8704:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 645, |
|
"initialValue": { |
|
"hexValue": "30", |
|
"id": 644, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8721:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "8704:18:1" |
|
}, |
|
{ |
|
"id": 762, |
|
"nodeType": "UncheckedBlock", |
|
"src": "8732:855:1", |
|
"statements": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 650, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 648, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 646, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "8760:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "313238", |
|
"id": 647, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8769:3:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_128_by_1", |
|
"typeString": "int_const 128" |
|
}, |
|
"value": "128" |
|
}, |
|
"src": "8760:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 649, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8775:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "8760:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 660, |
|
"nodeType": "IfStatement", |
|
"src": "8756:99:1", |
|
"trueBody": { |
|
"id": 659, |
|
"nodeType": "Block", |
|
"src": "8778:77:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 653, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 651, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "8796:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "313238", |
|
"id": 652, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8806:3:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_128_by_1", |
|
"typeString": "int_const 128" |
|
}, |
|
"value": "128" |
|
}, |
|
"src": "8796:13:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 654, |
|
"nodeType": "ExpressionStatement", |
|
"src": "8796:13:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 657, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 655, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "8827:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "313238", |
|
"id": 656, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8837:3:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_128_by_1", |
|
"typeString": "int_const 128" |
|
}, |
|
"value": "128" |
|
}, |
|
"src": "8827:13:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 658, |
|
"nodeType": "ExpressionStatement", |
|
"src": "8827:13:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 665, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 663, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 661, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "8872:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "3634", |
|
"id": 662, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8881:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_64_by_1", |
|
"typeString": "int_const 64" |
|
}, |
|
"value": "64" |
|
}, |
|
"src": "8872:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 664, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8886:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "8872:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 675, |
|
"nodeType": "IfStatement", |
|
"src": "8868:96:1", |
|
"trueBody": { |
|
"id": 674, |
|
"nodeType": "Block", |
|
"src": "8889:75:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 668, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 666, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "8907:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "3634", |
|
"id": 667, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8917:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_64_by_1", |
|
"typeString": "int_const 64" |
|
}, |
|
"value": "64" |
|
}, |
|
"src": "8907:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 669, |
|
"nodeType": "ExpressionStatement", |
|
"src": "8907:12:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 672, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 670, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "8937:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "3634", |
|
"id": 671, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8947:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_64_by_1", |
|
"typeString": "int_const 64" |
|
}, |
|
"value": "64" |
|
}, |
|
"src": "8937:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 673, |
|
"nodeType": "ExpressionStatement", |
|
"src": "8937:12:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 680, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 678, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 676, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "8981:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "3332", |
|
"id": 677, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8990:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_32_by_1", |
|
"typeString": "int_const 32" |
|
}, |
|
"value": "32" |
|
}, |
|
"src": "8981:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 679, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "8995:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "8981:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 690, |
|
"nodeType": "IfStatement", |
|
"src": "8977:96:1", |
|
"trueBody": { |
|
"id": 689, |
|
"nodeType": "Block", |
|
"src": "8998:75:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 683, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 681, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9016:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "3332", |
|
"id": 682, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9026:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_32_by_1", |
|
"typeString": "int_const 32" |
|
}, |
|
"value": "32" |
|
}, |
|
"src": "9016:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 684, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9016:12:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 687, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 685, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "9046:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "3332", |
|
"id": 686, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9056:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_32_by_1", |
|
"typeString": "int_const 32" |
|
}, |
|
"value": "32" |
|
}, |
|
"src": "9046:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 688, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9046:12:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 695, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 693, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 691, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9090:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "3136", |
|
"id": 692, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9099:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "9090:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 694, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9104:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "9090:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 705, |
|
"nodeType": "IfStatement", |
|
"src": "9086:96:1", |
|
"trueBody": { |
|
"id": 704, |
|
"nodeType": "Block", |
|
"src": "9107:75:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 698, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 696, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9125:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "3136", |
|
"id": 697, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9135:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "9125:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 699, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9125:12:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 702, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 700, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "9155:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "3136", |
|
"id": 701, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9165:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "9155:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 703, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9155:12:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 710, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 708, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 706, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9199:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "38", |
|
"id": 707, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9208:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_8_by_1", |
|
"typeString": "int_const 8" |
|
}, |
|
"value": "8" |
|
}, |
|
"src": "9199:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 709, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9212:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "9199:14:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 720, |
|
"nodeType": "IfStatement", |
|
"src": "9195:93:1", |
|
"trueBody": { |
|
"id": 719, |
|
"nodeType": "Block", |
|
"src": "9215:73:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 713, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 711, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9233:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "38", |
|
"id": 712, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9243:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_8_by_1", |
|
"typeString": "int_const 8" |
|
}, |
|
"value": "8" |
|
}, |
|
"src": "9233:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 714, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9233:11:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 717, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 715, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "9262:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "38", |
|
"id": 716, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9272:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_8_by_1", |
|
"typeString": "int_const 8" |
|
}, |
|
"value": "8" |
|
}, |
|
"src": "9262:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 718, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9262:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 725, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 723, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 721, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9305:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "34", |
|
"id": 722, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9314:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_4_by_1", |
|
"typeString": "int_const 4" |
|
}, |
|
"value": "4" |
|
}, |
|
"src": "9305:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 724, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9318:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "9305:14:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 735, |
|
"nodeType": "IfStatement", |
|
"src": "9301:93:1", |
|
"trueBody": { |
|
"id": 734, |
|
"nodeType": "Block", |
|
"src": "9321:73:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 728, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 726, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9339:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "34", |
|
"id": 727, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9349:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_4_by_1", |
|
"typeString": "int_const 4" |
|
}, |
|
"value": "4" |
|
}, |
|
"src": "9339:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 729, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9339:11:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 732, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 730, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "9368:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "34", |
|
"id": 731, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9378:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_4_by_1", |
|
"typeString": "int_const 4" |
|
}, |
|
"value": "4" |
|
}, |
|
"src": "9368:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 733, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9368:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 740, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 738, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 736, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9411:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "32", |
|
"id": 737, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9420:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "9411:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 739, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9424:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "9411:14:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 750, |
|
"nodeType": "IfStatement", |
|
"src": "9407:93:1", |
|
"trueBody": { |
|
"id": 749, |
|
"nodeType": "Block", |
|
"src": "9427:73:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 743, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 741, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9445:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "32", |
|
"id": 742, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9455:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "9445:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 744, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9445:11:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 747, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 745, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "9474:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "32", |
|
"id": 746, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9484:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "9474:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 748, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9474:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 755, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 753, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 751, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 637, |
|
"src": "9517:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 752, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9526:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "9517:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 754, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9530:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "9517:14:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 761, |
|
"nodeType": "IfStatement", |
|
"src": "9513:64:1", |
|
"trueBody": { |
|
"id": 760, |
|
"nodeType": "Block", |
|
"src": "9533:44:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 758, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 756, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "9551:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "31", |
|
"id": 757, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9561:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "9551:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 759, |
|
"nodeType": "ExpressionStatement", |
|
"src": "9551:11:1" |
|
} |
|
] |
|
} |
|
} |
|
] |
|
}, |
|
{ |
|
"expression": { |
|
"id": 763, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 643, |
|
"src": "9603:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 641, |
|
"id": 764, |
|
"nodeType": "Return", |
|
"src": "9596:13:1" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 635, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "8515:113:1", |
|
"text": " @dev Return the log in base 2, rounded down, of a positive value.\n Returns 0 if given 0." |
|
}, |
|
"id": 766, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "log2", |
|
"nameLocation": "8642:4:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 638, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 637, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "8655:5:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 766, |
|
"src": "8647:13:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 636, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "8647:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "8646:15:1" |
|
}, |
|
"returnParameters": { |
|
"id": 641, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 640, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 766, |
|
"src": "8685:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 639, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "8685:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "8684:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "8633:983:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 801, |
|
"nodeType": "Block", |
|
"src": "9849:165:1", |
|
"statements": [ |
|
{ |
|
"id": 800, |
|
"nodeType": "UncheckedBlock", |
|
"src": "9859:149:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
778 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 778, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "9891:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 800, |
|
"src": "9883:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 777, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "9883:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 782, |
|
"initialValue": { |
|
"arguments": [ |
|
{ |
|
"id": 780, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 769, |
|
"src": "9905:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 779, |
|
"name": "log2", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
766, |
|
802 |
|
], |
|
"referencedDeclaration": 766, |
|
"src": "9900:4:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 781, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "9900:11:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "9883:28:1" |
|
}, |
|
{ |
|
"expression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 798, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 783, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 778, |
|
"src": "9932:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
"id": 793, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"id": 787, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 784, |
|
"name": "rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 772, |
|
"src": "9942:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"expression": { |
|
"id": 785, |
|
"name": "Rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 235, |
|
"src": "9954:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$", |
|
"typeString": "type(enum Math.Rounding)" |
|
} |
|
}, |
|
"id": 786, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"memberLocation": "9963:2:1", |
|
"memberName": "Up", |
|
"nodeType": "MemberAccess", |
|
"referencedDeclaration": 233, |
|
"src": "9954:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"src": "9942:23:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&&", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 792, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 790, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "31", |
|
"id": 788, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9969:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<<", |
|
"rightExpression": { |
|
"id": 789, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 778, |
|
"src": "9974:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "9969:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<", |
|
"rightExpression": { |
|
"id": 791, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 769, |
|
"src": "9983:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "9969:19:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"src": "9942:46:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"hexValue": "30", |
|
"id": 795, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9995:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"id": 796, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "9942:54:1", |
|
"trueExpression": { |
|
"hexValue": "31", |
|
"id": 794, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "9991:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
} |
|
], |
|
"id": 797, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "9941:56:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
}, |
|
"src": "9932:65:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 776, |
|
"id": 799, |
|
"nodeType": "Return", |
|
"src": "9925:72:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 767, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "9622:142:1", |
|
"text": " @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." |
|
}, |
|
"id": 802, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "log2", |
|
"nameLocation": "9778:4:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 773, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 769, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "9791:5:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 802, |
|
"src": "9783:13:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 768, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "9783:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 772, |
|
"mutability": "mutable", |
|
"name": "rounding", |
|
"nameLocation": "9807:8:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 802, |
|
"src": "9798:17:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"typeName": { |
|
"id": 771, |
|
"nodeType": "UserDefinedTypeName", |
|
"pathNode": { |
|
"id": 770, |
|
"name": "Rounding", |
|
"nameLocations": [ |
|
"9798:8:1" |
|
], |
|
"nodeType": "IdentifierPath", |
|
"referencedDeclaration": 235, |
|
"src": "9798:8:1" |
|
}, |
|
"referencedDeclaration": 235, |
|
"src": "9798:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "9782:34:1" |
|
}, |
|
"returnParameters": { |
|
"id": 776, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 775, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 802, |
|
"src": "9840:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 774, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "9840:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "9839:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "9769:245:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 930, |
|
"nodeType": "Block", |
|
"src": "10201:854:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
811 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 811, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "10219:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 930, |
|
"src": "10211:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 810, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "10211:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 813, |
|
"initialValue": { |
|
"hexValue": "30", |
|
"id": 812, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10228:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "10211:18:1" |
|
}, |
|
{ |
|
"id": 927, |
|
"nodeType": "UncheckedBlock", |
|
"src": "10239:787:1", |
|
"statements": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 818, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 814, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10267:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">=", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", |
|
"typeString": "int_const 1000...(57 digits omitted)...0000" |
|
}, |
|
"id": 817, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 815, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10276:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "3634", |
|
"id": 816, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10282:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_64_by_1", |
|
"typeString": "int_const 64" |
|
}, |
|
"value": "64" |
|
}, |
|
"src": "10276:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", |
|
"typeString": "int_const 1000...(57 digits omitted)...0000" |
|
} |
|
}, |
|
"src": "10267:17:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 830, |
|
"nodeType": "IfStatement", |
|
"src": "10263:103:1", |
|
"trueBody": { |
|
"id": 829, |
|
"nodeType": "Block", |
|
"src": "10286:80:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 823, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 819, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10304:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "/=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", |
|
"typeString": "int_const 1000...(57 digits omitted)...0000" |
|
}, |
|
"id": 822, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 820, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10313:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "3634", |
|
"id": 821, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10319:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_64_by_1", |
|
"typeString": "int_const 64" |
|
}, |
|
"value": "64" |
|
}, |
|
"src": "10313:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", |
|
"typeString": "int_const 1000...(57 digits omitted)...0000" |
|
} |
|
}, |
|
"src": "10304:17:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 824, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10304:17:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 827, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 825, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 811, |
|
"src": "10339:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "3634", |
|
"id": 826, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10349:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_64_by_1", |
|
"typeString": "int_const 64" |
|
}, |
|
"value": "64" |
|
}, |
|
"src": "10339:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 828, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10339:12:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 835, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 831, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10383:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">=", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", |
|
"typeString": "int_const 1000...(25 digits omitted)...0000" |
|
}, |
|
"id": 834, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 832, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10392:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "3332", |
|
"id": 833, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10398:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_32_by_1", |
|
"typeString": "int_const 32" |
|
}, |
|
"value": "32" |
|
}, |
|
"src": "10392:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", |
|
"typeString": "int_const 1000...(25 digits omitted)...0000" |
|
} |
|
}, |
|
"src": "10383:17:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 847, |
|
"nodeType": "IfStatement", |
|
"src": "10379:103:1", |
|
"trueBody": { |
|
"id": 846, |
|
"nodeType": "Block", |
|
"src": "10402:80:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 840, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 836, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10420:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "/=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", |
|
"typeString": "int_const 1000...(25 digits omitted)...0000" |
|
}, |
|
"id": 839, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 837, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10429:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "3332", |
|
"id": 838, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10435:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_32_by_1", |
|
"typeString": "int_const 32" |
|
}, |
|
"value": "32" |
|
}, |
|
"src": "10429:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", |
|
"typeString": "int_const 1000...(25 digits omitted)...0000" |
|
} |
|
}, |
|
"src": "10420:17:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 841, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10420:17:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 844, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 842, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 811, |
|
"src": "10455:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "3332", |
|
"id": 843, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10465:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_32_by_1", |
|
"typeString": "int_const 32" |
|
}, |
|
"value": "32" |
|
}, |
|
"src": "10455:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 845, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10455:12:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 852, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 848, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10499:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">=", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_10000000000000000_by_1", |
|
"typeString": "int_const 10000000000000000" |
|
}, |
|
"id": 851, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 849, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10508:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "3136", |
|
"id": 850, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10514:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "10508:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10000000000000000_by_1", |
|
"typeString": "int_const 10000000000000000" |
|
} |
|
}, |
|
"src": "10499:17:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 864, |
|
"nodeType": "IfStatement", |
|
"src": "10495:103:1", |
|
"trueBody": { |
|
"id": 863, |
|
"nodeType": "Block", |
|
"src": "10518:80:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 857, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 853, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10536:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "/=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_10000000000000000_by_1", |
|
"typeString": "int_const 10000000000000000" |
|
}, |
|
"id": 856, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 854, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10545:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "3136", |
|
"id": 855, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10551:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "10545:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10000000000000000_by_1", |
|
"typeString": "int_const 10000000000000000" |
|
} |
|
}, |
|
"src": "10536:17:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 858, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10536:17:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 861, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 859, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 811, |
|
"src": "10571:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "3136", |
|
"id": 860, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10581:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "10571:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 862, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10571:12:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 869, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 865, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10615:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">=", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_100000000_by_1", |
|
"typeString": "int_const 100000000" |
|
}, |
|
"id": 868, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 866, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10624:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "38", |
|
"id": 867, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10630:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_8_by_1", |
|
"typeString": "int_const 8" |
|
}, |
|
"value": "8" |
|
}, |
|
"src": "10624:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_100000000_by_1", |
|
"typeString": "int_const 100000000" |
|
} |
|
}, |
|
"src": "10615:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 881, |
|
"nodeType": "IfStatement", |
|
"src": "10611:100:1", |
|
"trueBody": { |
|
"id": 880, |
|
"nodeType": "Block", |
|
"src": "10633:78:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 874, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 870, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10651:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "/=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_100000000_by_1", |
|
"typeString": "int_const 100000000" |
|
}, |
|
"id": 873, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 871, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10660:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "38", |
|
"id": 872, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10666:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_8_by_1", |
|
"typeString": "int_const 8" |
|
}, |
|
"value": "8" |
|
}, |
|
"src": "10660:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_100000000_by_1", |
|
"typeString": "int_const 100000000" |
|
} |
|
}, |
|
"src": "10651:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 875, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10651:16:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 878, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 876, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 811, |
|
"src": "10685:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "38", |
|
"id": 877, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10695:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_8_by_1", |
|
"typeString": "int_const 8" |
|
}, |
|
"value": "8" |
|
}, |
|
"src": "10685:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 879, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10685:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 886, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 882, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10728:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">=", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_10000_by_1", |
|
"typeString": "int_const 10000" |
|
}, |
|
"id": 885, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 883, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10737:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "34", |
|
"id": 884, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10743:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_4_by_1", |
|
"typeString": "int_const 4" |
|
}, |
|
"value": "4" |
|
}, |
|
"src": "10737:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10000_by_1", |
|
"typeString": "int_const 10000" |
|
} |
|
}, |
|
"src": "10728:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 898, |
|
"nodeType": "IfStatement", |
|
"src": "10724:100:1", |
|
"trueBody": { |
|
"id": 897, |
|
"nodeType": "Block", |
|
"src": "10746:78:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 891, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 887, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10764:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "/=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_10000_by_1", |
|
"typeString": "int_const 10000" |
|
}, |
|
"id": 890, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 888, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10773:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "34", |
|
"id": 889, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10779:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_4_by_1", |
|
"typeString": "int_const 4" |
|
}, |
|
"value": "4" |
|
}, |
|
"src": "10773:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10000_by_1", |
|
"typeString": "int_const 10000" |
|
} |
|
}, |
|
"src": "10764:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 892, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10764:16:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 895, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 893, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 811, |
|
"src": "10798:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "34", |
|
"id": 894, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10808:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_4_by_1", |
|
"typeString": "int_const 4" |
|
}, |
|
"value": "4" |
|
}, |
|
"src": "10798:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 896, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10798:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 903, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 899, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10841:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">=", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_100_by_1", |
|
"typeString": "int_const 100" |
|
}, |
|
"id": 902, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 900, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10850:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "32", |
|
"id": 901, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10856:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "10850:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_100_by_1", |
|
"typeString": "int_const 100" |
|
} |
|
}, |
|
"src": "10841:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 915, |
|
"nodeType": "IfStatement", |
|
"src": "10837:100:1", |
|
"trueBody": { |
|
"id": 914, |
|
"nodeType": "Block", |
|
"src": "10859:78:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 908, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 904, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10877:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "/=", |
|
"rightHandSide": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_100_by_1", |
|
"typeString": "int_const 100" |
|
}, |
|
"id": 907, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 905, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10886:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "32", |
|
"id": 906, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10892:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "10886:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_100_by_1", |
|
"typeString": "int_const 100" |
|
} |
|
}, |
|
"src": "10877:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 909, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10877:16:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 912, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 910, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 811, |
|
"src": "10911:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "32", |
|
"id": 911, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10921:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "10911:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 913, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10911:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 920, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 916, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 805, |
|
"src": "10954:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">=", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"id": 919, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 917, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10963:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 918, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "10969:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "10963:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
} |
|
}, |
|
"src": "10954:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 926, |
|
"nodeType": "IfStatement", |
|
"src": "10950:66:1", |
|
"trueBody": { |
|
"id": 925, |
|
"nodeType": "Block", |
|
"src": "10972:44:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 923, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 921, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 811, |
|
"src": "10990:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "31", |
|
"id": 922, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11000:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "10990:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 924, |
|
"nodeType": "ExpressionStatement", |
|
"src": "10990:11:1" |
|
} |
|
] |
|
} |
|
} |
|
] |
|
}, |
|
{ |
|
"expression": { |
|
"id": 928, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 811, |
|
"src": "11042:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 809, |
|
"id": 929, |
|
"nodeType": "Return", |
|
"src": "11035:13:1" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 803, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "10020:114:1", |
|
"text": " @dev Return the log in base 10, rounded down, of a positive value.\n Returns 0 if given 0." |
|
}, |
|
"id": 931, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "log10", |
|
"nameLocation": "10148:5:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 806, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 805, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "10162:5:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 931, |
|
"src": "10154:13:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 804, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "10154:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "10153:15:1" |
|
}, |
|
"returnParameters": { |
|
"id": 809, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 808, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 931, |
|
"src": "10192:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 807, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "10192:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "10191:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "10139:916:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 966, |
|
"nodeType": "Block", |
|
"src": "11290:167:1", |
|
"statements": [ |
|
{ |
|
"id": 965, |
|
"nodeType": "UncheckedBlock", |
|
"src": "11300:151:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
943 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 943, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "11332:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 965, |
|
"src": "11324:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 942, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "11324:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 947, |
|
"initialValue": { |
|
"arguments": [ |
|
{ |
|
"id": 945, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 934, |
|
"src": "11347:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 944, |
|
"name": "log10", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
931, |
|
967 |
|
], |
|
"referencedDeclaration": 931, |
|
"src": "11341:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 946, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "11341:12:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "11324:29:1" |
|
}, |
|
{ |
|
"expression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 963, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 948, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 943, |
|
"src": "11374:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
"id": 958, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"id": 952, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 949, |
|
"name": "rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 937, |
|
"src": "11384:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"expression": { |
|
"id": 950, |
|
"name": "Rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 235, |
|
"src": "11396:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$", |
|
"typeString": "type(enum Math.Rounding)" |
|
} |
|
}, |
|
"id": 951, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"memberLocation": "11405:2:1", |
|
"memberName": "Up", |
|
"nodeType": "MemberAccess", |
|
"referencedDeclaration": 233, |
|
"src": "11396:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"src": "11384:23:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&&", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 957, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 955, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "3130", |
|
"id": 953, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11411:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_10_by_1", |
|
"typeString": "int_const 10" |
|
}, |
|
"value": "10" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "**", |
|
"rightExpression": { |
|
"id": 954, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 943, |
|
"src": "11417:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "11411:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<", |
|
"rightExpression": { |
|
"id": 956, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 934, |
|
"src": "11426:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "11411:20:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"src": "11384:47:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"hexValue": "30", |
|
"id": 960, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11438:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"id": 961, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "11384:55:1", |
|
"trueExpression": { |
|
"hexValue": "31", |
|
"id": 959, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11434:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
} |
|
], |
|
"id": 962, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "11383:57:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
}, |
|
"src": "11374:66:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 941, |
|
"id": 964, |
|
"nodeType": "Return", |
|
"src": "11367:73:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 932, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "11061:143:1", |
|
"text": " @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." |
|
}, |
|
"id": 967, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "log10", |
|
"nameLocation": "11218:5:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 938, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 934, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "11232:5:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 967, |
|
"src": "11224:13:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 933, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "11224:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 937, |
|
"mutability": "mutable", |
|
"name": "rounding", |
|
"nameLocation": "11248:8:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 967, |
|
"src": "11239:17:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"typeName": { |
|
"id": 936, |
|
"nodeType": "UserDefinedTypeName", |
|
"pathNode": { |
|
"id": 935, |
|
"name": "Rounding", |
|
"nameLocations": [ |
|
"11239:8:1" |
|
], |
|
"nodeType": "IdentifierPath", |
|
"referencedDeclaration": 235, |
|
"src": "11239:8:1" |
|
}, |
|
"referencedDeclaration": 235, |
|
"src": "11239:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "11223:34:1" |
|
}, |
|
"returnParameters": { |
|
"id": 941, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 940, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 967, |
|
"src": "11281:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 939, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "11281:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "11280:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "11209:248:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 1053, |
|
"nodeType": "Block", |
|
"src": "11771:600:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
976 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 976, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "11789:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1053, |
|
"src": "11781:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 975, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "11781:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 978, |
|
"initialValue": { |
|
"hexValue": "30", |
|
"id": 977, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11798:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "11781:18:1" |
|
}, |
|
{ |
|
"id": 1050, |
|
"nodeType": "UncheckedBlock", |
|
"src": "11809:533:1", |
|
"statements": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 983, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 981, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 979, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "11837:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "313238", |
|
"id": 980, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11846:3:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_128_by_1", |
|
"typeString": "int_const 128" |
|
}, |
|
"value": "128" |
|
}, |
|
"src": "11837:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 982, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11852:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "11837:16:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 993, |
|
"nodeType": "IfStatement", |
|
"src": "11833:98:1", |
|
"trueBody": { |
|
"id": 992, |
|
"nodeType": "Block", |
|
"src": "11855:76:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 986, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 984, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "11873:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "313238", |
|
"id": 985, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11883:3:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_128_by_1", |
|
"typeString": "int_const 128" |
|
}, |
|
"value": "128" |
|
}, |
|
"src": "11873:13:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 987, |
|
"nodeType": "ExpressionStatement", |
|
"src": "11873:13:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 990, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 988, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 976, |
|
"src": "11904:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "3136", |
|
"id": 989, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11914:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "11904:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 991, |
|
"nodeType": "ExpressionStatement", |
|
"src": "11904:12:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 998, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 996, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 994, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "11948:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "3634", |
|
"id": 995, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11957:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_64_by_1", |
|
"typeString": "int_const 64" |
|
}, |
|
"value": "64" |
|
}, |
|
"src": "11948:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 997, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11962:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "11948:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 1008, |
|
"nodeType": "IfStatement", |
|
"src": "11944:95:1", |
|
"trueBody": { |
|
"id": 1007, |
|
"nodeType": "Block", |
|
"src": "11965:74:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 1001, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 999, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "11983:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "3634", |
|
"id": 1000, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "11993:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_64_by_1", |
|
"typeString": "int_const 64" |
|
}, |
|
"value": "64" |
|
}, |
|
"src": "11983:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 1002, |
|
"nodeType": "ExpressionStatement", |
|
"src": "11983:12:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 1005, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 1003, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 976, |
|
"src": "12013:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "38", |
|
"id": 1004, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12023:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_8_by_1", |
|
"typeString": "int_const 8" |
|
}, |
|
"value": "8" |
|
}, |
|
"src": "12013:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 1006, |
|
"nodeType": "ExpressionStatement", |
|
"src": "12013:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1013, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1011, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1009, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "12056:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "3332", |
|
"id": 1010, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12065:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_32_by_1", |
|
"typeString": "int_const 32" |
|
}, |
|
"value": "32" |
|
}, |
|
"src": "12056:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 1012, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12070:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "12056:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 1023, |
|
"nodeType": "IfStatement", |
|
"src": "12052:95:1", |
|
"trueBody": { |
|
"id": 1022, |
|
"nodeType": "Block", |
|
"src": "12073:74:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 1016, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 1014, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "12091:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "3332", |
|
"id": 1015, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12101:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_32_by_1", |
|
"typeString": "int_const 32" |
|
}, |
|
"value": "32" |
|
}, |
|
"src": "12091:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 1017, |
|
"nodeType": "ExpressionStatement", |
|
"src": "12091:12:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 1020, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 1018, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 976, |
|
"src": "12121:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "34", |
|
"id": 1019, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12131:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_4_by_1", |
|
"typeString": "int_const 4" |
|
}, |
|
"value": "4" |
|
}, |
|
"src": "12121:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 1021, |
|
"nodeType": "ExpressionStatement", |
|
"src": "12121:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1028, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1026, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1024, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "12164:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "3136", |
|
"id": 1025, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12173:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "12164:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 1027, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12178:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "12164:15:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 1038, |
|
"nodeType": "IfStatement", |
|
"src": "12160:95:1", |
|
"trueBody": { |
|
"id": 1037, |
|
"nodeType": "Block", |
|
"src": "12181:74:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 1031, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 1029, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "12199:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": ">>=", |
|
"rightHandSide": { |
|
"hexValue": "3136", |
|
"id": 1030, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12209:2:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_16_by_1", |
|
"typeString": "int_const 16" |
|
}, |
|
"value": "16" |
|
}, |
|
"src": "12199:12:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 1032, |
|
"nodeType": "ExpressionStatement", |
|
"src": "12199:12:1" |
|
}, |
|
{ |
|
"expression": { |
|
"id": 1035, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 1033, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 976, |
|
"src": "12229:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "32", |
|
"id": 1034, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12239:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_2_by_1", |
|
"typeString": "int_const 2" |
|
}, |
|
"value": "2" |
|
}, |
|
"src": "12229:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 1036, |
|
"nodeType": "ExpressionStatement", |
|
"src": "12229:11:1" |
|
} |
|
] |
|
} |
|
}, |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1043, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1041, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1039, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 970, |
|
"src": "12272:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "38", |
|
"id": 1040, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12281:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_8_by_1", |
|
"typeString": "int_const 8" |
|
}, |
|
"value": "8" |
|
}, |
|
"src": "12272:10:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 1042, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12285:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "12272:14:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"id": 1049, |
|
"nodeType": "IfStatement", |
|
"src": "12268:64:1", |
|
"trueBody": { |
|
"id": 1048, |
|
"nodeType": "Block", |
|
"src": "12288:44:1", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"id": 1046, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftHandSide": { |
|
"id": 1044, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 976, |
|
"src": "12306:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "Assignment", |
|
"operator": "+=", |
|
"rightHandSide": { |
|
"hexValue": "31", |
|
"id": 1045, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12316:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "12306:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"id": 1047, |
|
"nodeType": "ExpressionStatement", |
|
"src": "12306:11:1" |
|
} |
|
] |
|
} |
|
} |
|
] |
|
}, |
|
{ |
|
"expression": { |
|
"id": 1051, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 976, |
|
"src": "12358:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 974, |
|
"id": 1052, |
|
"nodeType": "Return", |
|
"src": "12351:13:1" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 968, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "11463:240:1", |
|
"text": " @dev Return the log in base 256, rounded down, of a positive value.\n Returns 0 if given 0.\n Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string." |
|
}, |
|
"id": 1054, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "log256", |
|
"nameLocation": "11717:6:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 971, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 970, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "11732:5:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1054, |
|
"src": "11724:13:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 969, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "11724:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "11723:15:1" |
|
}, |
|
"returnParameters": { |
|
"id": 974, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 973, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1054, |
|
"src": "11762:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 972, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "11762:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "11761:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "11708:663:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 1092, |
|
"nodeType": "Block", |
|
"src": "12608:174:1", |
|
"statements": [ |
|
{ |
|
"id": 1091, |
|
"nodeType": "UncheckedBlock", |
|
"src": "12618:158:1", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
1066 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 1066, |
|
"mutability": "mutable", |
|
"name": "result", |
|
"nameLocation": "12650:6:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1091, |
|
"src": "12642:14:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 1065, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "12642:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 1070, |
|
"initialValue": { |
|
"arguments": [ |
|
{ |
|
"id": 1068, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1057, |
|
"src": "12666:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 1067, |
|
"name": "log256", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [ |
|
1054, |
|
1093 |
|
], |
|
"referencedDeclaration": 1054, |
|
"src": "12659:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", |
|
"typeString": "function (uint256) pure returns (uint256)" |
|
} |
|
}, |
|
"id": 1069, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "functionCall", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "12659:13:1", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "12642:30:1" |
|
}, |
|
{ |
|
"expression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1089, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1071, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1066, |
|
"src": "12693:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
}, |
|
"id": 1084, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"id": 1075, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1072, |
|
"name": "rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1060, |
|
"src": "12703:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "==", |
|
"rightExpression": { |
|
"expression": { |
|
"id": 1073, |
|
"name": "Rounding", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 235, |
|
"src": "12715:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$235_$", |
|
"typeString": "type(enum Math.Rounding)" |
|
} |
|
}, |
|
"id": 1074, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"memberLocation": "12724:2:1", |
|
"memberName": "Up", |
|
"nodeType": "MemberAccess", |
|
"referencedDeclaration": 233, |
|
"src": "12715:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"src": "12703:23:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&&", |
|
"rightExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1083, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1081, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"hexValue": "31", |
|
"id": 1076, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12730:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<<", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1079, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1077, |
|
"name": "result", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1066, |
|
"src": "12736:6:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<<", |
|
"rightExpression": { |
|
"hexValue": "33", |
|
"id": 1078, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12746:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_3_by_1", |
|
"typeString": "int_const 3" |
|
}, |
|
"value": "3" |
|
}, |
|
"src": "12736:11:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"id": 1080, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "12735:13:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "12730:18:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<", |
|
"rightExpression": { |
|
"id": 1082, |
|
"name": "value", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1057, |
|
"src": "12751:5:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"src": "12730:26:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"src": "12703:53:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"hexValue": "30", |
|
"id": 1086, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12763:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"id": 1087, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "12703:61:1", |
|
"trueExpression": { |
|
"hexValue": "31", |
|
"id": 1085, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "12759:1:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
} |
|
], |
|
"id": 1088, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "12702:63:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint8", |
|
"typeString": "uint8" |
|
} |
|
}, |
|
"src": "12693:72:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 1064, |
|
"id": 1090, |
|
"nodeType": "Return", |
|
"src": "12686:79:1" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 1055, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "12377:144:1", |
|
"text": " @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." |
|
}, |
|
"id": 1093, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "log256", |
|
"nameLocation": "12535:6:1", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 1061, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1057, |
|
"mutability": "mutable", |
|
"name": "value", |
|
"nameLocation": "12550:5:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1093, |
|
"src": "12542:13:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 1056, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "12542:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 1060, |
|
"mutability": "mutable", |
|
"name": "rounding", |
|
"nameLocation": "12566:8:1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1093, |
|
"src": "12557:17:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
}, |
|
"typeName": { |
|
"id": 1059, |
|
"nodeType": "UserDefinedTypeName", |
|
"pathNode": { |
|
"id": 1058, |
|
"name": "Rounding", |
|
"nameLocations": [ |
|
"12557:8:1" |
|
], |
|
"nodeType": "IdentifierPath", |
|
"referencedDeclaration": 235, |
|
"src": "12557:8:1" |
|
}, |
|
"referencedDeclaration": 235, |
|
"src": "12557:8:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_enum$_Rounding_$235", |
|
"typeString": "enum Math.Rounding" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "12541:34:1" |
|
}, |
|
"returnParameters": { |
|
"id": 1064, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1063, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1093, |
|
"src": "12599:7:1", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 1062, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "12599:7:1", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "12598:9:1" |
|
}, |
|
"scope": 1094, |
|
"src": "12526:256:1", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
} |
|
], |
|
"scope": 1095, |
|
"src": "202:12582:1", |
|
"usedErrors": [] |
|
} |
|
], |
|
"src": "103:12682:1" |
|
}, |
|
"id": 1 |
|
}, |
|
".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol": { |
|
"ast": { |
|
"absolutePath": ".deps/npm/@openzeppelin/contracts/utils/math/SignedMath.sol", |
|
"exportedSymbols": { |
|
"SignedMath": [ |
|
1199 |
|
] |
|
}, |
|
"id": 1200, |
|
"license": "MIT", |
|
"nodeType": "SourceUnit", |
|
"nodes": [ |
|
{ |
|
"id": 1096, |
|
"literals": [ |
|
"solidity", |
|
"^", |
|
"0.8", |
|
".0" |
|
], |
|
"nodeType": "PragmaDirective", |
|
"src": "109:23:2" |
|
}, |
|
{ |
|
"abstract": false, |
|
"baseContracts": [], |
|
"canonicalName": "SignedMath", |
|
"contractDependencies": [], |
|
"contractKind": "library", |
|
"documentation": { |
|
"id": 1097, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "134:80:2", |
|
"text": " @dev Standard signed math utilities missing in the Solidity language." |
|
}, |
|
"fullyImplemented": true, |
|
"id": 1199, |
|
"linearizedBaseContracts": [ |
|
1199 |
|
], |
|
"name": "SignedMath", |
|
"nameLocation": "223:10:2", |
|
"nodeType": "ContractDefinition", |
|
"nodes": [ |
|
{ |
|
"body": { |
|
"id": 1114, |
|
"nodeType": "Block", |
|
"src": "375:37:2", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1109, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1107, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1100, |
|
"src": "392:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">", |
|
"rightExpression": { |
|
"id": 1108, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1102, |
|
"src": "396:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"src": "392:5:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"id": 1111, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1102, |
|
"src": "404:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"id": 1112, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "392:13:2", |
|
"trueExpression": { |
|
"id": 1110, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1100, |
|
"src": "400:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"functionReturnParameters": 1106, |
|
"id": 1113, |
|
"nodeType": "Return", |
|
"src": "385:20:2" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 1098, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "240:66:2", |
|
"text": " @dev Returns the largest of two signed numbers." |
|
}, |
|
"id": 1115, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "max", |
|
"nameLocation": "320:3:2", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 1103, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1100, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "331:1:2", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1115, |
|
"src": "324:8:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1099, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "324:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 1102, |
|
"mutability": "mutable", |
|
"name": "b", |
|
"nameLocation": "341:1:2", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1115, |
|
"src": "334:8:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1101, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "334:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "323:20:2" |
|
}, |
|
"returnParameters": { |
|
"id": 1106, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1105, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1115, |
|
"src": "367:6:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1104, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "367:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "366:8:2" |
|
}, |
|
"scope": 1199, |
|
"src": "311:101:2", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 1132, |
|
"nodeType": "Block", |
|
"src": "554:37:2", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1127, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1125, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1118, |
|
"src": "571:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "<", |
|
"rightExpression": { |
|
"id": 1126, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1120, |
|
"src": "575:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"src": "571:5:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"id": 1129, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1120, |
|
"src": "583:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"id": 1130, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "571:13:2", |
|
"trueExpression": { |
|
"id": 1128, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1118, |
|
"src": "579:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"functionReturnParameters": 1124, |
|
"id": 1131, |
|
"nodeType": "Return", |
|
"src": "564:20:2" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 1116, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "418:67:2", |
|
"text": " @dev Returns the smallest of two signed numbers." |
|
}, |
|
"id": 1133, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "min", |
|
"nameLocation": "499:3:2", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 1121, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1118, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "510:1:2", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1133, |
|
"src": "503:8:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1117, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "503:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 1120, |
|
"mutability": "mutable", |
|
"name": "b", |
|
"nameLocation": "520:1:2", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1133, |
|
"src": "513:8:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1119, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "513:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "502:20:2" |
|
}, |
|
"returnParameters": { |
|
"id": 1124, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1123, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1133, |
|
"src": "546:6:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1122, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "546:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "545:8:2" |
|
}, |
|
"scope": 1199, |
|
"src": "490:101:2", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 1176, |
|
"nodeType": "Block", |
|
"src": "796:162:2", |
|
"statements": [ |
|
{ |
|
"assignments": [ |
|
1144 |
|
], |
|
"declarations": [ |
|
{ |
|
"constant": false, |
|
"id": 1144, |
|
"mutability": "mutable", |
|
"name": "x", |
|
"nameLocation": "865:1:2", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1176, |
|
"src": "858:8:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1143, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "858:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"id": 1157, |
|
"initialValue": { |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1156, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1147, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1145, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1136, |
|
"src": "870:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&", |
|
"rightExpression": { |
|
"id": 1146, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1138, |
|
"src": "874:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"src": "870:5:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
} |
|
], |
|
"id": 1148, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "869:7:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1154, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1151, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1149, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1136, |
|
"src": "881:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "^", |
|
"rightExpression": { |
|
"id": 1150, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1138, |
|
"src": "885:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"src": "881:5:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
} |
|
], |
|
"id": 1152, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "880:7:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "31", |
|
"id": 1153, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "891:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_1_by_1", |
|
"typeString": "int_const 1" |
|
}, |
|
"value": "1" |
|
}, |
|
"src": "880:12:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
} |
|
], |
|
"id": 1155, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "879:14:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"src": "869:24:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "VariableDeclarationStatement", |
|
"src": "858:35:2" |
|
}, |
|
{ |
|
"expression": { |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1174, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1158, |
|
"name": "x", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1144, |
|
"src": "910:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "+", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1172, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"arguments": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"id": 1166, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"arguments": [ |
|
{ |
|
"id": 1163, |
|
"name": "x", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1144, |
|
"src": "930:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
], |
|
"id": 1162, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "922:7:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_uint256_$", |
|
"typeString": "type(uint256)" |
|
}, |
|
"typeName": { |
|
"id": 1161, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "922:7:2", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 1164, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "922:10:2", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">>", |
|
"rightExpression": { |
|
"hexValue": "323535", |
|
"id": 1165, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "936:3:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_255_by_1", |
|
"typeString": "int_const 255" |
|
}, |
|
"value": "255" |
|
}, |
|
"src": "922:17:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
], |
|
"id": 1160, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "915:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_int256_$", |
|
"typeString": "type(int256)" |
|
}, |
|
"typeName": { |
|
"id": 1159, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "915:6:2", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 1167, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "915:25:2", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "&", |
|
"rightExpression": { |
|
"components": [ |
|
{ |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1170, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1168, |
|
"name": "a", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1136, |
|
"src": "944:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": "^", |
|
"rightExpression": { |
|
"id": 1169, |
|
"name": "b", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1138, |
|
"src": "948:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"src": "944:5:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
} |
|
], |
|
"id": 1171, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "943:7:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"src": "915:35:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
} |
|
], |
|
"id": 1173, |
|
"isConstant": false, |
|
"isInlineArray": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "TupleExpression", |
|
"src": "914:37:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"src": "910:41:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"functionReturnParameters": 1142, |
|
"id": 1175, |
|
"nodeType": "Return", |
|
"src": "903:48:2" |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 1134, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "597:126:2", |
|
"text": " @dev Returns the average of two signed numbers without overflow.\n The result is rounded towards zero." |
|
}, |
|
"id": 1177, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "average", |
|
"nameLocation": "737:7:2", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 1139, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1136, |
|
"mutability": "mutable", |
|
"name": "a", |
|
"nameLocation": "752:1:2", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1177, |
|
"src": "745:8:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1135, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "745:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"constant": false, |
|
"id": 1138, |
|
"mutability": "mutable", |
|
"name": "b", |
|
"nameLocation": "762:1:2", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1177, |
|
"src": "755:8:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1137, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "755:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "744:20:2" |
|
}, |
|
"returnParameters": { |
|
"id": 1142, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1141, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1177, |
|
"src": "788:6:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1140, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "788:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "787:8:2" |
|
}, |
|
"scope": 1199, |
|
"src": "728:230:2", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
}, |
|
{ |
|
"body": { |
|
"id": 1197, |
|
"nodeType": "Block", |
|
"src": "1102:158:2", |
|
"statements": [ |
|
{ |
|
"id": 1196, |
|
"nodeType": "UncheckedBlock", |
|
"src": "1112:142:2", |
|
"statements": [ |
|
{ |
|
"expression": { |
|
"arguments": [ |
|
{ |
|
"condition": { |
|
"commonType": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"id": 1189, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"leftExpression": { |
|
"id": 1187, |
|
"name": "n", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1180, |
|
"src": "1227:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"nodeType": "BinaryOperation", |
|
"operator": ">=", |
|
"rightExpression": { |
|
"hexValue": "30", |
|
"id": 1188, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"kind": "number", |
|
"lValueRequested": false, |
|
"nodeType": "Literal", |
|
"src": "1232:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_rational_0_by_1", |
|
"typeString": "int_const 0" |
|
}, |
|
"value": "0" |
|
}, |
|
"src": "1227:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_bool", |
|
"typeString": "bool" |
|
} |
|
}, |
|
"falseExpression": { |
|
"id": 1192, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "UnaryOperation", |
|
"operator": "-", |
|
"prefix": true, |
|
"src": "1240:2:2", |
|
"subExpression": { |
|
"id": 1191, |
|
"name": "n", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1180, |
|
"src": "1241:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"id": 1193, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"lValueRequested": false, |
|
"nodeType": "Conditional", |
|
"src": "1227:15:2", |
|
"trueExpression": { |
|
"id": 1190, |
|
"name": "n", |
|
"nodeType": "Identifier", |
|
"overloadedDeclarations": [], |
|
"referencedDeclaration": 1180, |
|
"src": "1236:1:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
} |
|
], |
|
"expression": { |
|
"argumentTypes": [ |
|
{ |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
], |
|
"id": 1186, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": true, |
|
"lValueRequested": false, |
|
"nodeType": "ElementaryTypeNameExpression", |
|
"src": "1219:7:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_type$_t_uint256_$", |
|
"typeString": "type(uint256)" |
|
}, |
|
"typeName": { |
|
"id": 1185, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1219:7:2", |
|
"typeDescriptions": {} |
|
} |
|
}, |
|
"id": 1194, |
|
"isConstant": false, |
|
"isLValue": false, |
|
"isPure": false, |
|
"kind": "typeConversion", |
|
"lValueRequested": false, |
|
"nameLocations": [], |
|
"names": [], |
|
"nodeType": "FunctionCall", |
|
"src": "1219:24:2", |
|
"tryCall": false, |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"functionReturnParameters": 1184, |
|
"id": 1195, |
|
"nodeType": "Return", |
|
"src": "1212:31:2" |
|
} |
|
] |
|
} |
|
] |
|
}, |
|
"documentation": { |
|
"id": 1178, |
|
"nodeType": "StructuredDocumentation", |
|
"src": "964:78:2", |
|
"text": " @dev Returns the absolute unsigned value of a signed value." |
|
}, |
|
"id": 1198, |
|
"implemented": true, |
|
"kind": "function", |
|
"modifiers": [], |
|
"name": "abs", |
|
"nameLocation": "1056:3:2", |
|
"nodeType": "FunctionDefinition", |
|
"parameters": { |
|
"id": 1181, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1180, |
|
"mutability": "mutable", |
|
"name": "n", |
|
"nameLocation": "1067:1:2", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1198, |
|
"src": "1060:8:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
}, |
|
"typeName": { |
|
"id": 1179, |
|
"name": "int256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1060:6:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_int256", |
|
"typeString": "int256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1059:10:2" |
|
}, |
|
"returnParameters": { |
|
"id": 1184, |
|
"nodeType": "ParameterList", |
|
"parameters": [ |
|
{ |
|
"constant": false, |
|
"id": 1183, |
|
"mutability": "mutable", |
|
"name": "", |
|
"nameLocation": "-1:-1:-1", |
|
"nodeType": "VariableDeclaration", |
|
"scope": 1198, |
|
"src": "1093:7:2", |
|
"stateVariable": false, |
|
"storageLocation": "default", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
}, |
|
"typeName": { |
|
"id": 1182, |
|
"name": "uint256", |
|
"nodeType": "ElementaryTypeName", |
|
"src": "1093:7:2", |
|
"typeDescriptions": { |
|
"typeIdentifier": "t_uint256", |
|
"typeString": "uint256" |
|
} |
|
}, |
|
"visibility": "internal" |
|
} |
|
], |
|
"src": "1092:9:2" |
|
}, |
|
"scope": 1199, |
|
"src": "1047:213:2", |
|
"stateMutability": "pure", |
|
"virtual": false, |
|
"visibility": "internal" |
|
} |
|
], |
|
"scope": 1200, |
|
"src": "215:1047:2", |
|
"usedErrors": [] |
|
} |
|
], |
|
"src": "109:1154:2" |
|
}, |
|
"id": 2 |
|
} |
|
} |
|
} |
|
} |