core-artifacts
Version:
Consist artifacts of the maple protocol
640 lines (639 loc) • 25.5 kB
JSON
{
"id": "51f6e1a34a895e510935f66d65eb96c5",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.11",
"solcLongVersion": "0.6.11+commit.5ef660b1",
"input": {
"language": "Solidity",
"sources": {
"contracts/core/usd-oracle/v1/UsdOracle.sol": {
"content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/usd-oracle/v1/UsdOracle.sol\npragma solidity =0.6.11;\n\n////// contracts/core/oracle/v1/interfaces/IOracle.sol\n/* pragma solidity 0.6.11; */\n\n/// @title Oracle is a price oracle feed.\ninterface IOracle {\n\n /**\n @dev Returns the price of the asset.\n */\n function getLatestPrice() external view returns (int256);\n\n}\n\n////// contracts/core/usd-oracle/v1/interfaces/IUsdOracle.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IOracle } from \"../../../oracle/v1/interfaces/IOracle.sol\"; */\n\n/// @title UsdOracle is a constant price oracle feed that always returns 1 USD in 8 decimal precision.\ninterface IUsdOracle is IOracle {\n\n /**\n @dev Returns the constant USD price.\n */\n function getLatestPrice() external override view returns (int256);\n \n}\n\n////// contracts/core/usd-oracle/v1/UsdOracle.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IUsdOracle } from \"./interfaces/IUsdOracle.sol\"; */\n\n/// @title UsdOracle is a constant price oracle feed that always returns 1 USD in 8 decimal precision.\ncontract UsdOracle is IUsdOracle {\n\n int256 constant USD_PRICE = 1 * 10 ** 8;\n\n function getLatestPrice() public override view returns (int256) {\n return USD_PRICE;\n }\n\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"ast"
]
}
}
}
},
"output": {
"contracts": {
"contracts/core/usd-oracle/v1/UsdOracle.sol": {
"IOracle": {
"abi": [
{
"inputs": [],
"name": "getLatestPrice",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"getLatestPrice()": "8e15f473"
}
}
},
"IUsdOracle": {
"abi": [
{
"inputs": [],
"name": "getLatestPrice",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"getLatestPrice()": "8e15f473"
}
}
},
"UsdOracle": {
"abi": [
{
"inputs": [],
"name": "getLatestPrice",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b5060838061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80638e15f47314602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6305f5e1009056fea2646970667358221220fc5541ba6778eed3d3d2d5cd3bb06496ae3bdcf101f7e7ed5769bc23c570302264736f6c634300060b0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x83 DUP1 PUSH2 0x1E PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8E15F473 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x45 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH4 0x5F5E100 SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xFC SSTORE COINBASE 0xBA PUSH8 0x78EED3D3D2D5CD3B 0xB0 PUSH5 0x96AE3BDCF1 ADD 0xF7 0xE7 0xED JUMPI PUSH10 0xBC23C570302264736F6C PUSH4 0x4300060B STOP CALLER ",
"sourceMap": "1117:186:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b506004361060285760003560e01c80638e15f47314602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6305f5e1009056fea2646970667358221220fc5541ba6778eed3d3d2d5cd3bb06496ae3bdcf101f7e7ed5769bc23c570302264736f6c634300060b0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8E15F473 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x45 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH4 0x5F5E100 SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xFC SSTORE COINBASE 0xBA PUSH8 0x78EED3D3D2D5CD3B 0xB0 PUSH5 0x96AE3BDCF1 ADD 0xF7 0xE7 0xED JUMPI PUSH10 0xBC23C570302264736F6C PUSH4 0x4300060B STOP CALLER ",
"sourceMap": "1117:186:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1203:97;;;:::i;:::-;;;;;;;;;;;;;;;;;1185:11;1203:97;:::o"
},
"methodIdentifiers": {
"getLatestPrice()": "8e15f473"
}
}
}
}
},
"sources": {
"contracts/core/usd-oracle/v1/UsdOracle.sol": {
"ast": {
"absolutePath": "contracts/core/usd-oracle/v1/UsdOracle.sol",
"exportedSymbols": {
"IOracle": [
9
],
"IUsdOracle": [
20
],
"UsdOracle": [
40
]
},
"id": 41,
"license": "AGPL-3.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"=",
"0.6",
".11"
],
"nodeType": "PragmaDirective",
"src": "119:24:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "231:42:0",
"text": "@title Oracle is a price oracle feed."
},
"fullyImplemented": false,
"id": 9,
"linearizedBaseContracts": [
9
],
"name": "IOracle",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "298:56:0",
"text": "@dev Returns the price of the asset."
},
"functionSelector": "8e15f473",
"id": 8,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getLatestPrice",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "382:2:0"
},
"returnParameters": {
"id": 7,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8,
"src": "408:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 5,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "408:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "407:8:0"
},
"scope": 9,
"src": "359:57:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 41,
"src": "273:146:0"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11,
"name": "IOracle",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 9,
"src": "717:7:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IOracle_$9",
"typeString": "contract IOracle"
}
},
"id": 12,
"nodeType": "InheritanceSpecifier",
"src": "717:7:0"
}
],
"contractDependencies": [
9
],
"contractKind": "interface",
"documentation": {
"id": 10,
"nodeType": "StructuredDocumentation",
"src": "590:103:0",
"text": "@title UsdOracle is a constant price oracle feed that always returns 1 USD in 8 decimal precision."
},
"fullyImplemented": false,
"id": 20,
"linearizedBaseContracts": [
20,
9
],
"name": "IUsdOracle",
"nodeType": "ContractDefinition",
"nodes": [
{
"baseFunctions": [
8
],
"body": null,
"documentation": {
"id": 13,
"nodeType": "StructuredDocumentation",
"src": "732:56:0",
"text": "@dev Returns the constant USD price."
},
"functionSelector": "8e15f473",
"id": 19,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getLatestPrice",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 15,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "828:8:0"
},
"parameters": {
"id": 14,
"nodeType": "ParameterList",
"parameters": [],
"src": "816:2:0"
},
"returnParameters": {
"id": 18,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 19,
"src": "851:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 16,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "851:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "850:8:0"
},
"scope": 20,
"src": "793:66:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 41,
"src": "693:173:0"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22,
"name": "IUsdOracle",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 20,
"src": "1139:10:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IUsdOracle_$20",
"typeString": "contract IUsdOracle"
}
},
"id": 23,
"nodeType": "InheritanceSpecifier",
"src": "1139:10:0"
}
],
"contractDependencies": [
9,
20
],
"contractKind": "contract",
"documentation": {
"id": 21,
"nodeType": "StructuredDocumentation",
"src": "1014:103:0",
"text": "@title UsdOracle is a constant price oracle feed that always returns 1 USD in 8 decimal precision."
},
"fullyImplemented": true,
"id": 40,
"linearizedBaseContracts": [
40,
20,
9
],
"name": "UsdOracle",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 30,
"mutability": "constant",
"name": "USD_PRICE",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 40,
"src": "1157:39:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 24,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1157:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"value": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_100000000_by_1",
"typeString": "int_const 100000000"
},
"id": 29,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 25,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1185:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_100000000_by_1",
"typeString": "int_const 100000000"
},
"id": 28,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 26,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1189:2:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"argumentTypes": null,
"hexValue": "38",
"id": 27,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1195:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "1189:7:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_100000000_by_1",
"typeString": "int_const 100000000"
}
},
"src": "1185:11:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_100000000_by_1",
"typeString": "int_const 100000000"
}
},
"visibility": "internal"
},
{
"baseFunctions": [
19
],
"body": {
"id": 38,
"nodeType": "Block",
"src": "1267:33:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 36,
"name": "USD_PRICE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "1284:9:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"functionReturnParameters": 35,
"id": 37,
"nodeType": "Return",
"src": "1277:16:0"
}
]
},
"documentation": null,
"functionSelector": "8e15f473",
"id": 39,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getLatestPrice",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 32,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1236:8:0"
},
"parameters": {
"id": 31,
"nodeType": "ParameterList",
"parameters": [],
"src": "1226:2:0"
},
"returnParameters": {
"id": 35,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 34,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 39,
"src": "1259:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 33,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1259:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1258:8:0"
},
"scope": 40,
"src": "1203:97:0",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
}
],
"scope": 41,
"src": "1117:186:0"
}
],
"src": "119:1185:0"
},
"id": 0
}
}
}
}