UNPKG

hardlydifficult-ethereum-contracts

Version:
868 lines 33 kB
{ "contractName": "UtilsMock", "abi": [ { "constant": true, "inputs": [], "name": "chainId", "outputs": [ { "internalType": "uint256", "name": "_chainId", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [], "name": "gasPrice", "outputs": [ { "internalType": "uint256", "name": "_gasPrice", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "gasRemaining", "outputs": [ { "internalType": "uint256", "name": "_gasRemaining", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gasPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gasRemaining\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasRemaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/circleci/repo/contracts/test-artifacts/UtilsMock.sol\":\"UtilsMock\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"/home/circleci/repo/contracts/test-artifacts/UtilsMock.sol\":{\"keccak256\":\"0x2ab7b072f25e5dbc0e449aaa8223a9754a07c404aaffaee4292f09350a6e1109\",\"urls\":[\"bzz-raw://7cb0fe025ae4ea49029966fe7774f91b927a3ba2aa5acea71daf29de2de089a4\",\"dweb:/ipfs/QmcgyGKx4hy6SYBsAmAJvK7Rxbyq7NbfpD3sC3xtMbttix\"]},\"/home/circleci/repo/contracts/utils/ChainId.sol\":{\"keccak256\":\"0x3c78557f65a0c04a833a20663f09266d9a66222f648214714ca5d79702f23ba4\",\"urls\":[\"bzz-raw://713aa6723b017ff9e30d188109c3e13d9d28be5f1268827a67f99028b6ca23b6\",\"dweb:/ipfs/Qma96Xihd4BYiJmmFkb4ou5wQtHp41C7Fn2A5BjpXcW6hN\"]},\"/home/circleci/repo/contracts/utils/Gas.sol\":{\"keccak256\":\"0xe92a1f2be436a34bac9370abc2c85a1e170005555968d9be92aa885bdf03a38b\",\"urls\":[\"bzz-raw://20c2bac3042e4fe0b41bbf6e7bb8513d838b6a464a663b6db535fff620129ca1\",\"dweb:/ipfs/QmXirymgvvjHbQhoQ7c5dRhFgV7twCdUdaroZgkmTufwsP\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060c78061001f6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80637a4cc7451460415780639a8a0592146059578063fe173b9714605f575b600080fd5b60476065565b60408051918252519081900360200190f35b60476072565b6047607a565b6000606d6082565b905090565b6000606d608a565b6000606d608e565b60005a905090565b4690565b3a9056fea265627a7a7231582039dc1f81f5979d7ffd0beb21bd1eaa32f6a3bf8cca580da0b195498ec9b92c9a64736f6c63430005110032", "deployedBytecode": "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c80637a4cc7451460415780639a8a0592146059578063fe173b9714605f575b600080fd5b60476065565b60408051918252519081900360200190f35b60476072565b6047607a565b6000606d6082565b905090565b6000606d608a565b6000606d608e565b60005a905090565b4690565b3a9056fea265627a7a7231582039dc1f81f5979d7ffd0beb21bd1eaa32f6a3bf8cca580da0b195498ec9b92c9a64736f6c63430005110032", "sourceMap": "85:340:20:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;85:340:20;;;;;;;", "deployedSourceMap": "85:340:20:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;85:340:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;313:110;;;:::i;:::-;;;;;;;;;;;;;;;;108:99;;;:::i;211:98::-;;;:::i;313:110::-;365:18;400;:16;:18::i;:::-;393:25;;313:110;:::o;108:99::-;155:13;185:17;:15;:17::i;211:98::-;259:14;290;:12;:14::i;206:167:23:-;260:18;358:5;341:22;;333:36;:::o;46:156:22:-;183:9;;163:35::o;42:160:23:-;182:10;;161:37::o", "source": "pragma solidity ^0.5.0;\n\n\nimport '../utils/ChainId.sol';\nimport '../utils/Gas.sol';\n\ncontract UtilsMock\n{\n function chainId(\n ) public pure\n returns (uint _chainId)\n {\n return ChainId.chainId();\n }\n\n function gasPrice(\n ) public view\n returns (uint _gasPrice)\n {\n return Gas.gasPrice();\n }\n\n function gasRemaining(\n ) public view\n returns (uint _gasRemaining)\n {\n return Gas.gasRemaining();\n }\n}\n", "sourcePath": "/home/circleci/repo/contracts/test-artifacts/UtilsMock.sol", "ast": { "absolutePath": "/home/circleci/repo/contracts/test-artifacts/UtilsMock.sol", "exportedSymbols": { "UtilsMock": [ 1743 ] }, "id": 1744, "nodeType": "SourceUnit", "nodes": [ { "id": 1710, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:20" }, { "absolutePath": "/home/circleci/repo/contracts/utils/ChainId.sol", "file": "../utils/ChainId.sol", "id": 1711, "nodeType": "ImportDirective", "scope": 1744, "sourceUnit": 1826, "src": "26:30:20", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/circleci/repo/contracts/utils/Gas.sol", "file": "../utils/Gas.sol", "id": 1712, "nodeType": "ImportDirective", "scope": 1744, "sourceUnit": 1843, "src": "57:26:20", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 1743, "linearizedBaseContracts": [ 1743 ], "name": "UtilsMock", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1721, "nodeType": "Block", "src": "172:35:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 1717, "name": "ChainId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1825, "src": "185:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ChainId_$1825_$", "typeString": "type(library ChainId)" } }, "id": 1718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "chainId", "nodeType": "MemberAccess", "referencedDeclaration": 1824, "src": "185:15:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", "typeString": "function () pure returns (uint256)" } }, "id": 1719, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "185:17:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 1716, "id": 1720, "nodeType": "Return", "src": "178:24:20" } ] }, "documentation": null, "id": 1722, "implemented": true, "kind": "function", "modifiers": [], "name": "chainId", "nodeType": "FunctionDefinition", "parameters": { "id": 1713, "nodeType": "ParameterList", "parameters": [], "src": "124:5:20" }, "returnParameters": { "id": 1716, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1715, "name": "_chainId", "nodeType": "VariableDeclaration", "scope": 1722, "src": "155:13:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1714, "name": "uint", "nodeType": "ElementaryTypeName", "src": "155:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "154:15:20" }, "scope": 1743, "src": "108:99:20", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { "id": 1731, "nodeType": "Block", "src": "277:32:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 1727, "name": "Gas", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1842, "src": "290:3:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Gas_$1842_$", "typeString": "type(library Gas)" } }, "id": 1728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "gasPrice", "nodeType": "MemberAccess", "referencedDeclaration": 1834, "src": "290:12:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 1729, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "290:14:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 1726, "id": 1730, "nodeType": "Return", "src": "283:21:20" } ] }, "documentation": null, "id": 1732, "implemented": true, "kind": "function", "modifiers": [], "name": "gasPrice", "nodeType": "FunctionDefinition", "parameters": { "id": 1723, "nodeType": "ParameterList", "parameters": [], "src": "228:5:20" }, "returnParameters": { "id": 1726, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1725, "name": "_gasPrice", "nodeType": "VariableDeclaration", "scope": 1732, "src": "259:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1724, "name": "uint", "nodeType": "ElementaryTypeName", "src": "259:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "258:16:20" }, "scope": 1743, "src": "211:98:20", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 1741, "nodeType": "Block", "src": "387:36:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 1737, "name": "Gas", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1842, "src": "400:3:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Gas_$1842_$", "typeString": "type(library Gas)" } }, "id": 1738, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "gasRemaining", "nodeType": "MemberAccess", "referencedDeclaration": 1841, "src": "400:16:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 1739, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "400:18:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 1736, "id": 1740, "nodeType": "Return", "src": "393:25:20" } ] }, "documentation": null, "id": 1742, "implemented": true, "kind": "function", "modifiers": [], "name": "gasRemaining", "nodeType": "FunctionDefinition", "parameters": { "id": 1733, "nodeType": "ParameterList", "parameters": [], "src": "334:5:20" }, "returnParameters": { "id": 1736, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1735, "name": "_gasRemaining", "nodeType": "VariableDeclaration", "scope": 1742, "src": "365:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1734, "name": "uint", "nodeType": "ElementaryTypeName", "src": "365:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "364:20:20" }, "scope": 1743, "src": "313:110:20", "stateMutability": "view", "superFunction": null, "visibility": "public" } ], "scope": 1744, "src": "85:340:20" } ], "src": "0:426:20" }, "legacyAST": { "absolutePath": "/home/circleci/repo/contracts/test-artifacts/UtilsMock.sol", "exportedSymbols": { "UtilsMock": [ 1743 ] }, "id": 1744, "nodeType": "SourceUnit", "nodes": [ { "id": 1710, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:20" }, { "absolutePath": "/home/circleci/repo/contracts/utils/ChainId.sol", "file": "../utils/ChainId.sol", "id": 1711, "nodeType": "ImportDirective", "scope": 1744, "sourceUnit": 1826, "src": "26:30:20", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/circleci/repo/contracts/utils/Gas.sol", "file": "../utils/Gas.sol", "id": 1712, "nodeType": "ImportDirective", "scope": 1744, "sourceUnit": 1843, "src": "57:26:20", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 1743, "linearizedBaseContracts": [ 1743 ], "name": "UtilsMock", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1721, "nodeType": "Block", "src": "172:35:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 1717, "name": "ChainId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1825, "src": "185:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ChainId_$1825_$", "typeString": "type(library ChainId)" } }, "id": 1718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "chainId", "nodeType": "MemberAccess", "referencedDeclaration": 1824, "src": "185:15:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", "typeString": "function () pure returns (uint256)" } }, "id": 1719, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "185:17:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 1716, "id": 1720, "nodeType": "Return", "src": "178:24:20" } ] }, "documentation": null, "id": 1722, "implemented": true, "kind": "function", "modifiers": [], "name": "chainId", "nodeType": "FunctionDefinition", "parameters": { "id": 1713, "nodeType": "ParameterList", "parameters": [], "src": "124:5:20" }, "returnParameters": { "id": 1716, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1715, "name": "_chainId", "nodeType": "VariableDeclaration", "scope": 1722, "src": "155:13:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1714, "name": "uint", "nodeType": "ElementaryTypeName", "src": "155:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "154:15:20" }, "scope": 1743, "src": "108:99:20", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { "id": 1731, "nodeType": "Block", "src": "277:32:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 1727, "name": "Gas", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1842, "src": "290:3:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Gas_$1842_$", "typeString": "type(library Gas)" } }, "id": 1728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "gasPrice", "nodeType": "MemberAccess", "referencedDeclaration": 1834, "src": "290:12:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 1729, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "290:14:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 1726, "id": 1730, "nodeType": "Return", "src": "283:21:20" } ] }, "documentation": null, "id": 1732, "implemented": true, "kind": "function", "modifiers": [], "name": "gasPrice", "nodeType": "FunctionDefinition", "parameters": { "id": 1723, "nodeType": "ParameterList", "parameters": [], "src": "228:5:20" }, "returnParameters": { "id": 1726, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1725, "name": "_gasPrice", "nodeType": "VariableDeclaration", "scope": 1732, "src": "259:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1724, "name": "uint", "nodeType": "ElementaryTypeName", "src": "259:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "258:16:20" }, "scope": 1743, "src": "211:98:20", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 1741, "nodeType": "Block", "src": "387:36:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 1737, "name": "Gas", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1842, "src": "400:3:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Gas_$1842_$", "typeString": "type(library Gas)" } }, "id": 1738, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "gasRemaining", "nodeType": "MemberAccess", "referencedDeclaration": 1841, "src": "400:16:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 1739, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "400:18:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 1736, "id": 1740, "nodeType": "Return", "src": "393:25:20" } ] }, "documentation": null, "id": 1742, "implemented": true, "kind": "function", "modifiers": [], "name": "gasRemaining", "nodeType": "FunctionDefinition", "parameters": { "id": 1733, "nodeType": "ParameterList", "parameters": [], "src": "334:5:20" }, "returnParameters": { "id": 1736, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1735, "name": "_gasRemaining", "nodeType": "VariableDeclaration", "scope": 1742, "src": "365:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1734, "name": "uint", "nodeType": "ElementaryTypeName", "src": "365:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "364:20:20" }, "scope": 1743, "src": "313:110:20", "stateMutability": "view", "superFunction": null, "visibility": "public" } ], "scope": 1744, "src": "85:340:20" } ], "src": "0:426:20" }, "compiler": { "name": "solc", "version": "0.5.17+commit.d19bba13.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.23", "updatedAt": "2020-04-07T20:17:34.959Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } }