Skip to content

Instantly share code, notes, and snippets.

@mverzilli
Created August 24, 2022 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mverzilli/01a2d07630fd2d55ecdc62817de171e0 to your computer and use it in GitHub Desktop.
Save mverzilli/01a2d07630fd2d55ecdc62817de171e0 to your computer and use it in GitHub Desktop.
{
"id": "c0a5b134cb541060e191d89568ee7726",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.2",
"solcLongVersion": "0.8.2+commit.661d1103",
"input": {
"language": "Solidity",
"sources": {
"contracts/WithImm.sol": {
"content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract WithImm {\n uint256 public immutable value;\n constructor(uint256 initialValue) {\n value = initialValue;\n }\n\n function greet() public returns(uint256) {\n return value;\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"ast"
]
}
}
}
},
"output": {
"contracts": {
"contracts/WithImm.sol": {
"WithImm": {
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "initialValue",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "greet",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "value",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:654:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "70:80:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "80:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "95:6:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "89:5:1"
},
"nodeType": "YulFunctionCall",
"src": "89:13:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "80:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "138:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "111:26:1"
},
"nodeType": "YulFunctionCall",
"src": "111:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "111:33:1"
}
]
},
"name": "abi_decode_t_uint256_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "48:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "56:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "64:5:1",
"type": ""
}
],
"src": "7:143:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "233:207:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "279:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "288:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "291:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "281:6:1"
},
"nodeType": "YulFunctionCall",
"src": "281:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "281:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "254:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "263:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "250:3:1"
},
"nodeType": "YulFunctionCall",
"src": "250:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "275:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "246:3:1"
},
"nodeType": "YulFunctionCall",
"src": "246:32:1"
},
"nodeType": "YulIf",
"src": "243:2:1"
},
{
"nodeType": "YulBlock",
"src": "305:128:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "320:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "334:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "324:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "349:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "395:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "406:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "391:3:1"
},
"nodeType": "YulFunctionCall",
"src": "391:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "415:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256_fromMemory",
"nodeType": "YulIdentifier",
"src": "359:31:1"
},
"nodeType": "YulFunctionCall",
"src": "359:64:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "349:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "203:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "214:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "226:6:1",
"type": ""
}
],
"src": "156:284:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "491:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "501:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "512:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "501:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "473:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "483:7:1",
"type": ""
}
],
"src": "446:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "572:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "629:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "638:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "641:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "631:6:1"
},
"nodeType": "YulFunctionCall",
"src": "631:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "631:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "595:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "620:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "602:17:1"
},
"nodeType": "YulFunctionCall",
"src": "602:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "592:2:1"
},
"nodeType": "YulFunctionCall",
"src": "592:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "585:6:1"
},
"nodeType": "YulFunctionCall",
"src": "585:43:1"
},
"nodeType": "YulIf",
"src": "582:2:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "565:5:1",
"type": ""
}
],
"src": "529:122:1"
}
]
},
"contents": "{\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "60a060405234801561001057600080fd5b506040516101dc3803806101dc83398181016040528101906100329190610055565b80608081815250505061009f565b60008151905061004f81610088565b92915050565b60006020828403121561006757600080fd5b600061007584828501610040565b91505092915050565b6000819050919050565b6100918161007e565b811461009c57600080fd5b50565b60805161011d6100bf60003960008181606d01526093015261011d6000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80633fa4f245146037578063cfae3217146051575b600080fd5b603d606b565b6040516048919060c4565b60405180910390f35b6057608f565b6040516062919060c4565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b60be8160dd565b82525050565b600060208201905060d7600083018460b7565b92915050565b600081905091905056fea2646970667358221220fca439d8ab3db609fe54235f81550f898351261828c4b67f734c211cae1045a564736f6c63430008020033",
"opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x1DC CODESIZE SUB DUP1 PUSH2 0x1DC DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0x55 JUMP JUMPDEST DUP1 PUSH1 0x80 DUP2 DUP2 MSTORE POP POP POP PUSH2 0x9F JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0x4F DUP2 PUSH2 0x88 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x75 DUP5 DUP3 DUP6 ADD PUSH2 0x40 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x91 DUP2 PUSH2 0x7E JUMP JUMPDEST DUP2 EQ PUSH2 0x9C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH2 0x11D PUSH2 0xBF PUSH1 0x0 CODECOPY PUSH1 0x0 DUP2 DUP2 PUSH1 0x6D ADD MSTORE PUSH1 0x93 ADD MSTORE PUSH2 0x11D 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 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3FA4F245 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0xCFAE3217 EQ PUSH1 0x51 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3D PUSH1 0x6B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x48 SWAP2 SWAP1 PUSH1 0xC4 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x57 PUSH1 0x8F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x62 SWAP2 SWAP1 PUSH1 0xC4 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0xBE DUP2 PUSH1 0xDD JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0xD7 PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0xB7 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xFC LOG4 CODECOPY 0xD8 0xAB RETURNDATASIZE 0xB6 MULMOD INVALID SLOAD 0x23 0x5F DUP2 SSTORE 0xF DUP10 DUP4 MLOAD 0x26 XOR 0x28 0xC4 0xB6 PUSH32 0x734C211CAE1045A564736F6C6343000802003300000000000000000000000000 ",
"sourceMap": "56:208:0:-:0;;;115:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;167:12;159:20;;;;;;115:71;56:208;;7:143:1;;95:6;89:13;80:22;;111:33;138:5;111:33;:::i;:::-;70:80;;;;:::o;156:284::-;;275:2;263:9;254:7;250:23;246:32;243:2;;;291:1;288;281:12;243:2;334:1;359:64;415:7;406:6;395:9;391:22;359:64;:::i;:::-;349:74;;305:128;233:207;;;;:::o;446:77::-;;512:5;501:16;;491:32;;;:::o;529:122::-;602:24;620:5;602:24;:::i;:::-;595:5;592:35;582:2;;641:1;638;631:12;582:2;572:79;:::o;56:208:0:-;;;;;;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:439:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "72:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "89:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "112:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "94:17:1"
},
"nodeType": "YulFunctionCall",
"src": "94:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "82:6:1"
},
"nodeType": "YulFunctionCall",
"src": "82:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "82:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "60:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "67:3:1",
"type": ""
}
],
"src": "7:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "229:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "239:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "251:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "262:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "247:3:1"
},
"nodeType": "YulFunctionCall",
"src": "247:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "239:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "319:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "332:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "343:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "328:3:1"
},
"nodeType": "YulFunctionCall",
"src": "328:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "275:43:1"
},
"nodeType": "YulFunctionCall",
"src": "275:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "275:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "201:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "213:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "224:4:1",
"type": ""
}
],
"src": "131:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "404:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "414:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "425:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "414:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "386:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "396:7:1",
"type": ""
}
],
"src": "359:77:1"
}
]
},
"contents": "{\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {
"3": [
{
"length": 32,
"start": 109
},
{
"length": 32,
"start": 147
}
]
},
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b506004361060325760003560e01c80633fa4f245146037578063cfae3217146051575b600080fd5b603d606b565b6040516048919060c4565b60405180910390f35b6057608f565b6040516062919060c4565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b60be8160dd565b82525050565b600060208201905060d7600083018460b7565b92915050565b600081905091905056fea2646970667358221220fca439d8ab3db609fe54235f81550f898351261828c4b67f734c211cae1045a564736f6c63430008020033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3FA4F245 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0xCFAE3217 EQ PUSH1 0x51 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3D PUSH1 0x6B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x48 SWAP2 SWAP1 PUSH1 0xC4 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x57 PUSH1 0x8F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x62 SWAP2 SWAP1 PUSH1 0xC4 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0xBE DUP2 PUSH1 0xDD JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0xD7 PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0xB7 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xFC LOG4 CODECOPY 0xD8 0xAB RETURNDATASIZE 0xB6 MULMOD INVALID SLOAD 0x23 0x5F DUP2 SSTORE 0xF DUP10 DUP4 MLOAD 0x26 XOR 0x28 0xC4 0xB6 PUSH32 0x734C211CAE1045A564736F6C6343000802003300000000000000000000000000 ",
"sourceMap": "56:208:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;79:30;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;192:70;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;79:30;;;:::o;192:70::-;224:7;250:5;243:12;;192:70;:::o;7:118:1:-;94:24;112:5;94:24;:::i;:::-;89:3;82:37;72:53;;:::o;131:222::-;;262:2;251:9;247:18;239:26;;275:71;343:1;332:9;328:17;319:6;275:71;:::i;:::-;229:124;;;;:::o;359:77::-;;425:5;414:16;;404:32;;;:::o"
},
"methodIdentifiers": {
"greet()": "cfae3217",
"value()": "3fa4f245"
}
}
}
}
},
"errors": [
{
"component": "general",
"errorCode": "2018",
"formattedMessage": "Warning: Function state mutability can be restricted to view\n --> contracts/WithImm.sol:10:5:\n |\n10 | function greet() public returns(uint256) {\n | ^ (Relevant source part starts here and spans across multiple lines).\n\n",
"message": "Function state mutability can be restricted to view",
"severity": "warning",
"sourceLocation": {
"end": 262,
"file": "contracts/WithImm.sol",
"start": 192
},
"type": "Warning"
}
],
"sources": {
"contracts/WithImm.sol": {
"ast": {
"absolutePath": "contracts/WithImm.sol",
"exportedSymbols": {
"WithImm": [
22
]
},
"id": 23,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "31:23:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 22,
"linearizedBaseContracts": [
22
],
"name": "WithImm",
"nameLocation": "65:7:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "3fa4f245",
"id": 3,
"mutability": "immutable",
"name": "value",
"nameLocation": "104:5:0",
"nodeType": "VariableDeclaration",
"scope": 22,
"src": "79:30:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "79:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"body": {
"id": 12,
"nodeType": "Block",
"src": "149:37:0",
"statements": [
{
"expression": {
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 8,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "159:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 9,
"name": "initialValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "167:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "159:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11,
"nodeType": "ExpressionStatement",
"src": "159:20:0"
}
]
},
"id": 13,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "initialValue",
"nameLocation": "135:12:0",
"nodeType": "VariableDeclaration",
"scope": 13,
"src": "127:20:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "127:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "126:22:0"
},
"returnParameters": {
"id": 7,
"nodeType": "ParameterList",
"parameters": [],
"src": "149:0:0"
},
"scope": 22,
"src": "115:71:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 20,
"nodeType": "Block",
"src": "233:29:0",
"statements": [
{
"expression": {
"id": 18,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "250:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 17,
"id": 19,
"nodeType": "Return",
"src": "243:12:0"
}
]
},
"functionSelector": "cfae3217",
"id": 21,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "greet",
"nameLocation": "201:5:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 14,
"nodeType": "ParameterList",
"parameters": [],
"src": "206:2:0"
},
"returnParameters": {
"id": 17,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 16,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 21,
"src": "224:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "224:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "223:9:0"
},
"scope": 22,
"src": "192:70:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 23,
"src": "56:208:0"
}
],
"src": "31:234:0"
},
"id": 0
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment