hardlydifficult-ethereum-contracts
Version:
A collection of reusable contracts and Javascript helpers for Ethereum.
997 lines • 79.4 kB
JSON
{
"contractName": "BigDivMock",
"abi": [
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "_numA",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_numB",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_den",
"type": "uint256"
}
],
"name": "bigDiv2x1",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "_numA",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_numB",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_den",
"type": "uint256"
}
],
"name": "bigDiv2x1RoundUp",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "_numA",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_numB",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_denA",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_denB",
"type": "uint256"
}
],
"name": "bigDiv2x2",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_den\",\"type\":\"uint256\"}],\"name\":\"bigDiv2x1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_den\",\"type\":\"uint256\"}],\"name\":\"bigDiv2x1RoundUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denB\",\"type\":\"uint256\"}],\"name\":\"bigDiv2x2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{},\"title\":\"Used for testing only.\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/circleci/repo/contracts/test-artifacts/BigDivMock.sol\":\"BigDivMock\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"/home/circleci/repo/contracts/math/BigDiv.sol\":{\"keccak256\":\"0xa5de5987f3c16748ca0e15511c3cd7539345ac13b3e3d7f6a12a38821fd99ade\",\"urls\":[\"bzz-raw://03ea66de02cc69e51688be492329ed542d5a11bc6c7cf62c0b979efa18e834de\",\"dweb:/ipfs/QmbAq2gGsCd4GJDfQRQG9LbQiT756WPk9wvLPaYqLbMvRv\"]},\"/home/circleci/repo/contracts/test-artifacts/BigDivMock.sol\":{\"keccak256\":\"0x487797c3c25250fb8b9b32473e9fab229ce31f9e1b0afcf2f3b4c522d0bca03b\",\"urls\":[\"bzz-raw://c523d44f83eaaea637d0f4b7f8a396903fb565832d8f526ef974cff48368e9ce\",\"dweb:/ipfs/QmQyG8Cmg158sy9jMvZkGnkDJkM7cUF2nEu8Z39Ni6D6yG\"]},\"@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506107b8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80632bab744114610046578063600caa5014610087578063a1d52ace146100b0575b600080fd5b6100756004803603608081101561005c57600080fd5b50803590602081013590604081013590606001356100d9565b60408051918252519081900360200190f35b6100756004803603606081101561009d57600080fd5b50803590602081013590604001356100f2565b610075600480360360608110156100c657600080fd5b5080359060208101359060400135610109565b60006100e785858585610116565b90505b949350505050565b60006100ff848484610375565b90505b9392505050565b60006100ff8484846105eb565b600081837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161014257fe5b041061015c576101558585848602610375565b90506100ea565b841580610167575083155b15610174575060006100ea565b8183818111156101845750839050825b600086887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816101b057fe5b04106101db57508686028181816101c357fe5b0490508281816101cf57fe5b0493506100ea92505050565b8688818111156101eb5750889050875b60008483816101f657fe5b049050630bebc20081111561021d57610210818388610375565b96505050505050506100ea565b506fffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff838101829004600190810192848301040190829082908161026d57fe5b041061030657810280848161027e57fe5b049450630bebc2008511156103065761029d858463ffffffff61067216565b94508585816102a857fe5b0494506000851180156102e4575080857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816102e057fe5b0410155b1561030657938402938685816102f657fe5b0497506100ea9650505050505050565b505070010000000000000000000000000000000085046fffffffffffffffffffffffffffffffff8504810261036581858161033d57fe5b04847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610375565b9c9b505050505050505050505050565b6000831580610382575082155b1561038f57506000610102565b600083857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816103bb57fe5b04106103d857508383028281816103ce57fe5b0491506101029050565b8385818111156103e85750859050845b8482816103f157fe5b0492506305f5e10083111561041b57610410838263ffffffff61067216565b935061010292505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81016fffffffffffffffffffffffffffffffff810460010190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83016fffffffffffffffffffffffffffffffff8104600101905080827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816104bb57fe5b041061054957908102908184816104ce57fe5b049450630bebc200851115610549576104ed858463ffffffff61067216565b9450507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181818161051c57fe5b04905061053081600163ffffffff6106ee16565b905080858161053b57fe5b049550610102945050505050565b60016fffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85010401915081838161058c57fe5b049450507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86018181816105bc57fe5b0460010190508084816105cb57fe5b0490506105de858263ffffffff61067216565b9998505050505050505050565b6000806105f9858585610375565b90508061060a576001915050610102565b60016305f5e1007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830104018119811115610669577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92505050610102565b01949350505050565b600082610681575060006106e8565b8282028284828161068e57fe5b04146106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806107636021913960400191505060405180910390fd5b90505b92915050565b6000828201838110156106e557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a7231582000e2a6e53da431ba880117e75310c417bf526a724fd255ef70b108fc1630bac464736f6c63430005110032",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80632bab744114610046578063600caa5014610087578063a1d52ace146100b0575b600080fd5b6100756004803603608081101561005c57600080fd5b50803590602081013590604081013590606001356100d9565b60408051918252519081900360200190f35b6100756004803603606081101561009d57600080fd5b50803590602081013590604001356100f2565b610075600480360360608110156100c657600080fd5b5080359060208101359060400135610109565b60006100e785858585610116565b90505b949350505050565b60006100ff848484610375565b90505b9392505050565b60006100ff8484846105eb565b600081837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161014257fe5b041061015c576101558585848602610375565b90506100ea565b841580610167575083155b15610174575060006100ea565b8183818111156101845750839050825b600086887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816101b057fe5b04106101db57508686028181816101c357fe5b0490508281816101cf57fe5b0493506100ea92505050565b8688818111156101eb5750889050875b60008483816101f657fe5b049050630bebc20081111561021d57610210818388610375565b96505050505050506100ea565b506fffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff838101829004600190810192848301040190829082908161026d57fe5b041061030657810280848161027e57fe5b049450630bebc2008511156103065761029d858463ffffffff61067216565b94508585816102a857fe5b0494506000851180156102e4575080857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816102e057fe5b0410155b1561030657938402938685816102f657fe5b0497506100ea9650505050505050565b505070010000000000000000000000000000000085046fffffffffffffffffffffffffffffffff8504810261036581858161033d57fe5b04847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610375565b9c9b505050505050505050505050565b6000831580610382575082155b1561038f57506000610102565b600083857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816103bb57fe5b04106103d857508383028281816103ce57fe5b0491506101029050565b8385818111156103e85750859050845b8482816103f157fe5b0492506305f5e10083111561041b57610410838263ffffffff61067216565b935061010292505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81016fffffffffffffffffffffffffffffffff810460010190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83016fffffffffffffffffffffffffffffffff8104600101905080827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816104bb57fe5b041061054957908102908184816104ce57fe5b049450630bebc200851115610549576104ed858463ffffffff61067216565b9450507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181818161051c57fe5b04905061053081600163ffffffff6106ee16565b905080858161053b57fe5b049550610102945050505050565b60016fffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85010401915081838161058c57fe5b049450507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86018181816105bc57fe5b0460010190508084816105cb57fe5b0490506105de858263ffffffff61067216565b9998505050505050505050565b6000806105f9858585610375565b90508061060a576001915050610102565b60016305f5e1007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830104018119811115610669577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92505050610102565b01949350505050565b600082610681575060006106e8565b8282028284828161068e57fe5b04146106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806107636021913960400191505060405180910390fd5b90505b92915050565b6000828201838110156106e557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a7231582000e2a6e53da431ba880117e75310c417bf526a724fd255ef70b108fc1630bac464736f6c63430005110032",
"sourceMap": "97:581:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;97:581:12;;;;;;;",
"deployedSourceMap": "97:581:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;97:581:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;479:197;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;479:197:12;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;121:168;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;121:168:12;;;;;;;;;;;;:::i;293:182::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;293:182:12;;;;;;;;;;;;:::i;479:197::-;603:7;627:44;644:5;651;658;665;627:16;:44::i;:::-;620:51;;479:197;;;;;;;:::o;121:168::-;224:7;248:36;265:5;272;279:4;248:16;:36::i;:::-;241:43;;121:168;;;;;;:::o;293:182::-;403:7;427:43;451:5;458;465:4;427:23;:43::i;4737:2127:4:-;4863:7;4903:5;4894;705:10;4883:16;;;;;;:25;4880:154;;4989:38;4999:5;5006;5021;5013;:13;4989:9;:38::i;:::-;4982:45;;;;4880:154;5043:10;;;:24;;-1:-1:-1;5057:10:4;;5043:24;5040:120;;;-1:-1:-1;5152:1:4;5145:8;;5040:120;5208:5;5236;5250:13;;;5247:73;;;-1:-1:-1;5286:5:4;;-1:-1:-1;5308:5:4;5247:73;5326:13;5369:5;5360;705:10;5349:16;;;;;;:25;5346:184;;-1:-1:-1;5444:13:4;;;5474:6;5444:13;5474:6;5465:15;;;;;;;5497:6;5488:15;;;;;;;;-1:-1:-1;5511:12:4;;-1:-1:-1;;;5511:12:4;5346:184;5634:5;5662;5676:13;;;5673:73;;;-1:-1:-1;5712:5:4;;-1:-1:-1;5734:5:4;5673:73;5783:12;5807:6;5798;:15;;;;;;;-1:-1:-1;1167:13:4;5822:27;;5819:89;;;5870:31;5880:4;5886:6;5894;5870:9;:31::i;:::-;5863:38;;;;;;;;;;5819:89;-1:-1:-1;844:10:4;6043;6116;;;6132:25;;;6102:1;6163:9;;;;6043:10;;;6059:27;6092:11;;6163:9;;6092:11;;;6181:17;;;;;:25;6178:360;;6220:14;;;6251:6;6220:14;6251:15;;;;;;-1:-1:-1;1167:13:4;6277:28;;6274:258;;;6331:17;:5;6341:6;6331:17;:9;:17;:::i;:::-;6323:25;;6367:6;6358:15;;;;;;;;;6394:1;6386:5;:9;:39;;;;;6419:6;6410:5;705:10;6399:16;;;;;;:26;;6386:39;6383:141;;;6447:15;;;;6483:6;6447:15;6483:6;6474:15;;;;;;-1:-1:-1;6501:12:4;;-1:-1:-1;;;;;;;6501:12:4;6383:141;-1:-1:-1;;6761:21:4;6753:29;;844:10;6652:27;;6788:14;;6815:44;6788:14;6825:6;6788:14;6825:15;;;;;6842:6;705:10;6815:9;:44::i;:::-;6808:51;4737:2127;-1:-1:-1;;;;;;;;;;;;4737:2127:4:o;1496:1644::-;1601:7;1621:10;;;:24;;-1:-1:-1;1635:10:4;;1621:24;1618:120;;;-1:-1:-1;1730:1:4;1723:8;;1618:120;1744:13;1787:5;1778;705:10;1767:16;;;;;;:25;1764:161;;-1:-1:-1;1864:13:4;;;1894:4;1864:13;1894:4;1885:13;;;;;;-1:-1:-1;1906:12:4;;-1:-1:-1;1906:12:4;1764:161;1971:5;1999;2013:13;;;2010:73;;;-1:-1:-1;2049:5:4;;-1:-1:-1;2071:5:4;2010:73;2106:4;2097:6;:13;;;;;;2089:21;;1019:9;2119:5;:17;2116:155;;;2227:17;:5;2237:6;2227:17;:9;:17;:::i;:::-;2219:25;-1:-1:-1;2252:12:4;;-1:-1:-1;;;2252:12:4;2116:155;2384:10;;;844;2384;2400:27;2443:1;2433:11;;-1:-1:-1;2465:10:4;;;844;2465;2481:25;2520:1;2512:9;;-1:-1:-1;2512:9:4;2541:6;705:10;2541:6;2530:17;;;;;:25;2527:306;;2569:14;;;;;2599:6;2569:14;2599:15;;;;;;-1:-1:-1;1167:13:4;2625:28;;2622:205;;;2679:17;:5;2689:6;2679:17;:9;:17;:::i;:::-;2671:25;-1:-1:-1;;2713:8:4;;;2739:6;2713:8;2739:6;2731:14;;;;;;-1:-1:-1;2762:11:4;2731:14;2771:1;2762:11;:8;:11;:::i;:::-;2755:18;;2792:4;2783:13;;;;;;;;-1:-1:-1;2806:12:4;;-1:-1:-1;;;;;2806:12:4;2622:205;2976:1;844:10;2917;;;2933:27;2966:11;;-1:-1:-1;2966:11:4;2917:10;2966:11;2991:15;;;;;;-1:-1:-1;;3019:8:4;;;3041:6;3019:8;3041:6;3033:14;;;;;3061:1;3053:9;;-1:-1:-1;3053:9:4;3075:6;3053:9;3075:13;;;;;;-1:-1:-1;3102:15:4;:5;3075:13;3102:15;:9;:15;:::i;:::-;3094:23;1496:1644;-1:-1:-1;;;;;;;;;1496:1644:4:o;3555:681::-;3667:7;3725:13;3741:29;3751:5;3758;3765:4;3741:9;:29::i;:::-;3725:45;-1:-1:-1;3780:10:4;3777:115;;3884:1;3877:8;;;;;3777:115;4074:1;1019:9;4028;;;4043:17;4066:9;4084:16;;-1:-1:-1;;4081:112:4;;;705:10;4171:15;;;;;;4081:112;4199:13;;3555:681;-1:-1:-1;;;;3555:681:4:o;2159:459:25:-;2217:7;2458:6;2454:45;;-1:-1:-1;2487:1:25;2480:8;;2454:45;2521:5;;;2525:1;2521;:5;:1;2544:5;;;;;:10;2536:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2610:1;-1:-1:-1;2159:459:25;;;;;:::o;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"source": "pragma solidity ^0.5.0;\n\n\nimport '../math/BigDiv.sol';\n\n/**\n * @title Used for testing only.\n */\ncontract BigDivMock\n{\n function bigDiv2x1(\n uint256 _numA,\n uint256 _numB,\n uint256 _den\n ) public pure\n returns(uint256)\n {\n return BigDiv.bigDiv2x1(_numA, _numB, _den);\n }\n\n function bigDiv2x1RoundUp(\n uint256 _numA,\n uint256 _numB,\n uint256 _den\n ) public pure\n returns(uint256)\n {\n return BigDiv.bigDiv2x1RoundUp(_numA, _numB, _den);\n }\n\n function bigDiv2x2(\n uint256 _numA,\n uint256 _numB,\n uint256 _denA,\n uint256 _denB\n ) public pure\n returns (uint256)\n {\n return BigDiv.bigDiv2x2(_numA, _numB, _denA, _denB);\n }\n}\n",
"sourcePath": "/home/circleci/repo/contracts/test-artifacts/BigDivMock.sol",
"ast": {
"absolutePath": "/home/circleci/repo/contracts/test-artifacts/BigDivMock.sol",
"exportedSymbols": {
"BigDivMock": [
1470
]
},
"id": 1471,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1408,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:12"
},
{
"absolutePath": "/home/circleci/repo/contracts/math/BigDiv.sol",
"file": "../math/BigDiv.sol",
"id": 1409,
"nodeType": "ImportDirective",
"scope": 1471,
"sourceUnit": 1156,
"src": "26:28:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Used for testing only.",
"fullyImplemented": true,
"id": 1470,
"linearizedBaseContracts": [
1470
],
"name": "BigDivMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1427,
"nodeType": "Block",
"src": "235:54:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1422,
"name": "_numA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1411,
"src": "265:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1423,
"name": "_numB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1413,
"src": "272:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1424,
"name": "_den",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1415,
"src": "279:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1420,
"name": "BigDiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1155,
"src": "248:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_BigDiv_$1155_$",
"typeString": "type(library BigDiv)"
}
},
"id": 1421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "bigDiv2x1",
"nodeType": "MemberAccess",
"referencedDeclaration": 861,
"src": "248:16:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 1425,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "248:36:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1419,
"id": 1426,
"nodeType": "Return",
"src": "241:43:12"
}
]
},
"documentation": null,
"id": 1428,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "bigDiv2x1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1416,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1411,
"name": "_numA",
"nodeType": "VariableDeclaration",
"scope": 1428,
"src": "145:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1410,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "145:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1413,
"name": "_numB",
"nodeType": "VariableDeclaration",
"scope": 1428,
"src": "164:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1412,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "164:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1415,
"name": "_den",
"nodeType": "VariableDeclaration",
"scope": 1428,
"src": "183:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1414,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "183:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "139:60:12"
},
"returnParameters": {
"id": 1419,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1418,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1428,
"src": "224:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1417,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "224:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "223:9:12"
},
"scope": 1470,
"src": "121:168:12",
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1446,
"nodeType": "Block",
"src": "414:61:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1441,
"name": "_numA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1430,
"src": "451:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1442,
"name": "_numB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1432,
"src": "458:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1443,
"name": "_den",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1434,
"src": "465:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1439,
"name": "BigDiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1155,
"src": "427:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_BigDiv_$1155_$",
"typeString": "type(library BigDiv)"
}
},
"id": 1440,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "bigDiv2x1RoundUp",
"nodeType": "MemberAccess",
"referencedDeclaration": 917,
"src": "427:23:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 1444,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "427:43:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1438,
"id": 1445,
"nodeType": "Return",
"src": "420:50:12"
}
]
},
"documentation": null,
"id": 1447,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "bigDiv2x1RoundUp",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1435,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1430,
"name": "_numA",
"nodeType": "VariableDeclaration",
"scope": 1447,
"src": "324:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1429,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "324:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1432,
"name": "_numB",
"nodeType": "VariableDeclaration",
"scope": 1447,
"src": "343:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1431,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "343:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1434,
"name": "_den",
"nodeType": "VariableDeclaration",
"scope": 1447,
"src": "362:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1433,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "362:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "318:60:12"
},
"returnParameters": {
"id": 1438,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1437,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1447,
"src": "403:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1436,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "403:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "402:9:12"
},
"scope": 1470,
"src": "293:182:12",
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1468,
"nodeType": "Block",
"src": "614:62:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1462,
"name": "_numA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1449,
"src": "644:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1463,
"name": "_numB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1451,
"src": "651:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1464,
"name": "_denA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1453,
"src": "658:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1465,
"name": "_denB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1455,
"src": "665:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1460,
"name": "BigDiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1155,
"src": "627:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_BigDiv_$1155_$",
"typeString": "type(library BigDiv)"
}
},
"id": 1461,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "bigDiv2x2",
"nodeType": "MemberAccess",
"referencedDeclaration": 1154,
"src": "627:16:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 1466,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "627:44:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1459,
"id": 1467,
"nodeType": "Return",
"src": "620:51:12"
}
]
},
"documentation": null,
"id": 1469,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "bigDiv2x2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1456,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1449,
"name": "_numA",
"nodeType": "VariableDeclaration",
"scope": 1469,
"src": "503:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1448,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "503:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1451,
"name": "_numB",
"nodeType": "VariableDeclaration",
"scope": 1469,
"src": "522:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1450,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "522:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1453,
"name": "_denA",
"nodeType": "VariableDeclaration",
"scope": 1469,
"src": "541:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1452,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "541:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1455,
"name": "_denB",
"nodeType": "VariableDeclaration",
"scope": 1469,
"src": "560:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1454,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "560:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "497:80:12"
},
"returnParameters": {
"id": 1459,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1458,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1469,
"src": "603:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1457,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "603:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "602:9:12"
},
"scope": 1470,
"src": "479:197:12",
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1471,
"src": "97:581:12"
}
],
"src": "0:679:12"
},
"legacyAST": {
"absolutePath": "/home/circleci/repo/contracts/test-artifacts/BigDivMock.sol",
"exportedSymbols": {
"BigDivMock": [
1470
]
},
"id": 1471,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1408,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:12"
},
{
"absolutePath": "/home/circleci/repo/contracts/math/BigDiv.sol",
"file": "../math/BigDiv.sol",
"id": 1409,
"nodeType": "ImportDirective",
"scope": 1471,
"sourceUnit": 1156,
"src": "26:28:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Used for testing only.",
"fullyImplemented": true,
"id": 1470,
"linearizedBaseContracts": [
1470
],
"name": "BigDivMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1427,
"nodeType": "Block",
"src": "235:54:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1422,
"name": "_numA",
"nodeType": "Identifier",
"overloadedDeclarations":