2019-12-29 02:25:08 +00:00
{
"contractName" : "SafeMath" ,
"abi" : [ ] ,
"metadata" : "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"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.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]}},\"version\":1}" ,
"bytecode" : "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158208b1f219994d23d2b793719c323653bfad2b6440f811d891106e6c696ab7430cc64736f6c634300050c0032" ,
"deployedBytecode" : "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158208b1f219994d23d2b793719c323653bfad2b6440f811d891106e6c696ab7430cc64736f6c634300050c0032" ,
"sourceMap" : "589:4708:3:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24" ,
"deployedSourceMap" : "589:4708:3:-;;;;;;;;" ,
"source" : "pragma solidity ^0.5.0;\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 */\nlibrary 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 * - 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\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 * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\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 * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\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 * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts 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 * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\" ) ; \ n } \ n \ n / * * \ n * @ d e v R e t u r n s t h e i n t e g e r d i v i s i o n o f t w o u n s i g n e d i n t e g e r s . R e v e r t s w i t h c u s t o m m e s s a g e o n \ n * d i v i s i o n b y z e r o . T h e r e s u l t i s r o u n d e d t o w a r d s z e r o . \ n * \ n * C o u n t e r p a r t t o S o l i d i t y ' s ` / ` o p e r a t o r . N o t e : t h i s f u n c t i o n u s e s a \ n * ` r e v e r t ` o p c o d e ( w h i c h l e a v e s r e m a i n i n g g a s u n t o u c h e d ) w h i l e S o l i d i t y \ n * u s e s a n i n v a l i d o p c o d e t o r e v e r t ( c o n s u m i n g a l l r e m a i n i n g g a s ) . \ n * \ n * R e q u i r e m e n t s : \ n * - T h e d i v i s o r c a n n o t b e z e r o . \ n * \ n * _ A v a i l a b l e s i n c e v 2.4 . 0 . _ \ n * / \ n f u n c t i o n d i v ( u i n t 256 a , u i n t 256 b , s t r i n g m e m o r y e r r o r M e s s a g e ) i n t e r n a l p u r e r e t u r n s ( u i n t 256 ) { \ n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n //
"sourcePath" : "@openzeppelin/contracts/math/SafeMath.sol" ,
"ast" : {
"absolutePath" : "@openzeppelin/contracts/math/SafeMath.sol" ,
"exportedSymbols" : {
"SafeMath" : [
2020-02-18 05:18:07 +00:00
604
2019-12-29 02:25:08 +00:00
]
} ,
2020-02-18 05:18:07 +00:00
"id" : 605 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "SourceUnit" ,
"nodes" : [
{
2020-02-18 05:18:07 +00:00
"id" : 419 ,
2019-12-29 02:25:08 +00:00
"literals" : [
"solidity" ,
"^" ,
"0.5" ,
".0"
] ,
"nodeType" : "PragmaDirective" ,
"src" : "0:23:3"
} ,
{
"baseContracts" : [ ] ,
"contractDependencies" : [ ] ,
"contractKind" : "library" ,
"documentation" : "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always." ,
"fullyImplemented" : true ,
2020-02-18 05:18:07 +00:00
"id" : 604 ,
2019-12-29 02:25:08 +00:00
"linearizedBaseContracts" : [
2020-02-18 05:18:07 +00:00
604
2019-12-29 02:25:08 +00:00
] ,
"name" : "SafeMath" ,
"nodeType" : "ContractDefinition" ,
"nodes" : [
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 443 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "901:109:3" ,
"statements" : [
{
"assignments" : [
2020-02-18 05:18:07 +00:00
429
2019-12-29 02:25:08 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 429 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 443 ,
2019-12-29 02:25:08 +00:00
"src" : "911:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 428 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "911:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 433 ,
2019-12-29 02:25:08 +00:00
"initialValue" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 432 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 430 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 421 ,
2019-12-29 02:25:08 +00:00
"src" : "923:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "+" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 431 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 423 ,
2019-12-29 02:25:08 +00:00
"src" : "927:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "923:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "911:17:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 437 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 435 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 429 ,
2019-12-29 02:25:08 +00:00
"src" : "946:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : ">=" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 436 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 421 ,
2019-12-29 02:25:08 +00:00
"src" : "951:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "946:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a206164646974696f6e206f766572666c6f77" ,
2020-02-18 05:18:07 +00:00
"id" : 438 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "954:29:3" ,
"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\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 434 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "938:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 439 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "938:46:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 440 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "938:46:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 441 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 429 ,
2019-12-29 02:25:08 +00:00
"src" : "1002:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 427 ,
"id" : 442 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "995:8:3"
}
]
} ,
"documentation" : "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow." ,
2020-02-18 05:18:07 +00:00
"id" : 444 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "add" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 424 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 421 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 444 ,
2019-12-29 02:25:08 +00:00
"src" : "847:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 420 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "847:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 423 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 444 ,
2019-12-29 02:25:08 +00:00
"src" : "858:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 422 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "858:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "846:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 427 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 426 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 444 ,
2019-12-29 02:25:08 +00:00
"src" : "892:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 425 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "892:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "891:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "834:176:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 459 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "1341:67:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 454 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 446 ,
2019-12-29 02:25:08 +00:00
"src" : "1362:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 455 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 448 ,
2019-12-29 02:25:08 +00:00
"src" : "1365:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a207375627472616374696f6e206f766572666c6f77" ,
2020-02-18 05:18:07 +00:00
"id" : 456 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1368:32:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862" ,
"typeString" : "literal_string \"SafeMath: subtraction overflow\""
} ,
"value" : "SafeMath: subtraction overflow"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862" ,
"typeString" : "literal_string \"SafeMath: subtraction overflow\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 453 ,
2019-12-29 02:25:08 +00:00
"name" : "sub" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
460 ,
487
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1358:3:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$" ,
"typeString" : "function (uint256,uint256,string memory) pure returns (uint256)"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 457 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1358:43:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 452 ,
"id" : 458 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "1351:50:3"
}
]
} ,
"documentation" : "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow." ,
2020-02-18 05:18:07 +00:00
"id" : 460 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "sub" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 449 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 446 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 460 ,
2019-12-29 02:25:08 +00:00
"src" : "1287:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 445 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1287:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 448 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 460 ,
2019-12-29 02:25:08 +00:00
"src" : "1298:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 447 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1298:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1286:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 452 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 451 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 460 ,
2019-12-29 02:25:08 +00:00
"src" : "1332:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 450 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1332:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1331:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "1274:134:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 486 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "1827:92:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 474 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 472 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 464 ,
2019-12-29 02:25:08 +00:00
"src" : "1845:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "<=" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 473 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 462 ,
2019-12-29 02:25:08 +00:00
"src" : "1850:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "1845:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 475 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 466 ,
2019-12-29 02:25:08 +00:00
"src" : "1853:12:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 471 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "1837:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 476 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1837:29:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 477 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "1837:29:3"
} ,
{
"assignments" : [
2020-02-18 05:18:07 +00:00
479
2019-12-29 02:25:08 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 479 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 486 ,
2019-12-29 02:25:08 +00:00
"src" : "1876:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 478 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1876:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 483 ,
2019-12-29 02:25:08 +00:00
"initialValue" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 482 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 480 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 462 ,
2019-12-29 02:25:08 +00:00
"src" : "1888:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "-" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 481 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 464 ,
2019-12-29 02:25:08 +00:00
"src" : "1892:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "1888:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "1876:17:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 484 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 479 ,
2019-12-29 02:25:08 +00:00
"src" : "1911:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 470 ,
"id" : 485 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "1904:8:3"
}
]
} ,
"documentation" : "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._" ,
2020-02-18 05:18:07 +00:00
"id" : 487 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "sub" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 467 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 462 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1745:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 461 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1745:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 464 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1756:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 463 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1756:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 466 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1767:26:3" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 465 ,
2019-12-29 02:25:08 +00:00
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1767:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1744:50:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 470 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 469 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1818:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 468 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1818:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1817:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "1732:187:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 520 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "2226:392:3" ,
"statements" : [
{
"condition" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 498 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 496 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 489 ,
2019-12-29 02:25:08 +00:00
"src" : "2458:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "==" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2020-02-18 05:18:07 +00:00
"id" : 497 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2463:1:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
"src" : "2458:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
"falseBody" : null ,
2020-02-18 05:18:07 +00:00
"id" : 502 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "IfStatement" ,
"src" : "2454:45:3" ,
"trueBody" : {
2020-02-18 05:18:07 +00:00
"id" : 501 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "2466:33:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2020-02-18 05:18:07 +00:00
"id" : 499 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2487:1:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 495 ,
"id" : 500 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "2480:8:3"
}
]
}
} ,
{
"assignments" : [
2020-02-18 05:18:07 +00:00
504
2019-12-29 02:25:08 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 504 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 520 ,
2019-12-29 02:25:08 +00:00
"src" : "2509:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 503 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2509:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 508 ,
2019-12-29 02:25:08 +00:00
"initialValue" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 507 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 505 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 489 ,
2019-12-29 02:25:08 +00:00
"src" : "2521:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "*" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 506 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 491 ,
2019-12-29 02:25:08 +00:00
"src" : "2525:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "2521:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "2509:17:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 514 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 512 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 510 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 504 ,
2019-12-29 02:25:08 +00:00
"src" : "2544:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "/" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 511 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 489 ,
2019-12-29 02:25:08 +00:00
"src" : "2548:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "2544:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "==" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 513 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 491 ,
2019-12-29 02:25:08 +00:00
"src" : "2553:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "2544:10:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77" ,
2020-02-18 05:18:07 +00:00
"id" : 515 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2556:35:3" ,
"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\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 509 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "2536:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 516 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2536:56:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 517 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "2536:56:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 518 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 504 ,
2019-12-29 02:25:08 +00:00
"src" : "2610:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 495 ,
"id" : 519 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "2603:8:3"
}
]
} ,
"documentation" : "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow." ,
2020-02-18 05:18:07 +00:00
"id" : 521 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "mul" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 492 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 489 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 521 ,
2019-12-29 02:25:08 +00:00
"src" : "2172:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 488 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2172:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 491 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 521 ,
2019-12-29 02:25:08 +00:00
"src" : "2183:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 490 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2183:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "2171:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 495 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 494 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 521 ,
2019-12-29 02:25:08 +00:00
"src" : "2217:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 493 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2217:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "2216:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "2159:459:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 536 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "3140:63:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 531 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 523 ,
2019-12-29 02:25:08 +00:00
"src" : "3161:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 532 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 525 ,
2019-12-29 02:25:08 +00:00
"src" : "3164:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a206469766973696f6e206279207a65726f" ,
2020-02-18 05:18:07 +00:00
"id" : 533 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "3167:28:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f" ,
"typeString" : "literal_string \"SafeMath: division by zero\""
} ,
"value" : "SafeMath: division by zero"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f" ,
"typeString" : "literal_string \"SafeMath: division by zero\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 530 ,
2019-12-29 02:25:08 +00:00
"name" : "div" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
537 ,
564
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3157:3:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$" ,
"typeString" : "function (uint256,uint256,string memory) pure returns (uint256)"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 534 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "3157:39:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 529 ,
"id" : 535 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "3150:46:3"
}
]
} ,
"documentation" : "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision 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\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero." ,
2020-02-18 05:18:07 +00:00
"id" : 537 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "div" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 526 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 523 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 537 ,
2019-12-29 02:25:08 +00:00
"src" : "3086:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 522 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3086:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 525 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 537 ,
2019-12-29 02:25:08 +00:00
"src" : "3097:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 524 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3097:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3085:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 529 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 528 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 537 ,
2019-12-29 02:25:08 +00:00
"src" : "3131:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 527 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3131:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3130:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "3073:130:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 563 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "3813:243:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 551 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 549 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 541 ,
2019-12-29 02:25:08 +00:00
"src" : "3897:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : ">" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2020-02-18 05:18:07 +00:00
"id" : 550 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "3901:1:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
"src" : "3897:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 552 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 543 ,
2019-12-29 02:25:08 +00:00
"src" : "3904:12:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 548 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "3889:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 553 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "3889:28:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 554 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "3889:28:3"
} ,
{
"assignments" : [
2020-02-18 05:18:07 +00:00
556
2019-12-29 02:25:08 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 556 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 563 ,
2019-12-29 02:25:08 +00:00
"src" : "3927:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 555 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3927:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 560 ,
2019-12-29 02:25:08 +00:00
"initialValue" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 559 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 557 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 539 ,
2019-12-29 02:25:08 +00:00
"src" : "3939:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "/" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 558 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 541 ,
2019-12-29 02:25:08 +00:00
"src" : "3943:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "3939:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "3927:17:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 561 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 556 ,
2019-12-29 02:25:08 +00:00
"src" : "4048:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 547 ,
"id" : 562 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "4041:8:3"
}
]
} ,
"documentation" : "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision 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\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._" ,
2020-02-18 05:18:07 +00:00
"id" : 564 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "div" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 544 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 539 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3731:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 538 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3731:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 541 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3742:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 540 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3742:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 543 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3753:26:3" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 542 ,
2019-12-29 02:25:08 +00:00
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3753:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3730:50:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 547 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 546 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3804:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 545 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3804:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3803:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "3718:338:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 579 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "4567:61:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 574 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 566 ,
2019-12-29 02:25:08 +00:00
"src" : "4588:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 575 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 568 ,
2019-12-29 02:25:08 +00:00
"src" : "4591:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a206d6f64756c6f206279207a65726f" ,
2020-02-18 05:18:07 +00:00
"id" : 576 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "4594:26:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832" ,
"typeString" : "literal_string \"SafeMath: modulo by zero\""
} ,
"value" : "SafeMath: modulo by zero"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832" ,
"typeString" : "literal_string \"SafeMath: modulo by zero\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 573 ,
2019-12-29 02:25:08 +00:00
"name" : "mod" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
580 ,
603
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "4584:3:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$" ,
"typeString" : "function (uint256,uint256,string memory) pure returns (uint256)"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 577 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "4584:37:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 572 ,
"id" : 578 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "4577:44:3"
}
]
} ,
"documentation" : "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero." ,
2020-02-18 05:18:07 +00:00
"id" : 580 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "mod" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 569 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 566 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 580 ,
2019-12-29 02:25:08 +00:00
"src" : "4513:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 565 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "4513:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 568 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 580 ,
2019-12-29 02:25:08 +00:00
"src" : "4524:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 567 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "4524:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "4512:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 572 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 571 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 580 ,
2019-12-29 02:25:08 +00:00
"src" : "4558:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 570 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "4558:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "4557:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "4500:128:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 602 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "5227:68:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 594 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 592 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 584 ,
2019-12-29 02:25:08 +00:00
"src" : "5245:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2020-02-18 05:18:07 +00:00
"id" : 593 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "5250:1:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
"src" : "5245:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 595 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 586 ,
2019-12-29 02:25:08 +00:00
"src" : "5253:12:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 591 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "5237:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 596 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "5237:29:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 597 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "5237:29:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 600 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 598 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 582 ,
2019-12-29 02:25:08 +00:00
"src" : "5283:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "%" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 599 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 584 ,
2019-12-29 02:25:08 +00:00
"src" : "5287:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "5283:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 590 ,
"id" : 601 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "5276:12:3"
}
]
} ,
"documentation" : "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._" ,
2020-02-18 05:18:07 +00:00
"id" : 603 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "mod" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 587 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 582 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "5145:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 581 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "5145:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 584 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "5156:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 583 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "5156:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 586 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "5167:26:3" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 585 ,
2019-12-29 02:25:08 +00:00
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "5167:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "5144:50:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 590 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 589 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "5218:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 588 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "5218:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "5217:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "5132:163:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"scope" : 605 ,
2019-12-29 02:25:08 +00:00
"src" : "589:4708:3"
}
] ,
"src" : "0:5298:3"
} ,
"legacyAST" : {
"absolutePath" : "@openzeppelin/contracts/math/SafeMath.sol" ,
"exportedSymbols" : {
"SafeMath" : [
2020-02-18 05:18:07 +00:00
604
2019-12-29 02:25:08 +00:00
]
} ,
2020-02-18 05:18:07 +00:00
"id" : 605 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "SourceUnit" ,
"nodes" : [
{
2020-02-18 05:18:07 +00:00
"id" : 419 ,
2019-12-29 02:25:08 +00:00
"literals" : [
"solidity" ,
"^" ,
"0.5" ,
".0"
] ,
"nodeType" : "PragmaDirective" ,
"src" : "0:23:3"
} ,
{
"baseContracts" : [ ] ,
"contractDependencies" : [ ] ,
"contractKind" : "library" ,
"documentation" : "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always." ,
"fullyImplemented" : true ,
2020-02-18 05:18:07 +00:00
"id" : 604 ,
2019-12-29 02:25:08 +00:00
"linearizedBaseContracts" : [
2020-02-18 05:18:07 +00:00
604
2019-12-29 02:25:08 +00:00
] ,
"name" : "SafeMath" ,
"nodeType" : "ContractDefinition" ,
"nodes" : [
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 443 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "901:109:3" ,
"statements" : [
{
"assignments" : [
2020-02-18 05:18:07 +00:00
429
2019-12-29 02:25:08 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 429 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 443 ,
2019-12-29 02:25:08 +00:00
"src" : "911:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 428 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "911:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 433 ,
2019-12-29 02:25:08 +00:00
"initialValue" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 432 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 430 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 421 ,
2019-12-29 02:25:08 +00:00
"src" : "923:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "+" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 431 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 423 ,
2019-12-29 02:25:08 +00:00
"src" : "927:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "923:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "911:17:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 437 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 435 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 429 ,
2019-12-29 02:25:08 +00:00
"src" : "946:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : ">=" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 436 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 421 ,
2019-12-29 02:25:08 +00:00
"src" : "951:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "946:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a206164646974696f6e206f766572666c6f77" ,
2020-02-18 05:18:07 +00:00
"id" : 438 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "954:29:3" ,
"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\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 434 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "938:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 439 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "938:46:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 440 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "938:46:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 441 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 429 ,
2019-12-29 02:25:08 +00:00
"src" : "1002:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 427 ,
"id" : 442 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "995:8:3"
}
]
} ,
"documentation" : "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow." ,
2020-02-18 05:18:07 +00:00
"id" : 444 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "add" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 424 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 421 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 444 ,
2019-12-29 02:25:08 +00:00
"src" : "847:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 420 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "847:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 423 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 444 ,
2019-12-29 02:25:08 +00:00
"src" : "858:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 422 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "858:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "846:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 427 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 426 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 444 ,
2019-12-29 02:25:08 +00:00
"src" : "892:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 425 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "892:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "891:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "834:176:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 459 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "1341:67:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 454 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 446 ,
2019-12-29 02:25:08 +00:00
"src" : "1362:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 455 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 448 ,
2019-12-29 02:25:08 +00:00
"src" : "1365:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a207375627472616374696f6e206f766572666c6f77" ,
2020-02-18 05:18:07 +00:00
"id" : 456 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1368:32:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862" ,
"typeString" : "literal_string \"SafeMath: subtraction overflow\""
} ,
"value" : "SafeMath: subtraction overflow"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862" ,
"typeString" : "literal_string \"SafeMath: subtraction overflow\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 453 ,
2019-12-29 02:25:08 +00:00
"name" : "sub" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
460 ,
487
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1358:3:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$" ,
"typeString" : "function (uint256,uint256,string memory) pure returns (uint256)"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 457 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1358:43:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 452 ,
"id" : 458 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "1351:50:3"
}
]
} ,
"documentation" : "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow." ,
2020-02-18 05:18:07 +00:00
"id" : 460 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "sub" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 449 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 446 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 460 ,
2019-12-29 02:25:08 +00:00
"src" : "1287:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 445 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1287:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 448 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 460 ,
2019-12-29 02:25:08 +00:00
"src" : "1298:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 447 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1298:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1286:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 452 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 451 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 460 ,
2019-12-29 02:25:08 +00:00
"src" : "1332:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 450 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1332:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1331:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "1274:134:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 486 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "1827:92:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 474 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 472 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 464 ,
2019-12-29 02:25:08 +00:00
"src" : "1845:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "<=" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 473 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 462 ,
2019-12-29 02:25:08 +00:00
"src" : "1850:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "1845:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 475 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 466 ,
2019-12-29 02:25:08 +00:00
"src" : "1853:12:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 471 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "1837:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 476 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1837:29:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 477 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "1837:29:3"
} ,
{
"assignments" : [
2020-02-18 05:18:07 +00:00
479
2019-12-29 02:25:08 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 479 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 486 ,
2019-12-29 02:25:08 +00:00
"src" : "1876:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 478 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1876:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 483 ,
2019-12-29 02:25:08 +00:00
"initialValue" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 482 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 480 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 462 ,
2019-12-29 02:25:08 +00:00
"src" : "1888:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "-" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 481 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 464 ,
2019-12-29 02:25:08 +00:00
"src" : "1892:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "1888:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "1876:17:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 484 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 479 ,
2019-12-29 02:25:08 +00:00
"src" : "1911:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 470 ,
"id" : 485 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "1904:8:3"
}
]
} ,
"documentation" : "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._" ,
2020-02-18 05:18:07 +00:00
"id" : 487 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "sub" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 467 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 462 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1745:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 461 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1745:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 464 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1756:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 463 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1756:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 466 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1767:26:3" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 465 ,
2019-12-29 02:25:08 +00:00
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1767:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1744:50:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 470 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 469 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 487 ,
2019-12-29 02:25:08 +00:00
"src" : "1818:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 468 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1818:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1817:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "1732:187:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 520 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "2226:392:3" ,
"statements" : [
{
"condition" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 498 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 496 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 489 ,
2019-12-29 02:25:08 +00:00
"src" : "2458:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "==" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2020-02-18 05:18:07 +00:00
"id" : 497 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2463:1:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
"src" : "2458:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
"falseBody" : null ,
2020-02-18 05:18:07 +00:00
"id" : 502 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "IfStatement" ,
"src" : "2454:45:3" ,
"trueBody" : {
2020-02-18 05:18:07 +00:00
"id" : 501 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "2466:33:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2020-02-18 05:18:07 +00:00
"id" : 499 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2487:1:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 495 ,
"id" : 500 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "2480:8:3"
}
]
}
} ,
{
"assignments" : [
2020-02-18 05:18:07 +00:00
504
2019-12-29 02:25:08 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 504 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 520 ,
2019-12-29 02:25:08 +00:00
"src" : "2509:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 503 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2509:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 508 ,
2019-12-29 02:25:08 +00:00
"initialValue" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 507 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 505 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 489 ,
2019-12-29 02:25:08 +00:00
"src" : "2521:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "*" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 506 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 491 ,
2019-12-29 02:25:08 +00:00
"src" : "2525:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "2521:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "2509:17:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 514 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 512 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 510 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 504 ,
2019-12-29 02:25:08 +00:00
"src" : "2544:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "/" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 511 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 489 ,
2019-12-29 02:25:08 +00:00
"src" : "2548:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "2544:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "==" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 513 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 491 ,
2019-12-29 02:25:08 +00:00
"src" : "2553:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "2544:10:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77" ,
2020-02-18 05:18:07 +00:00
"id" : 515 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2556:35:3" ,
"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\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 509 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "2536:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 516 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2536:56:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 517 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "2536:56:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 518 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 504 ,
2019-12-29 02:25:08 +00:00
"src" : "2610:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 495 ,
"id" : 519 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "2603:8:3"
}
]
} ,
"documentation" : "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow." ,
2020-02-18 05:18:07 +00:00
"id" : 521 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "mul" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 492 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 489 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 521 ,
2019-12-29 02:25:08 +00:00
"src" : "2172:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 488 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2172:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 491 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 521 ,
2019-12-29 02:25:08 +00:00
"src" : "2183:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 490 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2183:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "2171:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 495 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 494 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 521 ,
2019-12-29 02:25:08 +00:00
"src" : "2217:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 493 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2217:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "2216:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "2159:459:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 536 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "3140:63:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 531 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 523 ,
2019-12-29 02:25:08 +00:00
"src" : "3161:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 532 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 525 ,
2019-12-29 02:25:08 +00:00
"src" : "3164:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a206469766973696f6e206279207a65726f" ,
2020-02-18 05:18:07 +00:00
"id" : 533 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "3167:28:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f" ,
"typeString" : "literal_string \"SafeMath: division by zero\""
} ,
"value" : "SafeMath: division by zero"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f" ,
"typeString" : "literal_string \"SafeMath: division by zero\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 530 ,
2019-12-29 02:25:08 +00:00
"name" : "div" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
537 ,
564
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3157:3:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$" ,
"typeString" : "function (uint256,uint256,string memory) pure returns (uint256)"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 534 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "3157:39:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 529 ,
"id" : 535 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "3150:46:3"
}
]
} ,
"documentation" : "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision 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\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero." ,
2020-02-18 05:18:07 +00:00
"id" : 537 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "div" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 526 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 523 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 537 ,
2019-12-29 02:25:08 +00:00
"src" : "3086:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 522 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3086:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 525 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 537 ,
2019-12-29 02:25:08 +00:00
"src" : "3097:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 524 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3097:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3085:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 529 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 528 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 537 ,
2019-12-29 02:25:08 +00:00
"src" : "3131:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 527 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3131:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3130:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "3073:130:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 563 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "3813:243:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 551 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 549 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 541 ,
2019-12-29 02:25:08 +00:00
"src" : "3897:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : ">" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2020-02-18 05:18:07 +00:00
"id" : 550 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "3901:1:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
"src" : "3897:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 552 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 543 ,
2019-12-29 02:25:08 +00:00
"src" : "3904:12:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 548 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "3889:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 553 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "3889:28:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 554 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "3889:28:3"
} ,
{
"assignments" : [
2020-02-18 05:18:07 +00:00
556
2019-12-29 02:25:08 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 556 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 563 ,
2019-12-29 02:25:08 +00:00
"src" : "3927:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 555 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3927:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 560 ,
2019-12-29 02:25:08 +00:00
"initialValue" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 559 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 557 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 539 ,
2019-12-29 02:25:08 +00:00
"src" : "3939:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "/" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 558 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 541 ,
2019-12-29 02:25:08 +00:00
"src" : "3943:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "3939:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "3927:17:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 561 ,
2019-12-29 02:25:08 +00:00
"name" : "c" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 556 ,
2019-12-29 02:25:08 +00:00
"src" : "4048:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 547 ,
"id" : 562 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "4041:8:3"
}
]
} ,
"documentation" : "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision 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\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._" ,
2020-02-18 05:18:07 +00:00
"id" : 564 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "div" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 544 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 539 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3731:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 538 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3731:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 541 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3742:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 540 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3742:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 543 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3753:26:3" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 542 ,
2019-12-29 02:25:08 +00:00
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3753:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3730:50:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 547 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 546 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 564 ,
2019-12-29 02:25:08 +00:00
"src" : "3804:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 545 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3804:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3803:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "3718:338:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 579 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "4567:61:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 574 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 566 ,
2019-12-29 02:25:08 +00:00
"src" : "4588:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 575 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 568 ,
2019-12-29 02:25:08 +00:00
"src" : "4591:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "536166654d6174683a206d6f64756c6f206279207a65726f" ,
2020-02-18 05:18:07 +00:00
"id" : 576 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "4594:26:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832" ,
"typeString" : "literal_string \"SafeMath: modulo by zero\""
} ,
"value" : "SafeMath: modulo by zero"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832" ,
"typeString" : "literal_string \"SafeMath: modulo by zero\""
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 573 ,
2019-12-29 02:25:08 +00:00
"name" : "mod" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
580 ,
603
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "4584:3:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$" ,
"typeString" : "function (uint256,uint256,string memory) pure returns (uint256)"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 577 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "4584:37:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 572 ,
"id" : 578 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "4577:44:3"
}
]
} ,
"documentation" : "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero." ,
2020-02-18 05:18:07 +00:00
"id" : 580 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "mod" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 569 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 566 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 580 ,
2019-12-29 02:25:08 +00:00
"src" : "4513:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 565 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "4513:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 568 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 580 ,
2019-12-29 02:25:08 +00:00
"src" : "4524:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 567 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "4524:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "4512:22:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 572 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 571 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 580 ,
2019-12-29 02:25:08 +00:00
"src" : "4558:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 570 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "4558:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "4557:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "4500:128:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2020-02-18 05:18:07 +00:00
"id" : 602 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Block" ,
"src" : "5227:68:3" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 594 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 592 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 584 ,
2019-12-29 02:25:08 +00:00
"src" : "5245:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2020-02-18 05:18:07 +00:00
"id" : 593 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "5250:1:3" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
"src" : "5245:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 595 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 586 ,
2019-12-29 02:25:08 +00:00
"src" : "5253:12:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
2020-02-18 05:18:07 +00:00
"id" : 591 ,
2019-12-29 02:25:08 +00:00
"name" : "require" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [
2020-02-18 05:18:07 +00:00
1096 ,
1097
2019-12-29 02:25:08 +00:00
] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 1097 ,
2019-12-29 02:25:08 +00:00
"src" : "5237:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 596 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "5237:29:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2020-02-18 05:18:07 +00:00
"id" : 597 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ExpressionStatement" ,
"src" : "5237:29:3"
} ,
{
"expression" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
2020-02-18 05:18:07 +00:00
"id" : 600 ,
2019-12-29 02:25:08 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 598 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 582 ,
2019-12-29 02:25:08 +00:00
"src" : "5283:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "%" ,
"rightExpression" : {
"argumentTypes" : null ,
2020-02-18 05:18:07 +00:00
"id" : 599 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2020-02-18 05:18:07 +00:00
"referencedDeclaration" : 584 ,
2019-12-29 02:25:08 +00:00
"src" : "5287:1:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"src" : "5283:5:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
2020-02-18 05:18:07 +00:00
"functionReturnParameters" : 590 ,
"id" : 601 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "Return" ,
"src" : "5276:12:3"
}
]
} ,
"documentation" : "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._" ,
2020-02-18 05:18:07 +00:00
"id" : 603 ,
2019-12-29 02:25:08 +00:00
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "mod" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2020-02-18 05:18:07 +00:00
"id" : 587 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 582 ,
2019-12-29 02:25:08 +00:00
"name" : "a" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "5145:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 581 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "5145:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 584 ,
2019-12-29 02:25:08 +00:00
"name" : "b" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "5156:9:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 583 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "5156:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 586 ,
2019-12-29 02:25:08 +00:00
"name" : "errorMessage" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "5167:26:3" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 585 ,
2019-12-29 02:25:08 +00:00
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "5167:6:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "5144:50:3"
} ,
"returnParameters" : {
2020-02-18 05:18:07 +00:00
"id" : 590 ,
2019-12-29 02:25:08 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2020-02-18 05:18:07 +00:00
"id" : 589 ,
2019-12-29 02:25:08 +00:00
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
2020-02-18 05:18:07 +00:00
"scope" : 603 ,
2019-12-29 02:25:08 +00:00
"src" : "5218:7:3" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
2020-02-18 05:18:07 +00:00
"id" : 588 ,
2019-12-29 02:25:08 +00:00
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "5218:7:3" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "5217:9:3"
} ,
2020-02-18 05:18:07 +00:00
"scope" : 604 ,
2019-12-29 02:25:08 +00:00
"src" : "5132:163:3" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "internal"
}
] ,
2020-02-18 05:18:07 +00:00
"scope" : 605 ,
2019-12-29 02:25:08 +00:00
"src" : "589:4708:3"
}
] ,
"src" : "0:5298:3"
} ,
"compiler" : {
"name" : "solc" ,
"version" : "0.5.12+commit.7709ece9.Emscripten.clang"
} ,
"networks" : { } ,
"schemaVersion" : "3.0.19" ,
2020-02-18 05:18:07 +00:00
"updatedAt" : "2020-02-18T05:14:13.973Z" ,
2019-12-29 02:25:08 +00:00
"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." ,
"methods" : { }
} ,
"userdoc" : {
"methods" : { }
}
}