non-fungible-apps/out/StdMath.sol/stdMath.json

1959 lines
76 KiB
JSON

{
"abi": [],
"bytecode": {
"object": "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea26469706673582212204625f8e5581a749b446de5a73e627d46848d6bf1b27fdb703ee5c5ec14c675f864736f6c63430008110033",
"sourceMap": "65:1294:9:-:0;;;;;;;;;;;;;;;;;;;;;",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x600080fdfea26469706673582212204625f8e5581a749b446de5a73e627d46848d6bf1b27fdb703ee5c5ec14c675f864736f6c63430008110033",
"sourceMap": "65:1294:9:-:0;;",
"linkReferences": {}
},
"methodIdentifiers": {},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"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\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/=node_modules/@ensdomains/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat-deploy/=node_modules/hardhat-deploy/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"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.17+commit.8df45f5f"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":@ensdomains/=node_modules/@ensdomains/",
":@openzeppelin/=node_modules/@openzeppelin/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":eth-gas-reporter/=node_modules/eth-gas-reporter/",
":forge-std/=lib/forge-std/src/",
":hardhat-deploy/=node_modules/hardhat-deploy/",
":hardhat/=node_modules/hardhat/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib/forge-std/src/StdMath.sol": "stdMath"
},
"libraries": {},
"viaIR": true
},
"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": 6358,
"exportedSymbols": {
"stdMath": [
6357
]
},
"nodeType": "SourceUnit",
"src": "32:1328:9",
"nodes": [
{
"id": 6217,
"nodeType": "PragmaDirective",
"src": "32:31:9",
"nodes": [],
"literals": [
"solidity",
">=",
"0.6",
".2",
"<",
"0.9",
".0"
]
},
{
"id": 6357,
"nodeType": "ContractDefinition",
"src": "65:1294:9",
"nodes": [
{
"id": 6221,
"nodeType": "VariableDeclaration",
"src": "87:115:9",
"nodes": [],
"constant": true,
"mutability": "constant",
"name": "INT256_MIN",
"nameLocation": "111:10:9",
"scope": 6357,
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 6218,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "87:6:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"value": {
"id": 6220,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "-",
"prefix": true,
"src": "124:78:9",
"subExpression": {
"hexValue": "3537383936303434363138363538303937373131373835343932353034333433393533393236363334393932333332383230323832303139373238373932303033393536353634383139393638",
"id": 6219,
"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": 6247,
"nodeType": "FunctionDefinition",
"src": "209:306:9",
"nodes": [],
"body": {
"id": 6246,
"nodeType": "Block",
"src": "264:251:9",
"nodes": [],
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 6230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6228,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6223,
"src": "342:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 6229,
"name": "INT256_MIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6221,
"src": "347:10:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "342:15:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6234,
"nodeType": "IfStatement",
"src": "338:130:9",
"trueBody": {
"id": 6233,
"nodeType": "Block",
"src": "359:109:9",
"statements": [
{
"expression": {
"hexValue": "3537383936303434363138363538303937373131373835343932353034333433393533393236363334393932333332383230323832303139373238373932303033393536353634383139393638",
"id": 6231,
"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": 6227,
"id": 6232,
"nodeType": "Return",
"src": "373:84:9"
}
]
}
},
{
"expression": {
"arguments": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 6239,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6237,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6223,
"src": "493:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 6238,
"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": 6242,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "-",
"prefix": true,
"src": "505:2:9",
"subExpression": {
"id": 6241,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6223,
"src": "506:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"id": 6243,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "493:14:9",
"trueExpression": {
"id": 6240,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6223,
"src": "501:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 6236,
"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": 6235,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:9",
"typeDescriptions": {}
}
},
"id": 6244,
"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": 6227,
"id": 6245,
"nodeType": "Return",
"src": "478:30:9"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "abs",
"nameLocation": "218:3:9",
"parameters": {
"id": 6224,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6223,
"mutability": "mutable",
"name": "a",
"nameLocation": "229:1:9",
"nodeType": "VariableDeclaration",
"scope": 6247,
"src": "222:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 6222,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "222:6:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "221:10:9"
},
"returnParameters": {
"id": 6227,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6226,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6247,
"src": "255:7:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6225,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "255:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "254:9:9"
},
"scope": 6357,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"id": 6268,
"nodeType": "FunctionDefinition",
"src": "521:114:9",
"nodes": [],
"body": {
"id": 6267,
"nodeType": "Block",
"src": "590:45:9",
"nodes": [],
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6258,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6256,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6249,
"src": "607:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 6257,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6251,
"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": 6264,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6262,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6251,
"src": "623:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 6263,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6249,
"src": "627:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "623:5:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6265,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "607:21:9",
"trueExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6261,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6259,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6249,
"src": "615:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 6260,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6251,
"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": 6255,
"id": 6266,
"nodeType": "Return",
"src": "600:28:9"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "delta",
"nameLocation": "530:5:9",
"parameters": {
"id": 6252,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6249,
"mutability": "mutable",
"name": "a",
"nameLocation": "544:1:9",
"nodeType": "VariableDeclaration",
"scope": 6268,
"src": "536:9:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6248,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "536:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6251,
"mutability": "mutable",
"name": "b",
"nameLocation": "555:1:9",
"nodeType": "VariableDeclaration",
"scope": 6268,
"src": "547:9:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6250,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "547:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "535:22:9"
},
"returnParameters": {
"id": 6255,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6254,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6268,
"src": "581:7:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6253,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "581:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "580:9:9"
},
"scope": 6357,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"id": 6304,
"nodeType": "FunctionDefinition",
"src": "641:352:9",
"nodes": [],
"body": {
"id": 6303,
"nodeType": "Block",
"src": "708:285:9",
"nodes": [],
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 6283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 6279,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6277,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6270,
"src": "847:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 6278,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6272,
"src": "851:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "847:5:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"id": 6280,
"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": 6282,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "-",
"prefix": true,
"src": "856:2:9",
"subExpression": {
"hexValue": "31",
"id": 6281,
"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": 6294,
"nodeType": "IfStatement",
"src": "842:71:9",
"trueBody": {
"id": 6293,
"nodeType": "Block",
"src": "860:53:9",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 6286,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6270,
"src": "891:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 6285,
"name": "abs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6247,
"src": "887:3:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
"typeString": "function (int256) pure returns (uint256)"
}
},
"id": 6287,
"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": 6289,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6272,
"src": "899:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 6288,
"name": "abs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6247,
"src": "895:3:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
"typeString": "function (int256) pure returns (uint256)"
}
},
"id": 6290,
"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": 6284,
"name": "delta",
"nodeType": "Identifier",
"overloadedDeclarations": [
6268,
6304
],
"referencedDeclaration": 6268,
"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": 6291,
"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": 6276,
"id": 6292,
"nodeType": "Return",
"src": "874:28:9"
}
]
}
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6301,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 6296,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6270,
"src": "975:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 6295,
"name": "abs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6247,
"src": "971:3:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
"typeString": "function (int256) pure returns (uint256)"
}
},
"id": 6297,
"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": 6299,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6272,
"src": "984:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 6298,
"name": "abs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6247,
"src": "980:3:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
"typeString": "function (int256) pure returns (uint256)"
}
},
"id": 6300,
"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": 6276,
"id": 6302,
"nodeType": "Return",
"src": "964:22:9"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "delta",
"nameLocation": "650:5:9",
"parameters": {
"id": 6273,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6270,
"mutability": "mutable",
"name": "a",
"nameLocation": "663:1:9",
"nodeType": "VariableDeclaration",
"scope": 6304,
"src": "656:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 6269,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "656:6:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6272,
"mutability": "mutable",
"name": "b",
"nameLocation": "673:1:9",
"nodeType": "VariableDeclaration",
"scope": 6304,
"src": "666:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 6271,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "666:6:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "655:20:9"
},
"returnParameters": {
"id": 6276,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6275,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6304,
"src": "699:7:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6274,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "699:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "698:9:9"
},
"scope": 6357,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"id": 6327,
"nodeType": "FunctionDefinition",
"src": "999:160:9",
"nodes": [],
"body": {
"id": 6326,
"nodeType": "Block",
"src": "1075:84:9",
"nodes": [],
"statements": [
{
"assignments": [
6314
],
"declarations": [
{
"constant": false,
"id": 6314,
"mutability": "mutable",
"name": "absDelta",
"nameLocation": "1093:8:9",
"nodeType": "VariableDeclaration",
"scope": 6326,
"src": "1085:16:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6313,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1085:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 6319,
"initialValue": {
"arguments": [
{
"id": 6316,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6306,
"src": "1110:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 6317,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6308,
"src": "1113:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 6315,
"name": "delta",
"nodeType": "Identifier",
"overloadedDeclarations": [
6268,
6304
],
"referencedDeclaration": 6268,
"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": 6318,
"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": 6324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6322,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6320,
"name": "absDelta",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6314,
"src": "1133:8:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"hexValue": "31653138",
"id": 6321,
"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": 6323,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6308,
"src": "1151:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1133:19:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6312,
"id": 6325,
"nodeType": "Return",
"src": "1126:26:9"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "percentDelta",
"nameLocation": "1008:12:9",
"parameters": {
"id": 6309,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6306,
"mutability": "mutable",
"name": "a",
"nameLocation": "1029:1:9",
"nodeType": "VariableDeclaration",
"scope": 6327,
"src": "1021:9:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6305,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1021:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6308,
"mutability": "mutable",
"name": "b",
"nameLocation": "1040:1:9",
"nodeType": "VariableDeclaration",
"scope": 6327,
"src": "1032:9:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6307,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1032:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1020:22:9"
},
"returnParameters": {
"id": 6312,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6311,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6327,
"src": "1066:7:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6310,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1066:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1065:9:9"
},
"scope": 6357,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"id": 6356,
"nodeType": "FunctionDefinition",
"src": "1165:192:9",
"nodes": [],
"body": {
"id": 6355,
"nodeType": "Block",
"src": "1239:118:9",
"nodes": [],
"statements": [
{
"assignments": [
6337
],
"declarations": [
{
"constant": false,
"id": 6337,
"mutability": "mutable",
"name": "absDelta",
"nameLocation": "1257:8:9",
"nodeType": "VariableDeclaration",
"scope": 6355,
"src": "1249:16:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6336,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1249:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 6342,
"initialValue": {
"arguments": [
{
"id": 6339,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6329,
"src": "1274:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
{
"id": 6340,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6331,
"src": "1277:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 6338,
"name": "delta",
"nodeType": "Identifier",
"overloadedDeclarations": [
6268,
6304
],
"referencedDeclaration": 6304,
"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": 6341,
"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": [
6344
],
"declarations": [
{
"constant": false,
"id": 6344,
"mutability": "mutable",
"name": "absB",
"nameLocation": "1297:4:9",
"nodeType": "VariableDeclaration",
"scope": 6355,
"src": "1289:12:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6343,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1289:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 6348,
"initialValue": {
"arguments": [
{
"id": 6346,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6331,
"src": "1308:1:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 6345,
"name": "abs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6247,
"src": "1304:3:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
"typeString": "function (int256) pure returns (uint256)"
}
},
"id": 6347,
"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": 6353,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6351,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6349,
"name": "absDelta",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6337,
"src": "1328:8:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"hexValue": "31653138",
"id": 6350,
"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": 6352,
"name": "absB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6344,
"src": "1346:4:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1328:22:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6335,
"id": 6354,
"nodeType": "Return",
"src": "1321:29:9"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "percentDelta",
"nameLocation": "1174:12:9",
"parameters": {
"id": 6332,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6329,
"mutability": "mutable",
"name": "a",
"nameLocation": "1194:1:9",
"nodeType": "VariableDeclaration",
"scope": 6356,
"src": "1187:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 6328,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1187:6:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6331,
"mutability": "mutable",
"name": "b",
"nameLocation": "1204:1:9",
"nodeType": "VariableDeclaration",
"scope": 6356,
"src": "1197:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 6330,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1197:6:9",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1186:20:9"
},
"returnParameters": {
"id": 6335,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6334,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6356,
"src": "1230:7:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6333,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1230:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1229:9:9"
},
"scope": 6357,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"abstract": false,
"baseContracts": [],
"canonicalName": "stdMath",
"contractDependencies": [],
"contractKind": "library",
"fullyImplemented": true,
"linearizedBaseContracts": [
6357
],
"name": "stdMath",
"nameLocation": "73:7:9",
"scope": 6358,
"usedErrors": []
}
],
"license": "MIT"
},
"id": 9
}