hardlydifficult-eth
Version:
A collection of reusable contracts and Javascript helpers for Ethereum.
992 lines (991 loc) • 84.8 kB
JSON
{
"contractName": "BigDivMock",
"abi": [
{
"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"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"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"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"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"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.10+commit.00c0fcaf\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"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\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"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\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{},\"title\":\"Used for testing only.\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/test-artifacts/BigDivMock.sol\":\"BigDivMock\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"project:/contracts/math/BigDiv.sol\":{\"keccak256\":\"0x2b9464c57ca4ed472debc814d6d5ddea6fc63e7c932220b21bd85f43b68d3861\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a9a1e15fb29e6985de6ee17002c3161aed478804a7e5c5d783a7dfbe7cf7454d\",\"dweb:/ipfs/QmWH4Loq4uujmJGryQGAPgR4r8yA1b99QwMo3dYkd29dEe\"]},\"project:/contracts/test-artifacts/BigDivMock.sol\":{\"keccak256\":\"0x3fd0bf644312283c36f7a8608fe5c72e5513b71bca5db1c5e7ee3e83e4b40b76\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e4c417a86cd1c9ebb5dc20500d52e0d9a0f9b66238da60b6fd645489fba4107\",\"dweb:/ipfs/QmSvCtENyY15daptDi61kBJyXgCuWHtzSAZYLM16DHWG2A\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506107b9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80632bab744114610046578063600caa5014610087578063a1d52ace146100b0575b600080fd5b6100756004803603608081101561005c57600080fd5b50803590602081013590604081013590606001356100d9565b60408051918252519081900360200190f35b6100756004803603606081101561009d57600080fd5b50803590602081013590604001356100f2565b610075600480360360608110156100c657600080fd5b5080359060208101359060400135610109565b60006100e785858585610116565b90505b949350505050565b60006100ff848484610375565b90505b9392505050565b60006100ff8484846105eb565b600081837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161014257fe5b041061015c576101558585848602610375565b90506100ea565b841580610167575083155b15610174575060006100ea565b8183818111156101845750839050825b600086887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816101b057fe5b04106101db57508686028181816101c357fe5b0490508281816101cf57fe5b0493506100ea92505050565b8688818111156101eb5750889050875b60008483816101f657fe5b049050630bebc20081111561021d57610210818388610375565b96505050505050506100ea565b506fffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff838101829004600190810192848301040190829082908161026d57fe5b041061030657810280848161027e57fe5b049450630bebc2008511156103065761029d858463ffffffff61067216565b94508585816102a857fe5b0494506000851180156102e4575080857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816102e057fe5b0410155b1561030657938402938685816102f657fe5b0497506100ea9650505050505050565b505070010000000000000000000000000000000085046fffffffffffffffffffffffffffffffff8504810261036581858161033d57fe5b04847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610375565b9c9b505050505050505050505050565b6000831580610382575082155b1561038f57506000610102565b600083857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816103bb57fe5b04106103d857508383028281816103ce57fe5b0491506101029050565b8385818111156103e85750859050845b8482816103f157fe5b0492506305f5e10083111561041b57610410838263ffffffff61067216565b935061010292505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81016fffffffffffffffffffffffffffffffff810460010190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83016fffffffffffffffffffffffffffffffff8104600101905080827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816104bb57fe5b041061054957908102908184816104ce57fe5b049450630bebc200851115610549576104ed858463ffffffff61067216565b9450507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181818161051c57fe5b04905061053081600163ffffffff6106ee16565b905080858161053b57fe5b049550610102945050505050565b60016fffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85010401915081838161058c57fe5b049450507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86018181816105bc57fe5b0460010190508084816105cb57fe5b0490506105de858263ffffffff61067216565b9998505050505050505050565b6000806105f9858585610375565b90508061060a576001915050610102565b60016305f5e1007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830104018119811115610669577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92505050610102565b01949350505050565b600082610681575060006106e8565b8282028284828161068e57fe5b04146106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806107636021913960400191505060405180910390fd5b90505b92915050565b6000828201838110156106e557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220ce860d367835eeb749a73cb4957edf8202050fc5f5bf131076959fb99f57767964736f6c634300060a0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80632bab744114610046578063600caa5014610087578063a1d52ace146100b0575b600080fd5b6100756004803603608081101561005c57600080fd5b50803590602081013590604081013590606001356100d9565b60408051918252519081900360200190f35b6100756004803603606081101561009d57600080fd5b50803590602081013590604001356100f2565b610075600480360360608110156100c657600080fd5b5080359060208101359060400135610109565b60006100e785858585610116565b90505b949350505050565b60006100ff848484610375565b90505b9392505050565b60006100ff8484846105eb565b600081837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161014257fe5b041061015c576101558585848602610375565b90506100ea565b841580610167575083155b15610174575060006100ea565b8183818111156101845750839050825b600086887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816101b057fe5b04106101db57508686028181816101c357fe5b0490508281816101cf57fe5b0493506100ea92505050565b8688818111156101eb5750889050875b60008483816101f657fe5b049050630bebc20081111561021d57610210818388610375565b96505050505050506100ea565b506fffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff838101829004600190810192848301040190829082908161026d57fe5b041061030657810280848161027e57fe5b049450630bebc2008511156103065761029d858463ffffffff61067216565b94508585816102a857fe5b0494506000851180156102e4575080857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816102e057fe5b0410155b1561030657938402938685816102f657fe5b0497506100ea9650505050505050565b505070010000000000000000000000000000000085046fffffffffffffffffffffffffffffffff8504810261036581858161033d57fe5b04847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610375565b9c9b505050505050505050505050565b6000831580610382575082155b1561038f57506000610102565b600083857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816103bb57fe5b04106103d857508383028281816103ce57fe5b0491506101029050565b8385818111156103e85750859050845b8482816103f157fe5b0492506305f5e10083111561041b57610410838263ffffffff61067216565b935061010292505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81016fffffffffffffffffffffffffffffffff810460010190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83016fffffffffffffffffffffffffffffffff8104600101905080827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816104bb57fe5b041061054957908102908184816104ce57fe5b049450630bebc200851115610549576104ed858463ffffffff61067216565b9450507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181818161051c57fe5b04905061053081600163ffffffff6106ee16565b905080858161053b57fe5b049550610102945050505050565b60016fffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85010401915081838161058c57fe5b049450507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86018181816105bc57fe5b0460010190508084816105cb57fe5b0490506105de858263ffffffff61067216565b9998505050505050505050565b6000806105f9858585610375565b90508061060a576001915050610102565b60016305f5e1007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830104018119811115610669577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92505050610102565b01949350505050565b600082610681575060006106e8565b8282028284828161068e57fe5b04146106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806107636021913960400191505060405180910390fd5b90505b92915050565b6000828201838110156106e557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220ce860d367835eeb749a73cb4957edf8202050fc5f5bf131076959fb99f57767964736f6c634300060a0033",
"immutableReferences": {},
"sourceMap": "129:581:22:-:0;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "129:581:22:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;511:197;;;;;;;;;;;;;;;;-1:-1:-1;511:197:22;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;153:168;;;;;;;;;;;;;;;;-1:-1:-1;153:168:22;;;;;;;;;;;;:::i;325:182::-;;;;;;;;;;;;;;;;-1:-1:-1;325:182:22;;;;;;;;;;;;:::i;511:197::-;635:7;659:44;676:5;683;690;697;659:16;:44::i;:::-;652:51;;511:197;;;;;;;:::o;153:168::-;256:7;280:36;297:5;304;311:4;280:16;:36::i;:::-;273:43;;153:168;;;;;;:::o;325:182::-;435:7;459:43;483:5;490;497:4;459:23;:43::i;4730:2127:11:-;4856:7;4896:5;4887;707:10;4876:16;;;;;;:25;4873:154;;4982:38;4992:5;4999;5014;5006;:13;4982:9;:38::i;:::-;4975:45;;;;4873:154;5036:10;;;:24;;-1:-1:-1;5050:10:11;;5036:24;5033:120;;;-1:-1:-1;5145:1:11;5138:8;;5033:120;5201:5;5229;5243:13;;;5240:73;;;-1:-1:-1;5279:5:11;;-1:-1:-1;5301:5:11;5240:73;5319:13;5362:5;5353;707:10;5342:16;;;;;;:25;5339:184;;-1:-1:-1;5437:13:11;;;5467:6;5437:13;5467:6;5458:15;;;;;;;5490:6;5481:15;;;;;;;;-1:-1:-1;5504:12:11;;-1:-1:-1;;;5504:12:11;5339:184;5627:5;5655;5669:13;;;5666:73;;;-1:-1:-1;5705:5:11;;-1:-1:-1;5727:5:11;5666:73;5776:12;5800:6;5791;:15;;;;;;;-1:-1:-1;1160:13:11;5815:27;;5812:89;;;5863:31;5873:4;5879:6;5887;5863:9;:31::i;:::-;5856:38;;;;;;;;;;5812:89;-1:-1:-1;843:10:11;6036;6109;;;6125:25;;;6095:1;6156:9;;;;6036:10;;;6052:27;6085:11;;6156:9;;6085:11;;;6174:17;;;;;:25;6171:360;;6213:14;;;6244:6;6213:14;6244:15;;;;;;-1:-1:-1;1160:13:11;6270:28;;6267:258;;;6324:17;:5;6334:6;6324:17;:9;:17;:::i;:::-;6316:25;;6360:6;6351:15;;;;;;;;;6387:1;6379:5;:9;:39;;;;;6412:6;6403:5;707:10;6392:16;;;;;;:26;;6379:39;6376:141;;;6440:15;;;;6476:6;6440:15;6476:6;6467:15;;;;;;-1:-1:-1;6494:12:11;;-1:-1:-1;;;;;;;6494:12:11;6376:141;-1:-1:-1;;6754:21:11;6746:29;;843:10;6645:27;;6781:14;;6808:44;6781:14;6818:6;6781:14;6818:15;;;;;6835:6;707:10;6808:9;:44::i;:::-;6801:51;4730:2127;-1:-1:-1;;;;;;;;;;;;4730:2127:11:o;1489:1644::-;1594:7;1614:10;;;:24;;-1:-1:-1;1628:10:11;;1614:24;1611:120;;;-1:-1:-1;1723:1:11;1716:8;;1611:120;1737:13;1780:5;1771;707:10;1760:16;;;;;;:25;1757:161;;-1:-1:-1;1857:13:11;;;1887:4;1857:13;1887:4;1878:13;;;;;;-1:-1:-1;1899:12:11;;-1:-1:-1;1899:12:11;1757:161;1964:5;1992;2006:13;;;2003:73;;;-1:-1:-1;2042:5:11;;-1:-1:-1;2064:5:11;2003:73;2099:4;2090:6;:13;;;;;;2082:21;;1015:9;2112:5;:17;2109:155;;;2220:17;:5;2230:6;2220:17;:9;:17;:::i;:::-;2212:25;-1:-1:-1;2245:12:11;;-1:-1:-1;;;2245:12:11;2109:155;2377:10;;;843;2377;2393:27;2436:1;2426:11;;-1:-1:-1;2458:10:11;;;843;2458;2474:25;2513:1;2505:9;;-1:-1:-1;2505:9:11;2534:6;707:10;2534:6;2523:17;;;;;:25;2520:306;;2562:14;;;;;2592:6;2562:14;2592:15;;;;;;-1:-1:-1;1160:13:11;2618:28;;2615:205;;;2672:17;:5;2682:6;2672:17;:9;:17;:::i;:::-;2664:25;-1:-1:-1;;2706:8:11;;;2732:6;2706:8;2732:6;2724:14;;;;;;-1:-1:-1;2755:11:11;2724:14;2764:1;2755:11;:8;:11;:::i;:::-;2748:18;;2785:4;2776:13;;;;;;;;-1:-1:-1;2799:12:11;;-1:-1:-1;;;;;2799:12:11;2615:205;2969:1;843:10;2910;;;2926:27;2959:11;;-1:-1:-1;2959:11:11;2910:10;2959:11;2984:15;;;;;;-1:-1:-1;;3012:8:11;;;3034:6;3012:8;3034:6;3026:14;;;;;3054:1;3046:9;;-1:-1:-1;3046:9:11;3068:6;3046:9;3068:13;;;;;;-1:-1:-1;3095:15:11;:5;3068:13;3095:15;:9;:15;:::i;:::-;3087:23;1489:1644;-1:-1:-1;;;;;;;;;1489:1644:11:o;3548:681::-;3660:7;3718:13;3734:29;3744:5;3751;3758:4;3734:9;:29::i;:::-;3718:45;-1:-1:-1;3773:10:11;3770:115;;3877:1;3870:8;;;;;3770:115;4067:1;1015:9;4021;;;4036:17;4059:9;4077:16;;-1:-1:-1;;4074:112:11;;;707:10;4164:15;;;;;;4074:112;4192:13;;3548:681;-1:-1:-1;;;;3548:681:11:o;3538:215:0:-;3596:7;3619:6;3615:20;;-1:-1:-1;3634:1:0;3627:8;;3615:20;3657:5;;;3661:1;3657;:5;:1;3680:5;;;;;:10;3672:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3745:1;-1:-1:-1;3538:215:0;;;;;:::o;2690:175::-;2748:7;2779:5;;;2802:6;;;;2794:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.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": "project:/contracts/test-artifacts/BigDivMock.sol",
"exportedSymbols": {
"BigDivMock": [
3876
]
},
"id": 3877,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3813,
"literals": [
"solidity",
"^",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "32:23:22"
},
{
"absolutePath": "project:/contracts/math/BigDiv.sol",
"file": "../math/BigDiv.sol",
"id": 3814,
"nodeType": "ImportDirective",
"scope": 3877,
"sourceUnit": 2790,
"src": "58:28:22",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 3815,
"nodeType": "StructuredDocumentation",
"src": "88:40:22",
"text": " @title Used for testing only."
},
"fullyImplemented": true,
"id": 3876,
"linearizedBaseContracts": [
3876
],
"name": "BigDivMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 3833,
"nodeType": "Block",
"src": "267:54:22",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3828,
"name": "_numA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3817,
"src": "297:5:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3829,
"name": "_numB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3819,
"src": "304:5:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3830,
"name": "_den",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3821,
"src": "311:4:22",
"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": 3826,
"name": "BigDiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2789,
"src": "280:6:22",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_BigDiv_$2789_$",
"typeString": "type(library BigDiv)"
}
},
"id": 3827,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "bigDiv2x1",
"nodeType": "MemberAccess",
"referencedDeclaration": 2493,
"src": "280:16:22",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 3831,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "280:36:22",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3825,
"id": 3832,
"nodeType": "Return",
"src": "273:43:22"
}
]
},
"documentation": null,
"functionSelector": "600caa50",
"id": 3834,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "bigDiv2x1",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3822,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3817,
"mutability": "mutable",
"name": "_numA",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3834,
"src": "177:13:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3816,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "177:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3819,
"mutability": "mutable",
"name": "_numB",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3834,
"src": "196:13:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3818,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "196:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3821,
"mutability": "mutable",
"name": "_den",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3834,
"src": "215:12:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3820,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "215:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "171:60:22"
},
"returnParameters": {
"id": 3825,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3824,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3834,
"src": "256:7:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3823,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "256:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "255:9:22"
},
"scope": 3876,
"src": "153:168:22",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3852,
"nodeType": "Block",
"src": "446:61:22",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3847,
"name": "_numA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3836,
"src": "483:5:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3848,
"name": "_numB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3838,
"src": "490:5:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3849,
"name": "_den",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3840,
"src": "497:4:22",
"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": 3845,
"name": "BigDiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2789,
"src": "459:6:22",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_BigDiv_$2789_$",
"typeString": "type(library BigDiv)"
}
},
"id": 3846,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "bigDiv2x1RoundUp",
"nodeType": "MemberAccess",
"referencedDeclaration": 2550,
"src": "459:23:22",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 3850,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "459:43:22",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3844,
"id": 3851,
"nodeType": "Return",
"src": "452:50:22"
}
]
},
"documentation": null,
"functionSelector": "a1d52ace",
"id": 3853,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "bigDiv2x1RoundUp",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3841,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3836,
"mutability": "mutable",
"name": "_numA",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3853,
"src": "356:13:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3835,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "356:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3838,
"mutability": "mutable",
"name": "_numB",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3853,
"src": "375:13:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3837,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "375:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3840,
"mutability": "mutable",
"name": "_den",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3853,
"src": "394:12:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3839,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "394:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "350:60:22"
},
"returnParameters": {
"id": 3844,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3843,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3853,
"src": "435:7:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3842,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "435:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "434:9:22"
},
"scope": 3876,
"src": "325:182:22",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3874,
"nodeType": "Block",
"src": "646:62:22",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3868,
"name": "_numA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3855,
"src": "676:5:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3869,
"name": "_numB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3857,
"src": "683:5:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3870,
"name": "_denA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3859,
"src": "690:5:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3871,
"name": "_denB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3861,
"src": "697:5:22",
"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": 3866,
"name": "BigDiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2789,
"src": "659:6:22",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_BigDiv_$2789_$",
"typeString": "type(library BigDiv)"
}
},
"id": 3867,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "bigDiv2x2",
"nodeType": "MemberAccess",
"referencedDeclaration": 2788,
"src": "659:16:22",
"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": 3872,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "659:44:22",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3865,
"id": 3873,
"nodeType": "Return",
"src": "652:51:22"
}
]
},
"documentation": null,
"functionSelector": "2bab7441",
"id": 3875,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "bigDiv2x2",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3862,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3855,
"mutability": "mutable",
"name": "_numA",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3875,
"src": "535:13:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3854,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "535:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3857,
"mutability": "mutable",
"name": "_numB",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3875,
"src": "554:13:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3856,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "554:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3859,
"mutability": "mutable",
"name": "_denA",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3875,
"src": "573:13:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3858,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "573:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3861,
"mutability": "mutable",
"name": "_denB",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3875,
"src": "592:13:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3860,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "592:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "529:80:22"
},
"returnParameters": {
"id": 3865,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3864,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3875,
"src": "635:7:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3863,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "635:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "634:9:22"
},
"scope": 3876,
"src": "511:197:22",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 3877,
"src": "129:581:22"
}
],
"src": "32:679:22"
},
"legacyAST": {
"attributes": {
"absolutePath": "project:/contracts/test-artifacts/BigDivMock.sol",
"exportedSymbols": {
"BigDivMock": [
3876
]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.6",
".0"