@maplelabs/core-artifacts
Version:
Consist artifacts of the maple protocol
383 lines (382 loc) • 16.7 kB
JSON
{
"id": "9cdffeb0095bf405f28fa85f16b93e0d",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.11",
"solcLongVersion": "0.6.11+commit.5ef660b1",
"input": {
"language": "Solidity",
"sources": {
"contracts/libraries/math/v1/SafeMathInt.sol": {
"content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/libraries/math/v1/SafeMathInt.sol\npragma solidity =0.6.11;\n\n////// contracts/libraries/math/v1/SafeMathInt.sol\n/* pragma solidity 0.6.11; */\n\nlibrary SafeMathInt {\n\n function toUint256Safe(int256 a) internal pure returns (uint256) {\n require(a >= 0, \"SMI:NEG\");\n return uint256(a);\n }\n\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"ast"
]
}
}
}
},
"output": {
"contracts": {
"contracts/libraries/math/v1/SafeMathInt.sol": {
"SafeMathInt": {
"abi": [],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c901b130ffeb9f8809a7926bb050e12b8ea429bf63e8992735a75cf85665e5f064736f6c634300060b0033",
"opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC9 ADD 0xB1 ADDRESS SELFDESTRUCT 0xEB SWAP16 DUP9 MULMOD 0xA7 SWAP3 PUSH12 0xB050E12B8EA429BF63E89927 CALLDATALOAD 0xA7 0x5C 0xF8 JUMP PUSH6 0xE5F064736F6C PUSH4 0x4300060B STOP CALLER ",
"sourceMap": "228:165:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c901b130ffeb9f8809a7926bb050e12b8ea429bf63e8992735a75cf85665e5f064736f6c634300060b0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC9 ADD 0xB1 ADDRESS SELFDESTRUCT 0xEB SWAP16 DUP9 MULMOD 0xA7 SWAP3 PUSH12 0xB050E12B8EA429BF63E89927 CALLDATALOAD 0xA7 0x5C 0xF8 JUMP PUSH6 0xE5F064736F6C PUSH4 0x4300060B STOP CALLER ",
"sourceMap": "228:165:0:-:0;;;;;;;;"
},
"methodIdentifiers": {}
}
}
}
},
"sources": {
"contracts/libraries/math/v1/SafeMathInt.sol": {
"ast": {
"absolutePath": "contracts/libraries/math/v1/SafeMathInt.sol",
"exportedSymbols": {
"SafeMathInt": [
22
]
},
"id": 23,
"license": "AGPL-3.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"=",
"0.6",
".11"
],
"nodeType": "PragmaDirective",
"src": "120:24:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 22,
"linearizedBaseContracts": [
22
],
"name": "SafeMathInt",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 20,
"nodeType": "Block",
"src": "320:70:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 11,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 9,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "338:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "343:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "338:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "534d493a4e4547",
"id": 12,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "346:9:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f8f36ed7822abb9a7af4802b9b67b650ae68495c0b71826aaa5876de2b35b33",
"typeString": "literal_string \"SMI:NEG\""
},
"value": "SMI:NEG"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f8f36ed7822abb9a7af4802b9b67b650ae68495c0b71826aaa5876de2b35b33",
"typeString": "literal_string \"SMI:NEG\""
}
],
"id": 8,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "330:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 13,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "330:26:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 14,
"nodeType": "ExpressionStatement",
"src": "330:26:0"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 17,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "381:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 16,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "373:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 15,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "373:7:0",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 18,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "373:10:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 7,
"id": 19,
"nodeType": "Return",
"src": "366:17:0"
}
]
},
"documentation": null,
"id": 21,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint256Safe",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21,
"src": "278:8:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 2,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "278:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "277:10:0"
},
"returnParameters": {
"id": 7,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21,
"src": "311:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "311:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "310:9:0"
},
"scope": 22,
"src": "255:135:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 23,
"src": "228:165:0"
}
],
"src": "120:274:0"
},
"id": 0
}
}
}
}