UNPKG

@maplelabs/core-artifacts

Version:

Consist artifacts of the maple protocol

410 lines (409 loc) 18 kB
{ "id": "48716db7f035151bee1f8941cbf6aee3", "_format": "hh-sol-build-info-1", "solcVersion": "0.6.11", "solcLongVersion": "0.6.11+commit.5ef660b1", "input": { "language": "Solidity", "sources": { "contracts/libraries/math/v1/SafeMathUint.sol": { "content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/libraries/math/v1/SafeMathUint.sol\npragma solidity =0.6.11;\n\n////// contracts/libraries/math/v1/SafeMathUint.sol\n/* pragma solidity 0.6.11; */\n\nlibrary SafeMathUint {\n\n function toInt256Safe(uint256 a) internal pure returns (int256 b) {\n b = int256(a);\n require(b >= 0, \"SMU:OOB\");\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/SafeMathUint.sol": { "SafeMathUint": { "abi": [], "evm": { "bytecode": { "linkReferences": {}, "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122098ae57075e61175f0b32822884b0205489536d32419ba771e5acd19cc2e1a04664736f6c634300060b0033", "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 SWAP9 0xAE JUMPI SMOD 0x5E PUSH2 0x175F SIGNEXTEND ORIGIN DUP3 0x28 DUP5 0xB0 KECCAK256 SLOAD DUP10 MSTORE8 PUSH14 0x32419BA771E5ACD19CC2E1A04664 PUSH20 0x6F6C634300060B00330000000000000000000000 ", "sourceMap": "230:163:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" }, "deployedBytecode": { "immutableReferences": {}, "linkReferences": {}, "object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122098ae57075e61175f0b32822884b0205489536d32419ba771e5acd19cc2e1a04664736f6c634300060b0033", "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP9 0xAE JUMPI SMOD 0x5E PUSH2 0x175F SIGNEXTEND ORIGIN DUP3 0x28 DUP5 0xB0 KECCAK256 SLOAD DUP10 MSTORE8 PUSH14 0x32419BA771E5ACD19CC2E1A04664 PUSH20 0x6F6C634300060B00330000000000000000000000 ", "sourceMap": "230:163:0:-:0;;;;;;;;" }, "methodIdentifiers": {} } } } }, "sources": { "contracts/libraries/math/v1/SafeMathUint.sol": { "ast": { "absolutePath": "contracts/libraries/math/v1/SafeMathUint.sol", "exportedSymbols": { "SafeMathUint": [ 24 ] }, "id": 25, "license": "AGPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "=", "0.6", ".11" ], "nodeType": "PragmaDirective", "src": "121:24:0" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 24, "linearizedBaseContracts": [ 24 ], "name": "SafeMathUint", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 22, "nodeType": "Block", "src": "324:66:0", "statements": [ { "expression": { "argumentTypes": null, "id": 13, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, "src": "334:1:0", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "345:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 10, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "338:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": { "id": 9, "name": "int256", "nodeType": "ElementaryTypeName", "src": "338:6:0", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 12, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "338:9:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "src": "334:13:0", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "id": 14, "nodeType": "ExpressionStatement", "src": "334:13:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, "id": 18, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 16, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, "src": "365:1:0", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 17, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "370:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "365:6:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "534d553a4f4f42", "id": 19, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "373:9:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e1296ae3df521f6e35a0f57bb23513ad91c86287a7ab7f6fbae7c6861fccaa61", "typeString": "literal_string \"SMU:OOB\"" }, "value": "SMU:OOB" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_e1296ae3df521f6e35a0f57bb23513ad91c86287a7ab7f6fbae7c6861fccaa61", "typeString": "literal_string \"SMU:OOB\"" } ], "id": 15, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "357:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 20, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "357:26:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 21, "nodeType": "ExpressionStatement", "src": "357:26:0" } ] }, "documentation": null, "id": 23, "implemented": true, "kind": "function", "modifiers": [], "name": "toInt256Safe", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3, "mutability": "mutable", "name": "a", "nodeType": "VariableDeclaration", "overrides": null, "scope": 23, "src": "280:9:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "280:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "279:11:0" }, "returnParameters": { "id": 7, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6, "mutability": "mutable", "name": "b", "nodeType": "VariableDeclaration", "overrides": null, "scope": 23, "src": "314:8:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 5, "name": "int256", "nodeType": "ElementaryTypeName", "src": "314:6:0", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" } ], "src": "313:10:0" }, "scope": 24, "src": "258:132:0", "stateMutability": "pure", "virtual": false, "visibility": "internal" } ], "scope": 25, "src": "230:163:0" } ], "src": "121:273:0" }, "id": 0 } } } }