1973 lines
77 KiB
JSON
1973 lines
77 KiB
JSON
{
|
|
"abi": [],
|
|
"bytecode": {
|
|
"object": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fce94ceb9eedb63fc214c2316d1e5f9695c2612349171b3759abf1e51ed92ca564736f6c63430008160033",
|
|
"sourceMap": "65:1294:9:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;65:1294:9;;;;;;;;;;;;;;;;;",
|
|
"linkReferences": {}
|
|
},
|
|
"deployedBytecode": {
|
|
"object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fce94ceb9eedb63fc214c2316d1e5f9695c2612349171b3759abf1e51ed92ca564736f6c63430008160033",
|
|
"sourceMap": "65:1294:9:-:0;;;;;;;;",
|
|
"linkReferences": {}
|
|
},
|
|
"methodIdentifiers": {},
|
|
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/StdMath.sol\":\"stdMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":999999999},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@uniswap/v3-core/=lib_uniswap/v3-core/\",\":@uniswap/v3-periphery/=lib_uniswap/v3-periphery/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":v3-core/=lib_uniswap/v3-core/\",\":v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/\"]},\"sources\":{\"lib/forge-std/src/StdMath.sol\":{\"keccak256\":\"0xd90ad4fd8aeaeb8929964e686e769fdedd5eded3fc3815df194a0ab9f91a3fb2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7919b70f636c7b805223992f28ad1ad0145d6c1385b5931a3589aface5fe6c92\",\"dweb:/ipfs/QmY7FRaULwoGgFteF8GawjQJRfasNgpWnU2aiMsFrYpuTC\"]}},\"version\":1}",
|
|
"metadata": {
|
|
"compiler": {
|
|
"version": "0.8.22+commit.4fc1097e"
|
|
},
|
|
"language": "Solidity",
|
|
"output": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
},
|
|
"settings": {
|
|
"remappings": [
|
|
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
|
|
"@uniswap/v3-core/=lib_uniswap/v3-core/",
|
|
"@uniswap/v3-periphery/=lib_uniswap/v3-periphery/",
|
|
"ds-test/=lib/forge-std/lib/ds-test/src/",
|
|
"forge-std/=lib/forge-std/src/",
|
|
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
|
|
"v3-core/=lib_uniswap/v3-core/",
|
|
"v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/"
|
|
],
|
|
"optimizer": {
|
|
"runs": 999999999,
|
|
"details": {
|
|
"peephole": true,
|
|
"inliner": true,
|
|
"jumpdestRemover": true,
|
|
"orderLiterals": true,
|
|
"deduplicate": true,
|
|
"cse": true,
|
|
"constantOptimizer": true,
|
|
"yul": true,
|
|
"yulDetails": {
|
|
"stackAllocation": true,
|
|
"optimizerSteps": "dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu"
|
|
}
|
|
}
|
|
},
|
|
"metadata": {
|
|
"bytecodeHash": "ipfs"
|
|
},
|
|
"compilationTarget": {
|
|
"lib/forge-std/src/StdMath.sol": "stdMath"
|
|
},
|
|
"libraries": {}
|
|
},
|
|
"sources": {
|
|
"lib/forge-std/src/StdMath.sol": {
|
|
"keccak256": "0xd90ad4fd8aeaeb8929964e686e769fdedd5eded3fc3815df194a0ab9f91a3fb2",
|
|
"urls": [
|
|
"bzz-raw://7919b70f636c7b805223992f28ad1ad0145d6c1385b5931a3589aface5fe6c92",
|
|
"dweb:/ipfs/QmY7FRaULwoGgFteF8GawjQJRfasNgpWnU2aiMsFrYpuTC"
|
|
],
|
|
"license": "MIT"
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"ast": {
|
|
"absolutePath": "lib/forge-std/src/StdMath.sol",
|
|
"id": 8343,
|
|
"exportedSymbols": {
|
|
"stdMath": [
|
|
8342
|
|
]
|
|
},
|
|
"nodeType": "SourceUnit",
|
|
"src": "32:1328:9",
|
|
"nodes": [
|
|
{
|
|
"id": 8202,
|
|
"nodeType": "PragmaDirective",
|
|
"src": "32:31:9",
|
|
"nodes": [],
|
|
"literals": [
|
|
"solidity",
|
|
">=",
|
|
"0.6",
|
|
".2",
|
|
"<",
|
|
"0.9",
|
|
".0"
|
|
]
|
|
},
|
|
{
|
|
"id": 8342,
|
|
"nodeType": "ContractDefinition",
|
|
"src": "65:1294:9",
|
|
"nodes": [
|
|
{
|
|
"id": 8206,
|
|
"nodeType": "VariableDeclaration",
|
|
"src": "87:115:9",
|
|
"nodes": [],
|
|
"constant": true,
|
|
"mutability": "constant",
|
|
"name": "INT256_MIN",
|
|
"nameLocation": "111:10:9",
|
|
"scope": 8342,
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 8203,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "87:6:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"value": {
|
|
"id": 8205,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "-",
|
|
"prefix": true,
|
|
"src": "124:78:9",
|
|
"subExpression": {
|
|
"hexValue": "3537383936303434363138363538303937373131373835343932353034333433393533393236363334393932333332383230323832303139373238373932303033393536353634383139393638",
|
|
"id": 8204,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "125:77:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1",
|
|
"typeString": "int_const 5789...(69 digits omitted)...9968"
|
|
},
|
|
"value": "57896044618658097711785492504343953926634992332820282019728792003956564819968"
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1",
|
|
"typeString": "int_const -578...(70 digits omitted)...9968"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"id": 8232,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "209:306:9",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 8231,
|
|
"nodeType": "Block",
|
|
"src": "264:251:9",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 8215,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 8213,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8208,
|
|
"src": "342:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"id": 8214,
|
|
"name": "INT256_MIN",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8206,
|
|
"src": "347:10:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"src": "342:15:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 8219,
|
|
"nodeType": "IfStatement",
|
|
"src": "338:130:9",
|
|
"trueBody": {
|
|
"id": 8218,
|
|
"nodeType": "Block",
|
|
"src": "359:109:9",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"hexValue": "3537383936303434363138363538303937373131373835343932353034333433393533393236363334393932333332383230323832303139373238373932303033393536353634383139393638",
|
|
"id": 8216,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "380:77:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1",
|
|
"typeString": "int_const 5789...(69 digits omitted)...9968"
|
|
},
|
|
"value": "57896044618658097711785492504343953926634992332820282019728792003956564819968"
|
|
},
|
|
"functionReturnParameters": 8212,
|
|
"id": 8217,
|
|
"nodeType": "Return",
|
|
"src": "373:84:9"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 8224,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 8222,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8208,
|
|
"src": "493:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 8223,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "497:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "493:5:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"id": 8227,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "-",
|
|
"prefix": true,
|
|
"src": "505:2:9",
|
|
"subExpression": {
|
|
"id": 8226,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8208,
|
|
"src": "506:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"id": 8228,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "493:14:9",
|
|
"trueExpression": {
|
|
"id": 8225,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8208,
|
|
"src": "501:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 8221,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "485:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 8220,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "485:7:9",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 8229,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "485:23:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 8212,
|
|
"id": 8230,
|
|
"nodeType": "Return",
|
|
"src": "478:30:9"
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "abs",
|
|
"nameLocation": "218:3:9",
|
|
"parameters": {
|
|
"id": 8209,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8208,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "229:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8232,
|
|
"src": "222:8:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 8207,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "222:6:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "221:10:9"
|
|
},
|
|
"returnParameters": {
|
|
"id": 8212,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8211,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8232,
|
|
"src": "255:7:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8210,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "255:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "254:9:9"
|
|
},
|
|
"scope": 8342,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 8253,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "521:114:9",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 8252,
|
|
"nodeType": "Block",
|
|
"src": "590:45:9",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 8243,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 8241,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8234,
|
|
"src": "607:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"id": 8242,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8236,
|
|
"src": "611:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "607:5:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 8249,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 8247,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8236,
|
|
"src": "623:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"id": 8248,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8234,
|
|
"src": "627:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "623:5:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 8250,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "607:21:9",
|
|
"trueExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 8246,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 8244,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8234,
|
|
"src": "615:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"id": 8245,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8236,
|
|
"src": "619:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "615:5:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 8240,
|
|
"id": 8251,
|
|
"nodeType": "Return",
|
|
"src": "600:28:9"
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "delta",
|
|
"nameLocation": "530:5:9",
|
|
"parameters": {
|
|
"id": 8237,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8234,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "544:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8253,
|
|
"src": "536:9:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8233,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "536:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 8236,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "555:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8253,
|
|
"src": "547:9:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8235,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "547:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "535:22:9"
|
|
},
|
|
"returnParameters": {
|
|
"id": 8240,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8239,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8253,
|
|
"src": "581:7:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8238,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "581:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "580:9:9"
|
|
},
|
|
"scope": 8342,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 8289,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "641:352:9",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 8288,
|
|
"nodeType": "Block",
|
|
"src": "708:285:9",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 8268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 8264,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 8262,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8255,
|
|
"src": "847:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "^",
|
|
"rightExpression": {
|
|
"id": 8263,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8257,
|
|
"src": "851:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"src": "847:5:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"id": 8265,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "846:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"id": 8267,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "-",
|
|
"prefix": true,
|
|
"src": "856:2:9",
|
|
"subExpression": {
|
|
"hexValue": "31",
|
|
"id": 8266,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "857:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_minus_1_by_1",
|
|
"typeString": "int_const -1"
|
|
}
|
|
},
|
|
"src": "846:12:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 8279,
|
|
"nodeType": "IfStatement",
|
|
"src": "842:71:9",
|
|
"trueBody": {
|
|
"id": 8278,
|
|
"nodeType": "Block",
|
|
"src": "860:53:9",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 8271,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8255,
|
|
"src": "891:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 8270,
|
|
"name": "abs",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8232,
|
|
"src": "887:3:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
|
|
"typeString": "function (int256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 8272,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "887:6:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 8274,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8257,
|
|
"src": "899:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 8273,
|
|
"name": "abs",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8232,
|
|
"src": "895:3:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
|
|
"typeString": "function (int256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 8275,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "895:6:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 8269,
|
|
"name": "delta",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
8253,
|
|
8289
|
|
],
|
|
"referencedDeclaration": 8253,
|
|
"src": "881:5:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 8276,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "881:21:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 8261,
|
|
"id": 8277,
|
|
"nodeType": "Return",
|
|
"src": "874:28:9"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 8286,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 8281,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8255,
|
|
"src": "975:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 8280,
|
|
"name": "abs",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8232,
|
|
"src": "971:3:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
|
|
"typeString": "function (int256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 8282,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "971:6:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 8284,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8257,
|
|
"src": "984:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 8283,
|
|
"name": "abs",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8232,
|
|
"src": "980:3:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
|
|
"typeString": "function (int256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 8285,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "980:6:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "971:15:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 8261,
|
|
"id": 8287,
|
|
"nodeType": "Return",
|
|
"src": "964:22:9"
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "delta",
|
|
"nameLocation": "650:5:9",
|
|
"parameters": {
|
|
"id": 8258,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8255,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "663:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8289,
|
|
"src": "656:8:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 8254,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "656:6:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 8257,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "673:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8289,
|
|
"src": "666:8:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 8256,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "666:6:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "655:20:9"
|
|
},
|
|
"returnParameters": {
|
|
"id": 8261,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8260,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8289,
|
|
"src": "699:7:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8259,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "699:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "698:9:9"
|
|
},
|
|
"scope": 8342,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 8312,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "999:160:9",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 8311,
|
|
"nodeType": "Block",
|
|
"src": "1075:84:9",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
8299
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 8299,
|
|
"mutability": "mutable",
|
|
"name": "absDelta",
|
|
"nameLocation": "1093:8:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8311,
|
|
"src": "1085:16:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8298,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1085:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 8304,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 8301,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8291,
|
|
"src": "1110:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 8302,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8293,
|
|
"src": "1113:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 8300,
|
|
"name": "delta",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
8253,
|
|
8289
|
|
],
|
|
"referencedDeclaration": 8253,
|
|
"src": "1104:5:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 8303,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1104:11:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1085:30:9"
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 8309,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 8307,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 8305,
|
|
"name": "absDelta",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8299,
|
|
"src": "1133:8:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"hexValue": "31653138",
|
|
"id": 8306,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1144:4:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
},
|
|
"value": "1e18"
|
|
},
|
|
"src": "1133:15:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 8308,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8293,
|
|
"src": "1151:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1133:19:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 8297,
|
|
"id": 8310,
|
|
"nodeType": "Return",
|
|
"src": "1126:26:9"
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "percentDelta",
|
|
"nameLocation": "1008:12:9",
|
|
"parameters": {
|
|
"id": 8294,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8291,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "1029:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8312,
|
|
"src": "1021:9:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8290,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1021:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 8293,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "1040:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8312,
|
|
"src": "1032:9:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8292,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1032:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1020:22:9"
|
|
},
|
|
"returnParameters": {
|
|
"id": 8297,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8296,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8312,
|
|
"src": "1066:7:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8295,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1066:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1065:9:9"
|
|
},
|
|
"scope": 8342,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 8341,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "1165:192:9",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 8340,
|
|
"nodeType": "Block",
|
|
"src": "1239:118:9",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
8322
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 8322,
|
|
"mutability": "mutable",
|
|
"name": "absDelta",
|
|
"nameLocation": "1257:8:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8340,
|
|
"src": "1249:16:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8321,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1249:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 8327,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 8324,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8314,
|
|
"src": "1274:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
{
|
|
"id": 8325,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8316,
|
|
"src": "1277:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 8323,
|
|
"name": "delta",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
8253,
|
|
8289
|
|
],
|
|
"referencedDeclaration": 8289,
|
|
"src": "1268:5:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_uint256_$",
|
|
"typeString": "function (int256,int256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 8326,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1268:11:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1249:30:9"
|
|
},
|
|
{
|
|
"assignments": [
|
|
8329
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 8329,
|
|
"mutability": "mutable",
|
|
"name": "absB",
|
|
"nameLocation": "1297:4:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8340,
|
|
"src": "1289:12:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8328,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1289:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 8333,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 8331,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8316,
|
|
"src": "1308:1:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 8330,
|
|
"name": "abs",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8232,
|
|
"src": "1304:3:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
|
|
"typeString": "function (int256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 8332,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1304:6:9",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1289:21:9"
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 8338,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 8336,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 8334,
|
|
"name": "absDelta",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8322,
|
|
"src": "1328:8:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"hexValue": "31653138",
|
|
"id": 8335,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1339:4:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
},
|
|
"value": "1e18"
|
|
},
|
|
"src": "1328:15:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 8337,
|
|
"name": "absB",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8329,
|
|
"src": "1346:4:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1328:22:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 8320,
|
|
"id": 8339,
|
|
"nodeType": "Return",
|
|
"src": "1321:29:9"
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "percentDelta",
|
|
"nameLocation": "1174:12:9",
|
|
"parameters": {
|
|
"id": 8317,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8314,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "1194:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8341,
|
|
"src": "1187:8:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 8313,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1187:6:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 8316,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "1204:1:9",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8341,
|
|
"src": "1197:8:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 8315,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1197:6:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1186:20:9"
|
|
},
|
|
"returnParameters": {
|
|
"id": 8320,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8319,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8341,
|
|
"src": "1230:7:9",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 8318,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1230:7:9",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1229:9:9"
|
|
},
|
|
"scope": 8342,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "stdMath",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"fullyImplemented": true,
|
|
"linearizedBaseContracts": [
|
|
8342
|
|
],
|
|
"name": "stdMath",
|
|
"nameLocation": "73:7:9",
|
|
"scope": 8343,
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"license": "MIT"
|
|
},
|
|
"id": 9
|
|
} |