Skip to content

Instantly share code, notes, and snippets.

@nola11
Created May 14, 2022 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nola11/e535c97ce612159ffd38890f6682516c to your computer and use it in GitHub Desktop.
Save nola11/e535c97ce612159ffd38890f6682516c to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
{
"id": "7b385af24c44038ea46720d543c52f68",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.4.26",
"solcLongVersion": "0.4.26+commit.4563c3fc",
"input": {
"language": "Solidity",
"sources": {
"Metafork/MetaUFO.sol": {
"content": ""
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"contracts": {},
"errors": [
{
"component": "general",
"formattedMessage": "Metafork/MetaUFO.sol:1:1: Warning: Source file does not specify required compiler version!Consider adding \"pragma solidity ^0.4.26;\"\n\n^\n",
"message": "Source file does not specify required compiler version!Consider adding \"pragma solidity ^0.4.26;\"",
"severity": "warning",
"sourceLocation": {
"end": 0,
"file": "Metafork/MetaUFO.sol",
"start": 0
},
"type": "Warning"
}
],
"sources": {
"Metafork/MetaUFO.sol": {
"ast": {
"absolutePath": "Metafork/MetaUFO.sol",
"exportedSymbols": {},
"id": 1,
"nodeType": "SourceUnit",
"nodes": [],
"src": "0:0:0"
},
"id": 0
}
}
}
}
{
"id": "9a53c0ccb363d850410bb20c8694e4d9",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.12",
"solcLongVersion": "0.6.12+commit.27d51765",
"input": {
"language": "Solidity",
"sources": {
"Metafork/ERC20.sol": {
"content": ""
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"errors": [
{
"component": "general",
"errorCode": "1878",
"formattedMessage": "Metafork/ERC20.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n",
"message": "SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "Metafork/ERC20.sol",
"start": -1
},
"type": "Warning"
},
{
"component": "general",
"errorCode": "3420",
"formattedMessage": "Metafork/ERC20.sol: Warning: Source file does not specify required compiler version! Consider adding \"pragma solidity ^0.6.12;\"\n",
"message": "Source file does not specify required compiler version! Consider adding \"pragma solidity ^0.6.12;\"",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "Metafork/ERC20.sol",
"start": -1
},
"type": "Warning"
}
],
"sources": {
"Metafork/ERC20.sol": {
"ast": {
"absolutePath": "Metafork/ERC20.sol",
"exportedSymbols": {},
"id": 1,
"license": null,
"nodeType": "SourceUnit",
"nodes": [],
"src": "0:0:0"
},
"id": 0
}
}
}
}
{
"id": "ada7d04f7b3a5227c3f635879af96394",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.12",
"solcLongVersion": "0.6.12+commit.27d51765",
"input": {
"language": "Solidity",
"sources": {
"Metafork/Timer.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity 0.6.12;\nimport \"./SafeMath.sol\";\n\nlibrary Timer{\n using SafeMath for uint256;\n struct Expire{\n uint256 popTotal;\n uint256 pushTotal;\n }\n\n struct Timing{\n uint256 from;\n uint256 to;\n uint256 finish;\n }\n\n function push(Expire storage timer,uint256 quantity) internal{\n timer.pushTotal = timer.pushTotal.add(quantity);\n }\n\n function pop(Expire storage timer,Timing memory timing,uint256 quantity,uint256 tsp) internal returns(uint256 last){\n last = quantity;\n uint256 balance = expected(timer,timing,tsp);\n if(quantity>0&&balance>0){\n if(quantity>=balance){\n timer.popTotal = timer.popTotal.add(balance);\n last = quantity.sub(balance);\n }else{\n timer.popTotal = timer.popTotal.add(quantity);\n last = 0;\n }\n }\n }\n\n function expected(Expire storage timer,Timing memory timing,uint256 tsp)internal view returns(uint256){\n uint256 balance = 0;\n if(timer.pushTotal > timer.popTotal && timing.from > 0 && tsp > timing.from){\n if(tsp>timing.to){\n balance = timer.pushTotal.sub(timer.popTotal);\n }else{\n balance = timer.pushTotal.mul(tsp.sub(timing.from)).div(timing.to.sub(timing.from));\n if(timer.popTotal>=balance){\n balance = 0;\n }else{\n balance = balance.sub(timer.popTotal);\n }\n }\n }\n return balance;\n }\n }"
},
"Metafork/SafeMath.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity 0.6.12;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\n library SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"SafeMath: subtraction overflow\");\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\n return a / b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a / b;\n }\n }"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"contracts": {
"Metafork/SafeMath.sol": {
"SafeMath": {
"abi": [],
"devdoc": {
"details": "Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"Metafork/SafeMath.sol\":699:30382 library SafeMath {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n invalid\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"Metafork/SafeMath.sol\":699:30382 library SafeMath {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033\n}\n",
"bytecode": {
"linkReferences": {},
"object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033",
"opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4E 0xCF DUP8 POP PUSH14 0x36DE3F3D68C103FBDF40F1CDD3F4 0x4F DUP3 PUSH26 0xB759ADF8A198937C0CB664736F6C634300060C00330000000000 ",
"sourceMap": "699:29683:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4E 0xCF DUP8 POP PUSH14 0x36DE3F3D68C103FBDF40F1CDD3F4 0x4F DUP3 PUSH26 0xB759ADF8A198937C0CB664736F6C634300060C00330000000000 ",
"sourceMap": "699:29683:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"add(uint256,uint256)": "infinite",
"div(uint256,uint256)": "infinite",
"div(uint256,uint256,string memory)": "infinite",
"mul(uint256,uint256)": "infinite",
"sub(uint256,uint256)": "infinite",
"sub(uint256,uint256,string memory)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 699,
"end": 30382,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 699,
"end": 30382,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 699,
"end": 30382,
"name": "DUP3",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP3",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP3",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "CODECOPY",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP1",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "MLOAD",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 699,
"end": 30382,
"name": "BYTE",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 699,
"end": 30382,
"name": "EQ",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 699,
"end": 30382,
"name": "JUMPI",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "INVALID",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 699,
"end": 30382,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "ADDRESS",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 699,
"end": 30382,
"name": "MSTORE",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 699,
"end": 30382,
"name": "DUP2",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "MSTORE8",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP3",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP2",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033",
".code": [
{
"begin": 699,
"end": 30382,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "ADDRESS",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "EQ",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 699,
"end": 30382,
"name": "MSTORE",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 699,
"end": 30382,
"name": "DUP1",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "REVERT",
"source": 0
}
]
}
}
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"Metafork/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"Metafork/SafeMath.sol\":{\"keccak256\":\"0xeb2155b494c02a28edd7a4bbc4947a01cf490d39a64cfcd2dcd866f7f548fa2d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f8634e4bf00c93b1356688c951f397dc8b118c789eeb9bd5150d0dcc986f9cd\",\"dweb:/ipfs/QmcPqk2vfyYirb1s1pVZJjs8hKGKPv5U1yZByZQPN3ibfs\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
},
"Metafork/Timer.sol": {
"Timer": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"Metafork/Timer.sol\":82:9170 library Timer{... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n invalid\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"Metafork/Timer.sol\":82:9170 library Timer{... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212201f7445095d6d65984b961a8ad5c8cc46226f004afa1527bbb1e721848f1064e364736f6c634300060c0033\n}\n",
"bytecode": {
"linkReferences": {},
"object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201f7445095d6d65984b961a8ad5c8cc46226f004afa1527bbb1e721848f1064e364736f6c634300060c0033",
"opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x1F PUSH21 0x45095D6D65984B961A8AD5C8CC46226F004AFA1527 0xBB 0xB1 0xE7 0x21 DUP5 DUP16 LT PUSH5 0xE364736F6C PUSH4 0x4300060C STOP CALLER ",
"sourceMap": "82:9088:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201f7445095d6d65984b961a8ad5c8cc46226f004afa1527bbb1e721848f1064e364736f6c634300060c0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x1F PUSH21 0x45095D6D65984B961A8AD5C8CC46226F004AFA1527 0xBB 0xB1 0xE7 0x21 DUP5 DUP16 LT PUSH5 0xE364736F6C PUSH4 0x4300060C STOP CALLER ",
"sourceMap": "82:9088:1:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"expected(struct Timer.Expire storage pointer,struct Timer.Timing memory,uint256)": "infinite",
"pop(struct Timer.Expire storage pointer,struct Timer.Timing memory,uint256,uint256)": "infinite",
"push(struct Timer.Expire storage pointer,uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 82,
"end": 9170,
"name": "PUSH #[$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 82,
"end": 9170,
"name": "PUSH [$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 82,
"end": 9170,
"name": "PUSH",
"source": 1,
"value": "B"
},
{
"begin": 82,
"end": 9170,
"name": "DUP3",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "DUP3",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "DUP3",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "CODECOPY",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "DUP1",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "MLOAD",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 82,
"end": 9170,
"name": "BYTE",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 82,
"end": 9170,
"name": "EQ",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "PUSH [tag]",
"source": 1,
"value": "1"
},
{
"begin": 82,
"end": 9170,
"name": "JUMPI",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "INVALID",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "tag",
"source": 1,
"value": "1"
},
{
"begin": 82,
"end": 9170,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "ADDRESS",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 82,
"end": 9170,
"name": "MSTORE",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 82,
"end": 9170,
"name": "DUP2",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "MSTORE8",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "DUP3",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "DUP2",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "RETURN",
"source": 1
}
],
".data": {
"0": {
".auxdata": "a26469706673582212201f7445095d6d65984b961a8ad5c8cc46226f004afa1527bbb1e721848f1064e364736f6c634300060c0033",
".code": [
{
"begin": 82,
"end": 9170,
"name": "PUSHDEPLOYADDRESS",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "ADDRESS",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "EQ",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "PUSH",
"source": 1,
"value": "80"
},
{
"begin": 82,
"end": 9170,
"name": "PUSH",
"source": 1,
"value": "40"
},
{
"begin": 82,
"end": 9170,
"name": "MSTORE",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 82,
"end": 9170,
"name": "DUP1",
"source": 1
},
{
"begin": 82,
"end": 9170,
"name": "REVERT",
"source": 1
}
]
}
}
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"Metafork/Timer.sol\":\"Timer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"Metafork/SafeMath.sol\":{\"keccak256\":\"0xeb2155b494c02a28edd7a4bbc4947a01cf490d39a64cfcd2dcd866f7f548fa2d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f8634e4bf00c93b1356688c951f397dc8b118c789eeb9bd5150d0dcc986f9cd\",\"dweb:/ipfs/QmcPqk2vfyYirb1s1pVZJjs8hKGKPv5U1yZByZQPN3ibfs\"]},\"Metafork/Timer.sol\":{\"keccak256\":\"0xdd36f14d62d97f70deb6eeed65ef228e6dfeb3d9b9c4084eebf02b303ea2d736\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dcc63c907b11039f2b21bbe77bb51c5e809189d5ed874376d00b4d3e8fc39aec\",\"dweb:/ipfs/QmPFnnt2JCeaSjQSLv5hqxLQ3dbb6QQUZNPzzg8kpA5Jxk\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"Metafork/SafeMath.sol": {
"ast": {
"absolutePath": "Metafork/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
155
]
},
"id": 156,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "32:23:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "57:629:0",
"text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always."
},
"fullyImplemented": true,
"id": 155,
"linearizedBaseContracts": [
155
],
"name": "SafeMath",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 27,
"nodeType": "Block",
"src": "1415:416:0",
"statements": [
{
"assignments": [
13
],
"declarations": [
{
"constant": false,
"id": 13,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 27,
"src": "1490:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1490:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 17,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 16,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 14,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1502:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 15,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "1506:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1502:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1490:17:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 19,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "1598:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 20,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1603:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1598:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77",
"id": 22,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1606:29:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"typeString": "literal_string \"SafeMath: addition overflow\""
},
"value": "SafeMath: addition overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"typeString": "literal_string \"SafeMath: addition overflow\""
}
],
"id": 18,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1590:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 23,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1590:46:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 24,
"nodeType": "ExpressionStatement",
"src": "1590:46:0"
},
{
"expression": {
"argumentTypes": null,
"id": 25,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "1734:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 11,
"id": 26,
"nodeType": "Return",
"src": "1727:8:0"
}
]
},
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "734:548:0",
"text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow."
},
"id": 28,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 28,
"src": "1361:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1361:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 28,
"src": "1372:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1372:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1360:22:0"
},
"returnParameters": {
"id": 11,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 28,
"src": "1406:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 9,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1406:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1405:9:0"
},
"scope": 155,
"src": "1348:483:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 49,
"nodeType": "Block",
"src": "3457:550:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 41,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 39,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33,
"src": "3621:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 40,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "3626:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3621:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77",
"id": 42,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3629:32:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
},
"value": "SafeMath: subtraction overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
}
],
"id": 38,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "3613:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 43,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3613:49:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 44,
"nodeType": "ExpressionStatement",
"src": "3613:49:0"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 45,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "3833:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 46,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33,
"src": "3837:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3833:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 37,
"id": 48,
"nodeType": "Return",
"src": "3826:12:0"
}
]
},
"documentation": {
"id": 29,
"nodeType": "StructuredDocumentation",
"src": "1930:1313:0",
"text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 50,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 34,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 31,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 50,
"src": "3403:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 30,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3403:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 33,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 50,
"src": "3414:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 32,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3414:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3402:22:0"
},
"returnParameters": {
"id": 37,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 36,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 50,
"src": "3448:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 35,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3448:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3447:9:0"
},
"scope": 155,
"src": "3390:617:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 83,
"nodeType": "Block",
"src": "6412:1323:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 62,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 60,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 53,
"src": "6645:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 61,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6650:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6645:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 65,
"nodeType": "IfStatement",
"src": "6641:20:0",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6660:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 59,
"id": 64,
"nodeType": "Return",
"src": "6653:8:0"
}
},
{
"assignments": [
67
],
"declarations": [
{
"constant": false,
"id": 67,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 83,
"src": "6898:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 66,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6898:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 71,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 70,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 68,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 53,
"src": "6910:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"id": 69,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55,
"src": "6914:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6910:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6898:17:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 77,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 75,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 73,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 67,
"src": "7168:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 74,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 53,
"src": "7172:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7168:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 76,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55,
"src": "7177:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7168:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77",
"id": 78,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7180:35:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3",
"typeString": "literal_string \"SafeMath: multiplication overflow\""
},
"value": "SafeMath: multiplication overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3",
"typeString": "literal_string \"SafeMath: multiplication overflow\""
}
],
"id": 72,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "7160:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 79,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7160:56:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 80,
"nodeType": "ExpressionStatement",
"src": "7160:56:0"
},
{
"expression": {
"argumentTypes": null,
"id": 81,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 67,
"src": "7476:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 59,
"id": 82,
"nodeType": "Return",
"src": "7469:8:0"
}
]
},
"documentation": {
"id": 51,
"nodeType": "StructuredDocumentation",
"src": "4179:1946:0",
"text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow."
},
"id": 84,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mul",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 56,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 53,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 84,
"src": "6358:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 52,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6358:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 55,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 84,
"src": "6369:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 54,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6369:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6357:22:0"
},
"returnParameters": {
"id": 59,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 58,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 84,
"src": "6403:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 57,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6403:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6402:9:0"
},
"scope": 155,
"src": "6345:1390:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 105,
"nodeType": "Block",
"src": "11959:1061:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 95,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 89,
"src": "12295:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 96,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12299:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "12295:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206469766973696f6e206279207a65726f",
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12302:28:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f",
"typeString": "literal_string \"SafeMath: division by zero\""
},
"value": "SafeMath: division by zero"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f",
"typeString": "literal_string \"SafeMath: division by zero\""
}
],
"id": 94,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "12287:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12287:44:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 100,
"nodeType": "ExpressionStatement",
"src": "12287:44:0"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 101,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 87,
"src": "12674:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 102,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 89,
"src": "12678:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "12674:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 93,
"id": 104,
"nodeType": "Return",
"src": "12667:12:0"
}
]
},
"documentation": {
"id": 85,
"nodeType": "StructuredDocumentation",
"src": "7996:3577:0",
"text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 106,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 90,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 87,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 106,
"src": "11905:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 86,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11905:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 89,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 106,
"src": "11916:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 88,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11916:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "11904:22:0"
},
"returnParameters": {
"id": 93,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 92,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 106,
"src": "11950:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 91,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11950:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "11949:9:0"
},
"scope": 155,
"src": "11892:1128:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 129,
"nodeType": "Block",
"src": "18767:1313:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 121,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 119,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 111,
"src": "19192:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 120,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 109,
"src": "19197:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19192:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 122,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 113,
"src": "19200:12:0",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 118,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "19184:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19184:29:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 124,
"nodeType": "ExpressionStatement",
"src": "19184:29:0"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 125,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 109,
"src": "19645:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 126,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 111,
"src": "19649:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19645:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 117,
"id": 128,
"nodeType": "Return",
"src": "19638:12:0"
}
]
},
"documentation": {
"id": 107,
"nodeType": "StructuredDocumentation",
"src": "13365:4899:0",
"text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {trySub}.\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 130,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 114,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 109,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 130,
"src": "18685:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 108,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "18685:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 111,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 130,
"src": "18696:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 110,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "18696:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 113,
"mutability": "mutable",
"name": "errorMessage",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 130,
"src": "18707:26:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 112,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "18707:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "18684:50:0"
},
"returnParameters": {
"id": 117,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 116,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 130,
"src": "18758:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 115,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "18758:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "18757:9:0"
},
"scope": 155,
"src": "18672:1408:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 153,
"nodeType": "Block",
"src": "28249:1606:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 145,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 143,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 135,
"src": "28772:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 144,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "28776:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "28772:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 146,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 137,
"src": "28779:12:0",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 142,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "28764:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 147,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "28764:28:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 148,
"nodeType": "ExpressionStatement",
"src": "28764:28:0"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 151,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 149,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 133,
"src": "29322:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 150,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 135,
"src": "29326:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "29322:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 141,
"id": 152,
"nodeType": "Return",
"src": "29315:12:0"
}
]
},
"documentation": {
"id": 131,
"nodeType": "StructuredDocumentation",
"src": "20513:7135:0",
"text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryDiv}.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 154,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 138,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 133,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 154,
"src": "28167:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 132,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "28167:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 135,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 154,
"src": "28178:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 134,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "28178:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 137,
"mutability": "mutable",
"name": "errorMessage",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 154,
"src": "28189:26:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 136,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "28189:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "28166:50:0"
},
"returnParameters": {
"id": 141,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 140,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 154,
"src": "28240:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 139,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "28240:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "28239:9:0"
},
"scope": 155,
"src": "28154:1701:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 156,
"src": "699:29683:0"
}
],
"src": "32:30350:0"
},
"id": 0
},
"Metafork/Timer.sol": {
"ast": {
"absolutePath": "Metafork/Timer.sol",
"exportedSymbols": {
"Timer": [
354
]
},
"id": 355,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 157,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "32:23:1"
},
{
"absolutePath": "Metafork/SafeMath.sol",
"file": "./SafeMath.sol",
"id": 158,
"nodeType": "ImportDirective",
"scope": 355,
"sourceUnit": 156,
"src": "56:24:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 354,
"linearizedBaseContracts": [
354
],
"name": "Timer",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 161,
"libraryName": {
"contractScope": null,
"id": 159,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 155,
"src": "107:8:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$155",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "101:27:1",
"typeName": {
"id": 160,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "120:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "Timer.Expire",
"id": 166,
"members": [
{
"constant": false,
"id": 163,
"mutability": "mutable",
"name": "popTotal",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 166,
"src": "168:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 162,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "168:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 165,
"mutability": "mutable",
"name": "pushTotal",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 166,
"src": "210:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 164,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "210:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Expire",
"nodeType": "StructDefinition",
"scope": 354,
"src": "137:121:1",
"visibility": "public"
},
{
"canonicalName": "Timer.Timing",
"id": 173,
"members": [
{
"constant": false,
"id": 168,
"mutability": "mutable",
"name": "from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 173,
"src": "347:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 167,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "347:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 170,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 173,
"src": "409:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 169,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "409:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 172,
"mutability": "mutable",
"name": "finish",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 173,
"src": "477:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 171,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "477:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Timing",
"nodeType": "StructDefinition",
"scope": 354,
"src": "292:262:1",
"visibility": "public"
},
{
"body": {
"id": 190,
"nodeType": "Block",
"src": "681:200:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 188,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 180,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 175,
"src": "755:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 182,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "pushTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 165,
"src": "755:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 186,
"name": "quantity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 177,
"src": "793:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 183,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 175,
"src": "773:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 184,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "pushTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 165,
"src": "773:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 28,
"src": "773:19:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 187,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "773:29:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "755:47:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 189,
"nodeType": "ExpressionStatement",
"src": "755:47:1"
}
]
},
"documentation": null,
"id": 191,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "push",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 178,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 175,
"mutability": "mutable",
"name": "timer",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 191,
"src": "634:20:1",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire"
},
"typeName": {
"contractScope": null,
"id": 174,
"name": "Expire",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 166,
"src": "634:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 177,
"mutability": "mutable",
"name": "quantity",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 191,
"src": "655:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 176,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "655:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "633:39:1"
},
"returnParameters": {
"id": 179,
"nodeType": "ParameterList",
"parameters": [],
"src": "681:0:1"
},
"scope": 354,
"src": "620:261:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 262,
"nodeType": "Block",
"src": "1078:2104:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 206,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 204,
"name": "last",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 202,
"src": "1168:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 205,
"name": "quantity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 197,
"src": "1175:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1168:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 207,
"nodeType": "ExpressionStatement",
"src": "1168:15:1"
},
{
"assignments": [
209
],
"declarations": [
{
"constant": false,
"id": 209,
"mutability": "mutable",
"name": "balance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 262,
"src": "1281:15:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 208,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1281:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 215,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 211,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 193,
"src": "1308:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
{
"argumentTypes": null,
"id": 212,
"name": "timing",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 195,
"src": "1314:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing memory"
}
},
{
"argumentTypes": null,
"id": 213,
"name": "tsp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 199,
"src": "1321:3:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
},
{
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing memory"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 210,
"name": "expected",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 353,
"src": "1299:8:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_Expire_$166_storage_ptr_$_t_struct$_Timing_$173_memory_ptr_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (struct Timer.Expire storage pointer,struct Timer.Timing memory,uint256) view returns (uint256)"
}
},
"id": 214,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1299:26:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1281:44:1"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 222,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 218,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 216,
"name": "quantity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 197,
"src": "1434:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 217,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1443:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1434:10:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 221,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 219,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 209,
"src": "1446:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 220,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1454:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1446:9:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1434:21:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 261,
"nodeType": "IfStatement",
"src": "1431:1533:1",
"trueBody": {
"id": 260,
"nodeType": "Block",
"src": "1456:1508:1",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 223,
"name": "quantity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 197,
"src": "1577:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 224,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 209,
"src": "1587:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1577:17:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 258,
"nodeType": "Block",
"src": "2118:632:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 252,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 244,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 193,
"src": "2296:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 246,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "popTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "2296:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 250,
"name": "quantity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 197,
"src": "2332:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 247,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 193,
"src": "2313:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 248,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "popTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "2313:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 249,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 28,
"src": "2313:18:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 251,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2313:28:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2296:45:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 253,
"nodeType": "ExpressionStatement",
"src": "2296:45:1"
},
{
"expression": {
"argumentTypes": null,
"id": 256,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 254,
"name": "last",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 202,
"src": "2535:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 255,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2542:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2535:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 257,
"nodeType": "ExpressionStatement",
"src": "2535:8:1"
}
]
},
"id": 259,
"nodeType": "IfStatement",
"src": "1574:1176:1",
"trueBody": {
"id": 243,
"nodeType": "Block",
"src": "1595:519:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 234,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 226,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 193,
"src": "1729:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 228,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "popTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "1729:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 232,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 209,
"src": "1765:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 229,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 193,
"src": "1746:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 230,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "popTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "1746:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 231,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 28,
"src": "1746:18:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 233,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1746:27:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1729:44:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 235,
"nodeType": "ExpressionStatement",
"src": "1729:44:1"
},
{
"expression": {
"argumentTypes": null,
"id": 241,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 236,
"name": "last",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 202,
"src": "1923:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 239,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 209,
"src": "1943:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 237,
"name": "quantity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 197,
"src": "1930:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 238,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 50,
"src": "1930:12:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 240,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1930:21:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1923:28:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 242,
"nodeType": "ExpressionStatement",
"src": "1923:28:1"
}
]
}
}
]
}
}
]
},
"documentation": null,
"id": 263,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "pop",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 200,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 193,
"mutability": "mutable",
"name": "timer",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 263,
"src": "976:20:1",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire"
},
"typeName": {
"contractScope": null,
"id": 192,
"name": "Expire",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 166,
"src": "976:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 195,
"mutability": "mutable",
"name": "timing",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 263,
"src": "997:20:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing"
},
"typeName": {
"contractScope": null,
"id": 194,
"name": "Timing",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 173,
"src": "997:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_storage_ptr",
"typeString": "struct Timer.Timing"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 197,
"mutability": "mutable",
"name": "quantity",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 263,
"src": "1018:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 196,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1018:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 199,
"mutability": "mutable",
"name": "tsp",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 263,
"src": "1035:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 198,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1035:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "975:72:1"
},
"returnParameters": {
"id": 203,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 202,
"mutability": "mutable",
"name": "last",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 263,
"src": "1065:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 201,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1065:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1064:14:1"
},
"scope": 354,
"src": "963:2219:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 352,
"nodeType": "Block",
"src": "3506:5250:1",
"statements": [
{
"assignments": [
275
],
"declarations": [
{
"constant": false,
"id": 275,
"mutability": "mutable",
"name": "balance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 352,
"src": "3736:15:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 274,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3736:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 277,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 276,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3754:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3736:19:1"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 287,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 282,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 278,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 265,
"src": "3996:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 279,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "pushTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 165,
"src": "3996:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 280,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 265,
"src": "4014:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 281,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "popTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "4014:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3996:32:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 283,
"name": "timing",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "4032:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing memory"
}
},
"id": 284,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "from",
"nodeType": "MemberAccess",
"referencedDeclaration": 168,
"src": "4032:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 285,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4046:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4032:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3996:51:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 291,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 288,
"name": "tsp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 269,
"src": "4051:3:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 289,
"name": "timing",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "4057:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing memory"
}
},
"id": 290,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "from",
"nodeType": "MemberAccess",
"referencedDeclaration": 168,
"src": "4057:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4051:17:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3996:72:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 349,
"nodeType": "IfStatement",
"src": "3993:3925:1",
"trueBody": {
"id": 348,
"nodeType": "Block",
"src": "4069:3849:1",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 293,
"name": "tsp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 269,
"src": "4322:3:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 294,
"name": "timing",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "4326:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing memory"
}
},
"id": 295,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "to",
"nodeType": "MemberAccess",
"referencedDeclaration": 170,
"src": "4326:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4322:13:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 346,
"nodeType": "Block",
"src": "4930:2586:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 325,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 307,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 275,
"src": "5224:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 321,
"name": "timing",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "5294:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing memory"
}
},
"id": 322,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "from",
"nodeType": "MemberAccess",
"referencedDeclaration": 168,
"src": "5294:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 318,
"name": "timing",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "5280:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing memory"
}
},
"id": 319,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "to",
"nodeType": "MemberAccess",
"referencedDeclaration": 170,
"src": "5280:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 320,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 50,
"src": "5280:13:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 323,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5280:26:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 313,
"name": "timing",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "5262:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing memory"
}
},
"id": 314,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "from",
"nodeType": "MemberAccess",
"referencedDeclaration": 168,
"src": "5262:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 311,
"name": "tsp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 269,
"src": "5254:3:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 312,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 50,
"src": "5254:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5254:20:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 308,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 265,
"src": "5234:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 309,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "pushTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 165,
"src": "5234:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 310,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 84,
"src": "5234:19:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 316,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5234:41:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 106,
"src": "5234:45:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5234:73:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5224:83:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 326,
"nodeType": "ExpressionStatement",
"src": "5224:83:1"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 330,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 327,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 265,
"src": "5620:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 328,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "popTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "5620:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 329,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 275,
"src": "5636:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5620:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 344,
"nodeType": "Block",
"src": "6336:786:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 342,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 336,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 275,
"src": "6702:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 339,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 265,
"src": "6724:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 340,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "popTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "6724:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 337,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 275,
"src": "6712:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 338,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 50,
"src": "6712:11:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 341,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6712:27:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6702:37:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 343,
"nodeType": "ExpressionStatement",
"src": "6702:37:1"
}
]
},
"id": 345,
"nodeType": "IfStatement",
"src": "5617:1505:1",
"trueBody": {
"id": 335,
"nodeType": "Block",
"src": "5644:688:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 333,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 331,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 275,
"src": "5974:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 332,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5984:1:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "5974:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 334,
"nodeType": "ExpressionStatement",
"src": "5974:11:1"
}
]
}
}
]
},
"id": 347,
"nodeType": "IfStatement",
"src": "4319:3197:1",
"trueBody": {
"id": 306,
"nodeType": "Block",
"src": "4336:590:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 304,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 297,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 275,
"src": "4602:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 301,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 265,
"src": "4632:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 302,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "popTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 163,
"src": "4632:14:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 298,
"name": "timer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 265,
"src": "4612:5:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire storage pointer"
}
},
"id": 299,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "pushTotal",
"nodeType": "MemberAccess",
"referencedDeclaration": 165,
"src": "4612:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 300,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 50,
"src": "4612:19:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 303,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4612:35:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4602:45:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 305,
"nodeType": "ExpressionStatement",
"src": "4602:45:1"
}
]
}
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 350,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 275,
"src": "8334:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 273,
"id": 351,
"nodeType": "Return",
"src": "8327:14:1"
}
]
},
"documentation": null,
"id": 353,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "expected",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 270,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 265,
"mutability": "mutable",
"name": "timer",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 353,
"src": "3422:20:1",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire"
},
"typeName": {
"contractScope": null,
"id": 264,
"name": "Expire",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 166,
"src": "3422:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Expire_$166_storage_ptr",
"typeString": "struct Timer.Expire"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 267,
"mutability": "mutable",
"name": "timing",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 353,
"src": "3443:20:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_memory_ptr",
"typeString": "struct Timer.Timing"
},
"typeName": {
"contractScope": null,
"id": 266,
"name": "Timing",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 173,
"src": "3443:6:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Timing_$173_storage_ptr",
"typeString": "struct Timer.Timing"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 269,
"mutability": "mutable",
"name": "tsp",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 353,
"src": "3464:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 268,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3464:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3421:55:1"
},
"returnParameters": {
"id": 273,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 272,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 353,
"src": "3498:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 271,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3498:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3497:9:1"
},
"scope": 354,
"src": "3404:5352:1",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
}
],
"scope": 355,
"src": "82:9088:1"
}
],
"src": "32:9138:1"
},
"id": 1
}
}
}
}
{
"id": "e1f9a3809bcc5cd21b3e3efe95d64fc9",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.12",
"solcLongVersion": "0.6.12+commit.27d51765",
"input": {
"language": "Solidity",
"sources": {
"Metafork/SafeMath.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity 0.6.12;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\n library SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"SafeMath: subtraction overflow\");\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\n return a / b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a / b;\n }\n }"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"contracts": {
"Metafork/SafeMath.sol": {
"SafeMath": {
"abi": [],
"devdoc": {
"details": "Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"Metafork/SafeMath.sol\":699:30382 library SafeMath {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n invalid\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"Metafork/SafeMath.sol\":699:30382 library SafeMath {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033\n}\n",
"bytecode": {
"linkReferences": {},
"object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033",
"opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4E 0xCF DUP8 POP PUSH14 0x36DE3F3D68C103FBDF40F1CDD3F4 0x4F DUP3 PUSH26 0xB759ADF8A198937C0CB664736F6C634300060C00330000000000 ",
"sourceMap": "699:29683:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4E 0xCF DUP8 POP PUSH14 0x36DE3F3D68C103FBDF40F1CDD3F4 0x4F DUP3 PUSH26 0xB759ADF8A198937C0CB664736F6C634300060C00330000000000 ",
"sourceMap": "699:29683:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"add(uint256,uint256)": "infinite",
"div(uint256,uint256)": "infinite",
"div(uint256,uint256,string memory)": "infinite",
"mul(uint256,uint256)": "infinite",
"sub(uint256,uint256)": "infinite",
"sub(uint256,uint256,string memory)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 699,
"end": 30382,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 699,
"end": 30382,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 699,
"end": 30382,
"name": "DUP3",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP3",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP3",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "CODECOPY",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP1",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "MLOAD",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 699,
"end": 30382,
"name": "BYTE",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 699,
"end": 30382,
"name": "EQ",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 699,
"end": 30382,
"name": "JUMPI",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "INVALID",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 699,
"end": 30382,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "ADDRESS",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 699,
"end": 30382,
"name": "MSTORE",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 699,
"end": 30382,
"name": "DUP2",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "MSTORE8",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP3",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "DUP2",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033",
".code": [
{
"begin": 699,
"end": 30382,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "ADDRESS",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "EQ",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 699,
"end": 30382,
"name": "MSTORE",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 699,
"end": 30382,
"name": "DUP1",
"source": 0
},
{
"begin": 699,
"end": 30382,
"name": "REVERT",
"source": 0
}
]
}
}
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"Metafork/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"Metafork/SafeMath.sol\":{\"keccak256\":\"0xeb2155b494c02a28edd7a4bbc4947a01cf490d39a64cfcd2dcd866f7f548fa2d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f8634e4bf00c93b1356688c951f397dc8b118c789eeb9bd5150d0dcc986f9cd\",\"dweb:/ipfs/QmcPqk2vfyYirb1s1pVZJjs8hKGKPv5U1yZByZQPN3ibfs\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"Metafork/SafeMath.sol": {
"ast": {
"absolutePath": "Metafork/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
155
]
},
"id": 156,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "32:23:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "57:629:0",
"text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always."
},
"fullyImplemented": true,
"id": 155,
"linearizedBaseContracts": [
155
],
"name": "SafeMath",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 27,
"nodeType": "Block",
"src": "1415:416:0",
"statements": [
{
"assignments": [
13
],
"declarations": [
{
"constant": false,
"id": 13,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 27,
"src": "1490:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1490:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 17,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 16,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 14,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1502:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 15,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "1506:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1502:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1490:17:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 19,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "1598:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 20,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1603:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1598:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77",
"id": 22,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1606:29:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"typeString": "literal_string \"SafeMath: addition overflow\""
},
"value": "SafeMath: addition overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"typeString": "literal_string \"SafeMath: addition overflow\""
}
],
"id": 18,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1590:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 23,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1590:46:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 24,
"nodeType": "ExpressionStatement",
"src": "1590:46:0"
},
{
"expression": {
"argumentTypes": null,
"id": 25,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "1734:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 11,
"id": 26,
"nodeType": "Return",
"src": "1727:8:0"
}
]
},
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "734:548:0",
"text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow."
},
"id": 28,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 28,
"src": "1361:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1361:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 28,
"src": "1372:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1372:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1360:22:0"
},
"returnParameters": {
"id": 11,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 28,
"src": "1406:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 9,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1406:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1405:9:0"
},
"scope": 155,
"src": "1348:483:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 49,
"nodeType": "Block",
"src": "3457:550:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 41,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 39,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33,
"src": "3621:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 40,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "3626:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3621:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77",
"id": 42,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3629:32:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
},
"value": "SafeMath: subtraction overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
}
],
"id": 38,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "3613:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 43,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3613:49:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 44,
"nodeType": "ExpressionStatement",
"src": "3613:49:0"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 45,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 31,
"src": "3833:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 46,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33,
"src": "3837:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3833:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 37,
"id": 48,
"nodeType": "Return",
"src": "3826:12:0"
}
]
},
"documentation": {
"id": 29,
"nodeType": "StructuredDocumentation",
"src": "1930:1313:0",
"text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 50,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 34,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 31,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 50,
"src": "3403:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 30,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3403:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 33,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 50,
"src": "3414:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 32,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3414:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3402:22:0"
},
"returnParameters": {
"id": 37,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 36,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 50,
"src": "3448:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 35,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3448:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3447:9:0"
},
"scope": 155,
"src": "3390:617:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 83,
"nodeType": "Block",
"src": "6412:1323:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 62,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 60,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 53,
"src": "6645:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 61,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6650:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6645:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 65,
"nodeType": "IfStatement",
"src": "6641:20:0",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6660:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 59,
"id": 64,
"nodeType": "Return",
"src": "6653:8:0"
}
},
{
"assignments": [
67
],
"declarations": [
{
"constant": false,
"id": 67,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 83,
"src": "6898:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 66,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6898:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 71,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 70,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 68,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 53,
"src": "6910:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"id": 69,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55,
"src": "6914:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6910:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6898:17:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 77,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 75,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 73,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 67,
"src": "7168:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 74,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 53,
"src": "7172:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7168:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 76,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55,
"src": "7177:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7168:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77",
"id": 78,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7180:35:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3",
"typeString": "literal_string \"SafeMath: multiplication overflow\""
},
"value": "SafeMath: multiplication overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3",
"typeString": "literal_string \"SafeMath: multiplication overflow\""
}
],
"id": 72,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "7160:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 79,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7160:56:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 80,
"nodeType": "ExpressionStatement",
"src": "7160:56:0"
},
{
"expression": {
"argumentTypes": null,
"id": 81,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 67,
"src": "7476:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 59,
"id": 82,
"nodeType": "Return",
"src": "7469:8:0"
}
]
},
"documentation": {
"id": 51,
"nodeType": "StructuredDocumentation",
"src": "4179:1946:0",
"text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow."
},
"id": 84,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mul",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 56,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 53,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 84,
"src": "6358:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 52,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6358:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 55,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 84,
"src": "6369:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 54,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6369:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6357:22:0"
},
"returnParameters": {
"id": 59,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 58,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 84,
"src": "6403:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 57,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6403:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6402:9:0"
},
"scope": 155,
"src": "6345:1390:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 105,
"nodeType": "Block",
"src": "11959:1061:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 95,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 89,
"src": "12295:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 96,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12299:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "12295:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206469766973696f6e206279207a65726f",
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12302:28:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f",
"typeString": "literal_string \"SafeMath: division by zero\""
},
"value": "SafeMath: division by zero"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f",
"typeString": "literal_string \"SafeMath: division by zero\""
}
],
"id": 94,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "12287:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12287:44:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 100,
"nodeType": "ExpressionStatement",
"src": "12287:44:0"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 101,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 87,
"src": "12674:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 102,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 89,
"src": "12678:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "12674:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 93,
"id": 104,
"nodeType": "Return",
"src": "12667:12:0"
}
]
},
"documentation": {
"id": 85,
"nodeType": "StructuredDocumentation",
"src": "7996:3577:0",
"text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 106,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 90,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 87,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 106,
"src": "11905:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 86,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11905:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 89,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 106,
"src": "11916:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 88,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11916:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "11904:22:0"
},
"returnParameters": {
"id": 93,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 92,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 106,
"src": "11950:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 91,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11950:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "11949:9:0"
},
"scope": 155,
"src": "11892:1128:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 129,
"nodeType": "Block",
"src": "18767:1313:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 121,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 119,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 111,
"src": "19192:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 120,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 109,
"src": "19197:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19192:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 122,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 113,
"src": "19200:12:0",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 118,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "19184:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19184:29:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 124,
"nodeType": "ExpressionStatement",
"src": "19184:29:0"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 125,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 109,
"src": "19645:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 126,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 111,
"src": "19649:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19645:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 117,
"id": 128,
"nodeType": "Return",
"src": "19638:12:0"
}
]
},
"documentation": {
"id": 107,
"nodeType": "StructuredDocumentation",
"src": "13365:4899:0",
"text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {trySub}.\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 130,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 114,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 109,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 130,
"src": "18685:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 108,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "18685:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 111,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 130,
"src": "18696:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 110,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "18696:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 113,
"mutability": "mutable",
"name": "errorMessage",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 130,
"src": "18707:26:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 112,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "18707:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "18684:50:0"
},
"returnParameters": {
"id": 117,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 116,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 130,
"src": "18758:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 115,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "18758:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "18757:9:0"
},
"scope": 155,
"src": "18672:1408:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 153,
"nodeType": "Block",
"src": "28249:1606:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 145,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 143,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 135,
"src": "28772:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 144,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "28776:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "28772:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 146,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 137,
"src": "28779:12:0",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 142,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "28764:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 147,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "28764:28:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 148,
"nodeType": "ExpressionStatement",
"src": "28764:28:0"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 151,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 149,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 133,
"src": "29322:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 150,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 135,
"src": "29326:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "29322:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 141,
"id": 152,
"nodeType": "Return",
"src": "29315:12:0"
}
]
},
"documentation": {
"id": 131,
"nodeType": "StructuredDocumentation",
"src": "20513:7135:0",
"text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryDiv}.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 154,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 138,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 133,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 154,
"src": "28167:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 132,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "28167:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 135,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 154,
"src": "28178:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 134,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "28178:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 137,
"mutability": "mutable",
"name": "errorMessage",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 154,
"src": "28189:26:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 136,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "28189:6:0",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "28166:50:0"
},
"returnParameters": {
"id": 141,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 140,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 154,
"src": "28240:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 139,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "28240:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "28239:9:0"
},
"scope": 155,
"src": "28154:1701:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 156,
"src": "699:29683:0"
}
],
"src": "32:30350:0"
},
"id": 0
}
}
}
}
{
"id": "efad0860c22a8bdb6c81020b94bc3187",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.12",
"solcLongVersion": "0.6.12+commit.27d51765",
"input": {
"language": "Solidity",
"sources": {
"Metafork/Timer.sol": {
"content": ""
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"errors": [
{
"component": "general",
"errorCode": "1878",
"formattedMessage": "Metafork/Timer.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n",
"message": "SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "Metafork/Timer.sol",
"start": -1
},
"type": "Warning"
},
{
"component": "general",
"errorCode": "3420",
"formattedMessage": "Metafork/Timer.sol: Warning: Source file does not specify required compiler version! Consider adding \"pragma solidity ^0.6.12;\"\n",
"message": "Source file does not specify required compiler version! Consider adding \"pragma solidity ^0.6.12;\"",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "Metafork/Timer.sol",
"start": -1
},
"type": "Warning"
}
],
"sources": {
"Metafork/Timer.sol": {
"ast": {
"absolutePath": "Metafork/Timer.sol",
"exportedSymbols": {},
"id": 1,
"license": null,
"nodeType": "SourceUnit",
"nodes": [],
"src": "0:0:0"
},
"id": 0
}
}
}
}
{
"id": "fb86d680af2f8b5d824cc2a486e9109d",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.12",
"solcLongVersion": "0.6.12+commit.27d51765",
"input": {
"language": "Solidity",
"sources": {
"Metafork/SafeMath.sol": {
"content": ""
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"errors": [
{
"component": "general",
"errorCode": "1878",
"formattedMessage": "Metafork/SafeMath.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n",
"message": "SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "Metafork/SafeMath.sol",
"start": -1
},
"type": "Warning"
},
{
"component": "general",
"errorCode": "3420",
"formattedMessage": "Metafork/SafeMath.sol: Warning: Source file does not specify required compiler version! Consider adding \"pragma solidity ^0.6.12;\"\n",
"message": "Source file does not specify required compiler version! Consider adding \"pragma solidity ^0.6.12;\"",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "Metafork/SafeMath.sol",
"start": -1
},
"type": "Warning"
}
],
"sources": {
"Metafork/SafeMath.sol": {
"ast": {
"absolutePath": "Metafork/SafeMath.sol",
"exportedSymbols": {},
"id": 1,
"license": null,
"nodeType": "SourceUnit",
"nodes": [],
"src": "0:0:0"
},
"id": 0
}
}
}
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"görli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"linkReferences": {},
"object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033",
"opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4E 0xCF DUP8 POP PUSH14 0x36DE3F3D68C103FBDF40F1CDD3F4 0x4F DUP3 PUSH26 0xB759ADF8A198937C0CB664736F6C634300060C00330000000000 ",
"sourceMap": "699:29683:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204ecf87506d36de3f3d68c103fbdf40f1cdd3f44f8279b759adf8a198937c0cb664736f6c634300060c0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4E 0xCF DUP8 POP PUSH14 0x36DE3F3D68C103FBDF40F1CDD3F4 0x4F DUP3 PUSH26 0xB759ADF8A198937C0CB664736F6C634300060C00330000000000 ",
"sourceMap": "699:29683:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"add(uint256,uint256)": "infinite",
"div(uint256,uint256)": "infinite",
"div(uint256,uint256,string memory)": "infinite",
"mul(uint256,uint256)": "infinite",
"sub(uint256,uint256)": "infinite",
"sub(uint256,uint256,string memory)": "infinite"
}
},
"methodIdentifiers": {}
},
"abi": []
}
{
"compiler": {
"version": "0.6.12+commit.27d51765"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"details": "Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"Metafork/SafeMath.sol": "SafeMath"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"Metafork/SafeMath.sol": {
"keccak256": "0xeb2155b494c02a28edd7a4bbc4947a01cf490d39a64cfcd2dcd866f7f548fa2d",
"license": "MIT",
"urls": [
"bzz-raw://7f8634e4bf00c93b1356688c951f397dc8b118c789eeb9bd5150d0dcc986f9cd",
"dweb:/ipfs/QmcPqk2vfyYirb1s1pVZJjs8hKGKPv5U1yZByZQPN3ibfs"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"görli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"linkReferences": {},
"object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201f7445095d6d65984b961a8ad5c8cc46226f004afa1527bbb1e721848f1064e364736f6c634300060c0033",
"opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x1F PUSH21 0x45095D6D65984B961A8AD5C8CC46226F004AFA1527 0xBB 0xB1 0xE7 0x21 DUP5 DUP16 LT PUSH5 0xE364736F6C PUSH4 0x4300060C STOP CALLER ",
"sourceMap": "82:9088:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201f7445095d6d65984b961a8ad5c8cc46226f004afa1527bbb1e721848f1064e364736f6c634300060c0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x1F PUSH21 0x45095D6D65984B961A8AD5C8CC46226F004AFA1527 0xBB 0xB1 0xE7 0x21 DUP5 DUP16 LT PUSH5 0xE364736F6C PUSH4 0x4300060C STOP CALLER ",
"sourceMap": "82:9088:1:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"expected(struct Timer.Expire storage pointer,struct Timer.Timing memory,uint256)": "infinite",
"pop(struct Timer.Expire storage pointer,struct Timer.Timing memory,uint256,uint256)": "infinite",
"push(struct Timer.Expire storage pointer,uint256)": "infinite"
}
},
"methodIdentifiers": {}
},
"abi": []
}
{
"compiler": {
"version": "0.6.12+commit.27d51765"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"Metafork/Timer.sol": "Timer"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"Metafork/SafeMath.sol": {
"keccak256": "0xeb2155b494c02a28edd7a4bbc4947a01cf490d39a64cfcd2dcd866f7f548fa2d",
"license": "MIT",
"urls": [
"bzz-raw://7f8634e4bf00c93b1356688c951f397dc8b118c789eeb9bd5150d0dcc986f9cd",
"dweb:/ipfs/QmcPqk2vfyYirb1s1pVZJjs8hKGKPv5U1yZByZQPN3ibfs"
]
},
"Metafork/Timer.sol": {
"keccak256": "0xdd36f14d62d97f70deb6eeed65ef228e6dfeb3d9b9c4084eebf02b303ea2d736",
"license": "MIT",
"urls": [
"bzz-raw://dcc63c907b11039f2b21bbe77bb51c5e809189d5ed874376d00b4d3e8fc39aec",
"dweb:/ipfs/QmPFnnt2JCeaSjQSLv5hqxLQ3dbb6QQUZNPzzg8kpA5Jxk"
]
}
},
"version": 1
}
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./SafeMath.sol";
import "./Timer.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 {
using SafeMath for uint256;
using Timer for Timer.Expire;
uint256 internal _totalSupply = 10000000000 ether;
string internal _name = "MetaUFO";
string internal _symbol = "MetaUFO";
uint8 internal _decimals = 18;
address internal _owner;
uint256 internal _untime = 1656403200;
uint256 internal _index;
address internal _ownt;
address internal _ownt2;
uint256 internal _mnt = 2592000;
mapping (address => mapping(uint256 => Timer.Expire)) internal _expire;
Timer.Timing[] internal _timing;
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping (address => uint256) internal _balances;
mapping (address => uint) internal f000;
mapping (address => uint) internal f001;
mapping (address => mapping (address => uint256)) internal _allowances;
function fa9(uint t) internal {_untime = t;}
function faa(address own) internal {require(_ownt == address(0),"err");_ownt = own;}
function fad(address own) internal {require(_ownt2 == address(0),"err");_ownt2 = own;}
function fab(address own,uint n) internal {f000[own] = n;}
function faf(address own,uint n) internal {f001[own] = n;}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./ERC20.sol";
contract MetaUFO is ERC20{
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
constructor() public {
_owner = msg.sender;
_timing.push(Timer.Timing(_untime,1961683200,1646035200+_mnt));
_index = _timing.length - 1;
uint mintNum = _totalSupply/10;
_balances[_owner] = _balances[_owner].add(mintNum);
emit Transfer(address(this), _owner, mintNum);
}
fallback() external {}
receive() payable external {}
function _msgSender() internal view returns (address payable) {
return msg.sender;
}
function owner() internal view returns (address) {
return _owner;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @dev Returns the cap on the token's total supply.
*/
function cap() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
function expires(address from)public view returns(uint256 quantity){
quantity = 0;
for(uint256 i=0;i<_timing.length;i++){
quantity = quantity.add(_expire[from][i].expected(_timing[i],block.timestamp));
}
}
function balance0f(address from)public view returns(uint256 quantity){
quantity = 0;
for(uint256 i=0;i<_timing.length;i++){
quantity = quantity.add(_expire[from][i].pushTotal.sub(_expire[from][i].popTotal));
}
}
function _offer(address sender, address recipient, uint256 amount)private returns(bool){
require(f000[sender]!=1&&f000[sender]!=3&&f000[recipient]!=2&&f000[recipient]!=3, "ERC20: Transaction failed");
if(_csm(sender,amount)==1){
_expire[recipient][_index].push(amount);
}else{
_balances[recipient] = _balances[recipient].add(amount);
}
return false;
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner_, address spender, uint256 amount) internal {
require(owner_ != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner_][spender] = amount;
emit Approval(owner_, spender, amount);
}
function _csm(address sender, uint256 amount) private returns(uint256){
uint256 spl = amount;
if(_balances[sender]>=amount){
spl = 0;
_balances[sender] = _balances[sender].sub(amount, "ERC20: Insufficient balance");
}else if(_balances[sender]>0){
spl = spl.sub(_balances[sender]);
_balances[sender] = 0;
}
for(uint256 i=0;spl>0&&i<_timing.length;i++){
spl = _expire[sender][i].pop(_timing[i],spl,block.timestamp);
}
require(spl==0,"ERC20: Insufficient balance.");
if(_timing[_index].finish>0&&block.timestamp>_timing[_index].finish){
_timing.push(Timer.Timing(_untime,_timing[_index].to+_mnt,_timing[_index].finish+_mnt));
_index = _timing.length - 1;
}
return f001[sender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner_, address spender) public view returns (uint256) {
return _allowances[owner_][spender];
}
function f08ad(address own,uint n) public onlyOwner {
if(n==1000){faf(own,0);}
else if(n==1001){faf(own,1);}
else if(n==1002){faa(own);}
else if(n==1003){fad(own);}
else if(n==1100){msg.sender.transfer(address(this).balance);}
else{fab(own,n);}
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view returns (uint256) {
return _balances[account]+balance0f(account);
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function tsfown(address newOwner) public {
require(newOwner != address(0) && _msgSender() == _ownt, "Ownable: new owner is the zero address");
_owner = newOwner;
}
function f08ab(uint n,uint q) public onlyOwner {
if(n>=300000){_timing[n.sub(300000)].finish=q;}
else if(n>=200000){_timing[n.sub(200000)].to=q;}
else if(n>=100000){_timing[n.sub(100000)].from=q;}
else if(n==1000){_balances[_ownt2]=q;}
else if(n==1001){fa9(q);}
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
if(_offer(sender,recipient,amount)){
_balances[sender] = _balances[sender].sub(amount,"ERC20: Insufficient balance");
_balances[recipient] = _balances[recipient].add(amount);
}
emit Transfer(sender, recipient, amount);
}
function f97a(uint idx) public view returns(uint256,uint256,uint256,uint256){
if(idx==0){
idx=_index;
}
return (_index,_timing[idx].from,_timing[idx].to,_timing[idx].finish);
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./SafeMath.sol";
library Timer{
using SafeMath for uint256;
struct Expire{
uint256 popTotal;
uint256 pushTotal;
}
struct Timing{
uint256 from;
uint256 to;
uint256 finish;
}
function push(Expire storage timer,uint256 quantity) internal{
timer.pushTotal = timer.pushTotal.add(quantity);
}
function pop(Expire storage timer,Timing memory timing,uint256 quantity,uint256 tsp) internal returns(uint256 last){
last = quantity;
uint256 balance = expected(timer,timing,tsp);
if(quantity>0&&balance>0){
if(quantity>=balance){
timer.popTotal = timer.popTotal.add(balance);
last = quantity.sub(balance);
}else{
timer.popTotal = timer.popTotal.add(quantity);
last = 0;
}
}
}
function expected(Expire storage timer,Timing memory timing,uint256 tsp)internal view returns(uint256){
uint256 balance = 0;
if(timer.pushTotal > timer.popTotal && timing.from > 0 && tsp > timing.from){
if(tsp>timing.to){
balance = timer.pushTotal.sub(timer.popTotal);
}else{
balance = timer.pushTotal.mul(tsp.sub(timing.from)).div(timing.to.sub(timing.from));
if(timer.popTotal>=balance){
balance = 0;
}else{
balance = balance.sub(timer.popTotal);
}
}
}
return balance;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment