hardlydifficult-eth
Version:
A collection of reusable contracts and Javascript helpers for Ethereum.
320 lines • 10.6 kB
JSON
{
"contractName": "ChainId",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.6.10+commit.00c0fcaf\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/utils/ChainId.sol\":\"ChainId\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"project:/contracts/utils/ChainId.sol\":{\"keccak256\":\"0x17511084795a9b8e42b63271b3cfeba235736a686f4c5a9c0975a24b3328493f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2bd47104a8db2b22febfe93ec1fcc4c24f7c70085bc417ca17779d4d258e3a26\",\"dweb:/ipfs/Qme1fwzGaeySZkVdMUMRiWqXmuPH4Y8TKnERtLVqH19omx\"]}},\"version\":1}",
"bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204072c5c3de10ed9db99d5236243ee526a7991ded9f45bb6cdee7f58f98c6287264736f6c634300060a0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204072c5c3de10ed9db99d5236243ee526a7991ded9f45bb6cdee7f58f98c6287264736f6c634300060a0033",
"immutableReferences": {},
"sourceMap": "58:178:31:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "58:178:31:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\n\nlibrary ChainId\n{\n function chainId(\n ) internal pure\n returns (uint _chainId)\n {\n // solium-disable-next-line\n assembly\n {\n _chainId := chainid()\n }\n }\n}",
"sourcePath": "/home/circleci/repo/contracts/utils/ChainId.sol",
"ast": {
"absolutePath": "project:/contracts/utils/ChainId.sol",
"exportedSymbols": {
"ChainId": [
4198
]
},
"id": 4199,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4190,
"literals": [
"solidity",
"^",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "32:23:31"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 4198,
"linearizedBaseContracts": [
4198
],
"name": "ChainId",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4196,
"nodeType": "Block",
"src": "144:90:31",
"statements": [
{
"AST": {
"nodeType": "YulBlock",
"src": "195:35:31",
"statements": [
{
"nodeType": "YulAssignment",
"src": "203:21:31",
"value": {
"arguments": [],
"functionName": {
"name": "chainid",
"nodeType": "YulIdentifier",
"src": "215:7:31"
},
"nodeType": "YulFunctionCall",
"src": "215:9:31"
},
"variableNames": [
{
"name": "_chainId",
"nodeType": "YulIdentifier",
"src": "203:8:31"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 4193,
"isOffset": false,
"isSlot": false,
"src": "203:8:31",
"valueSize": 1
}
],
"id": 4195,
"nodeType": "InlineAssembly",
"src": "182:48:31"
}
]
},
"documentation": null,
"id": 4197,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "chainId",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4191,
"nodeType": "ParameterList",
"parameters": [],
"src": "94:5:31"
},
"returnParameters": {
"id": 4194,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4193,
"mutability": "mutable",
"name": "_chainId",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4197,
"src": "127:13:31",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4192,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "127:4:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "126:15:31"
},
"scope": 4198,
"src": "78:156:31",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 4199,
"src": "58:178:31"
}
],
"src": "32:204:31"
},
"legacyAST": {
"attributes": {
"absolutePath": "project:/contracts/utils/ChainId.sol",
"exportedSymbols": {
"ChainId": [
4198
]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.6",
".0"
]
},
"id": 4190,
"name": "PragmaDirective",
"src": "32:23:31"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [
4198
],
"name": "ChainId",
"scope": 4199
},
"children": [
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "chainId",
"overrides": null,
"scope": 4198,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 4191,
"name": "ParameterList",
"src": "94:5:31"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "_chainId",
"overrides": null,
"scope": 4197,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 4192,
"name": "ElementaryTypeName",
"src": "127:4:31"
}
],
"id": 4193,
"name": "VariableDeclaration",
"src": "127:13:31"
}
],
"id": 4194,
"name": "ParameterList",
"src": "126:15:31"
},
{
"children": [
{
"attributes": {
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 4193,
"isOffset": false,
"isSlot": false,
"src": "203:8:31",
"valueSize": 1
}
],
"operations": "{ _chainId := chainid() }"
},
"children": [],
"id": 4195,
"name": "InlineAssembly",
"src": "182:48:31"
}
],
"id": 4196,
"name": "Block",
"src": "144:90:31"
}
],
"id": 4197,
"name": "FunctionDefinition",
"src": "78:156:31"
}
],
"id": 4198,
"name": "ContractDefinition",
"src": "58:178:31"
}
],
"id": 4199,
"name": "SourceUnit",
"src": "32:204:31"
},
"compiler": {
"name": "solc",
"version": "0.6.10+commit.00c0fcaf.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.1",
"updatedAt": "2021-07-08T17:04:13.924Z",
"devdoc": {
"methods": {}
},
"userdoc": {
"methods": {}
}
}