UNPKG

@alpsfinance/core

Version:

This is the official Alps Finance smart contract repository.

1,275 lines (1,274 loc) 57.3 kB
{ "contractName": "Migrations", "abi": [ { "inputs": [], "name": "last_completed_migration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "completed", "type": "uint256" } ], "name": "setCompleted", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/Migrations.sol\":{\"keccak256\":\"0x1d420a5213e7f3c07aa50fbae1f325e7b68446b3ba31ef2963b5683421d9e19b\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://89f08b9f830a28cd2f98536d3e7dc54dff5b02179cadda9845aa7a635fa6c380\",\"dweb:/ipfs/QmW4T3GMnjJpZVP3VDr6VXuuqCqx4MgnsKyrTpZPG1GQ29\"]}},\"version\":1}", "bytecode": "0x6080604052600080546001600160a01b0319163317905534801561002257600080fd5b50610170806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610062578063fdacd5761461008d575b600080fd5b61004f60015481565b6040519081526020015b60405180910390f35b600054610075906001600160a01b031681565b6040516001600160a01b039091168152602001610059565b6100a061009b366004610121565b6100a2565b005b6000546001600160a01b0316331461011c5760405162461bcd60e51b815260206004820152603360248201527f546869732066756e6374696f6e206973207265737472696374656420746f207460448201527234329031b7b73a3930b1ba13b99037bbb732b960691b606482015260840160405180910390fd5b600155565b60006020828403121561013357600080fd5b503591905056fea26469706673582212206ca6f5cff4c8103a127a03918e6d51a080ffb418a9bd7bef3e8f13cffa9939ff64736f6c634300080b0033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610062578063fdacd5761461008d575b600080fd5b61004f60015481565b6040519081526020015b60405180910390f35b600054610075906001600160a01b031681565b6040516001600160a01b039091168152602001610059565b6100a061009b366004610121565b6100a2565b005b6000546001600160a01b0316331461011c5760405162461bcd60e51b815260206004820152603360248201527f546869732066756e6374696f6e206973207265737472696374656420746f207460448201527234329031b7b73a3930b1ba13b99037bbb732b960691b606482015260840160405180910390fd5b600155565b60006020828403121561013357600080fd5b503591905056fea26469706673582212206ca6f5cff4c8103a127a03918e6d51a080ffb418a9bd7bef3e8f13cffa9939ff64736f6c634300080b0033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [ { "ast": { "nodeType": "YulBlock", "src": "0:1006:56", "statements": [ { "nodeType": "YulBlock", "src": "6:3:56", "statements": [] }, { "body": { "nodeType": "YulBlock", "src": "115:76:56", "statements": [ { "nodeType": "YulAssignment", "src": "125:26:56", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "137:9:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "148:2:56", "type": "", "value": "32" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "133:3:56" }, "nodeType": "YulFunctionCall", "src": "133:18:56" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", "src": "125:4:56" } ] }, { "expression": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "167:9:56" }, { "name": "value0", "nodeType": "YulIdentifier", "src": "178:6:56" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", "src": "160:6:56" }, "nodeType": "YulFunctionCall", "src": "160:25:56" }, "nodeType": "YulExpressionStatement", "src": "160:25:56" } ] }, "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", "src": "84:9:56", "type": "" }, { "name": "value0", "nodeType": "YulTypedName", "src": "95:6:56", "type": "" } ], "returnVariables": [ { "name": "tail", "nodeType": "YulTypedName", "src": "106:4:56", "type": "" } ], "src": "14:177:56" }, { "body": { "nodeType": "YulBlock", "src": "297:102:56", "statements": [ { "nodeType": "YulAssignment", "src": "307:26:56", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "319:9:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "330:2:56", "type": "", "value": "32" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "315:3:56" }, "nodeType": "YulFunctionCall", "src": "315:18:56" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", "src": "307:4:56" } ] }, { "expression": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "349:9:56" }, { "arguments": [ { "name": "value0", "nodeType": "YulIdentifier", "src": "364:6:56" }, { "arguments": [ { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "380:3:56", "type": "", "value": "160" }, { "kind": "number", "nodeType": "YulLiteral", "src": "385:1:56", "type": "", "value": "1" } ], "functionName": { "name": "shl", "nodeType": "YulIdentifier", "src": "376:3:56" }, "nodeType": "YulFunctionCall", "src": "376:11:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "389:1:56", "type": "", "value": "1" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", "src": "372:3:56" }, "nodeType": "YulFunctionCall", "src": "372:19:56" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "360:3:56" }, "nodeType": "YulFunctionCall", "src": "360:32:56" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", "src": "342:6:56" }, "nodeType": "YulFunctionCall", "src": "342:51:56" }, "nodeType": "YulExpressionStatement", "src": "342:51:56" } ] }, "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", "src": "266:9:56", "type": "" }, { "name": "value0", "nodeType": "YulTypedName", "src": "277:6:56", "type": "" } ], "returnVariables": [ { "name": "tail", "nodeType": "YulTypedName", "src": "288:4:56", "type": "" } ], "src": "196:203:56" }, { "body": { "nodeType": "YulBlock", "src": "474:110:56", "statements": [ { "body": { "nodeType": "YulBlock", "src": "520:16:56", "statements": [ { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "529:1:56", "type": "", "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", "src": "532:1:56", "type": "", "value": "0" } ], "functionName": { "name": "revert", "nodeType": "YulIdentifier", "src": "522:6:56" }, "nodeType": "YulFunctionCall", "src": "522:12:56" }, "nodeType": "YulExpressionStatement", "src": "522:12:56" } ] }, "condition": { "arguments": [ { "arguments": [ { "name": "dataEnd", "nodeType": "YulIdentifier", "src": "495:7:56" }, { "name": "headStart", "nodeType": "YulIdentifier", "src": "504:9:56" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", "src": "491:3:56" }, "nodeType": "YulFunctionCall", "src": "491:23:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "516:2:56", "type": "", "value": "32" } ], "functionName": { "name": "slt", "nodeType": "YulIdentifier", "src": "487:3:56" }, "nodeType": "YulFunctionCall", "src": "487:32:56" }, "nodeType": "YulIf", "src": "484:52:56" }, { "nodeType": "YulAssignment", "src": "545:33:56", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "568:9:56" } ], "functionName": { "name": "calldataload", "nodeType": "YulIdentifier", "src": "555:12:56" }, "nodeType": "YulFunctionCall", "src": "555:23:56" }, "variableNames": [ { "name": "value0", "nodeType": "YulIdentifier", "src": "545:6:56" } ] } ] }, "name": "abi_decode_tuple_t_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", "src": "440:9:56", "type": "" }, { "name": "dataEnd", "nodeType": "YulTypedName", "src": "451:7:56", "type": "" } ], "returnVariables": [ { "name": "value0", "nodeType": "YulTypedName", "src": "463:6:56", "type": "" } ], "src": "404:180:56" }, { "body": { "nodeType": "YulBlock", "src": "763:241:56", "statements": [ { "expression": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "780:9:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "791:2:56", "type": "", "value": "32" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", "src": "773:6:56" }, "nodeType": "YulFunctionCall", "src": "773:21:56" }, "nodeType": "YulExpressionStatement", "src": "773:21:56" }, { "expression": { "arguments": [ { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "814:9:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "825:2:56", "type": "", "value": "32" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "810:3:56" }, "nodeType": "YulFunctionCall", "src": "810:18:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "830:2:56", "type": "", "value": "51" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", "src": "803:6:56" }, "nodeType": "YulFunctionCall", "src": "803:30:56" }, "nodeType": "YulExpressionStatement", "src": "803:30:56" }, { "expression": { "arguments": [ { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "853:9:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "864:2:56", "type": "", "value": "64" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "849:3:56" }, "nodeType": "YulFunctionCall", "src": "849:18:56" }, { "hexValue": "546869732066756e6374696f6e206973207265737472696374656420746f2074", "kind": "string", "nodeType": "YulLiteral", "src": "869:34:56", "type": "", "value": "This function is restricted to t" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", "src": "842:6:56" }, "nodeType": "YulFunctionCall", "src": "842:62:56" }, "nodeType": "YulExpressionStatement", "src": "842:62:56" }, { "expression": { "arguments": [ { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "924:9:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "935:2:56", "type": "", "value": "96" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "920:3:56" }, "nodeType": "YulFunctionCall", "src": "920:18:56" }, { "hexValue": "686520636f6e74726163742773206f776e6572", "kind": "string", "nodeType": "YulLiteral", "src": "940:21:56", "type": "", "value": "he contract's owner" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", "src": "913:6:56" }, "nodeType": "YulFunctionCall", "src": "913:49:56" }, "nodeType": "YulExpressionStatement", "src": "913:49:56" }, { "nodeType": "YulAssignment", "src": "971:27:56", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "983:9:56" }, { "kind": "number", "nodeType": "YulLiteral", "src": "994:3:56", "type": "", "value": "128" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "979:3:56" }, "nodeType": "YulFunctionCall", "src": "979:19:56" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", "src": "971:4:56" } ] } ] }, "name": "abi_encode_tuple_t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1__to_t_string_memory_ptr__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", "src": "740:9:56", "type": "" } ], "returnVariables": [ { "name": "tail", "nodeType": "YulTypedName", "src": "754:4:56", "type": "" } ], "src": "589:415:56" } ] }, "contents": "{\n { }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 51)\n mstore(add(headStart, 64), \"This function is restricted to t\")\n mstore(add(headStart, 96), \"he contract's owner\")\n tail := add(headStart, 128)\n }\n}", "id": 56, "language": "Yul", "name": "#utility.yul" } ], "sourceMap": "72:398:38:-:0;;;98:33;;;-1:-1:-1;;;;;;98:33:38;121:10;98:33;;;72:398;;;;;;;;;;;;;;;;", "deployedSourceMap": "72:398:38:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;137:39;;;;;;;;;160:25:56;;;148:2;133:18;137:39:38;;;;;;;;98:33;;;;;-1:-1:-1;;;;;98:33:38;;;;;;-1:-1:-1;;;;;360:32:56;;;342:51;;330:2;315:18;98:33:38;196:203:56;356:112:38;;;;;;:::i;:::-;;:::i;:::-;;;250:5;;-1:-1:-1;;;;;250:5:38;236:10;:19;215:117;;;;-1:-1:-1;;;215:117:38;;791:2:56;215:117:38;;;773:21:56;830:2;810:18;;;803:30;869:34;849:18;;;842:62;-1:-1:-1;;;920:18:56;;;913:49;979:19;;215:117:38;;;;;;;;425:24:::1;:36:::0;356:112::o;404:180:56:-;463:6;516:2;504:9;495:7;491:23;487:32;484:52;;;532:1;529;522:12;484:52;-1:-1:-1;555:23:56;;404:180;-1:-1:-1;404:180:56:o", "source": "// SPDX-License-Identifier: AGPL-3.0\n\npragma solidity >=0.4.22 <0.9.0;\n\ncontract Migrations {\n address public owner = msg.sender;\n uint256 public last_completed_migration;\n\n modifier restricted() {\n require(\n msg.sender == owner,\n \"This function is restricted to the contract's owner\"\n );\n _;\n }\n\n function setCompleted(uint256 completed) public restricted {\n last_completed_migration = completed;\n }\n}\n", "sourcePath": "/Users/yosephks/Documents/GitHub/alpsfinance-smart-contracts/contracts/Migrations.sol", "ast": { "absolutePath": "project:/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 7090 ] }, "id": 7091, "license": "AGPL-3.0", "nodeType": "SourceUnit", "nodes": [ { "id": 7059, "literals": [ "solidity", ">=", "0.4", ".22", "<", "0.9", ".0" ], "nodeType": "PragmaDirective", "src": "38:32:38" }, { "abstract": false, "baseContracts": [], "canonicalName": "Migrations", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 7090, "linearizedBaseContracts": [ 7090 ], "name": "Migrations", "nameLocation": "81:10:38", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "8da5cb5b", "id": 7063, "mutability": "mutable", "name": "owner", "nameLocation": "113:5:38", "nodeType": "VariableDeclaration", "scope": 7090, "src": "98:33:38", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7060, "name": "address", "nodeType": "ElementaryTypeName", "src": "98:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": { "expression": { "id": 7061, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, "src": "121:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7062, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "src": "121:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "public" }, { "constant": false, "functionSelector": "445df0ac", "id": 7065, "mutability": "mutable", "name": "last_completed_migration", "nameLocation": "152:24:38", "nodeType": "VariableDeclaration", "scope": 7090, "src": "137:39:38", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7064, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "137:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "public" }, { "body": { "id": 7076, "nodeType": "Block", "src": "205:145:38", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 7071, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 7068, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, "src": "236:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7069, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "src": "236:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "id": 7070, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7063, "src": "250:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "236:19:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "546869732066756e6374696f6e206973207265737472696374656420746f2074686520636f6e74726163742773206f776e6572", "id": 7072, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "269:53:38", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1", "typeString": "literal_string \"This function is restricted to the contract's owner\"" }, "value": "This function is restricted to the contract's owner" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1", "typeString": "literal_string \"This function is restricted to the contract's owner\"" } ], "id": 7067, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "215:7:38", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7073, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "215:117:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7074, "nodeType": "ExpressionStatement", "src": "215:117:38" }, { "id": 7075, "nodeType": "PlaceholderStatement", "src": "342:1:38" } ] }, "id": 7077, "name": "restricted", "nameLocation": "192:10:38", "nodeType": "ModifierDefinition", "parameters": { "id": 7066, "nodeType": "ParameterList", "parameters": [], "src": "202:2:38" }, "src": "183:167:38", "virtual": false, "visibility": "internal" }, { "body": { "id": 7088, "nodeType": "Block", "src": "415:53:38", "statements": [ { "expression": { "id": 7086, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 7084, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7065, "src": "425:24:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 7085, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7079, "src": "452:9:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "425:36:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7087, "nodeType": "ExpressionStatement", "src": "425:36:38" } ] }, "functionSelector": "fdacd576", "id": 7089, "implemented": true, "kind": "function", "modifiers": [ { "id": 7082, "kind": "modifierInvocation", "modifierName": { "id": 7081, "name": "restricted", "nodeType": "IdentifierPath", "referencedDeclaration": 7077, "src": "404:10:38" }, "nodeType": "ModifierInvocation", "src": "404:10:38" } ], "name": "setCompleted", "nameLocation": "365:12:38", "nodeType": "FunctionDefinition", "parameters": { "id": 7080, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7079, "mutability": "mutable", "name": "completed", "nameLocation": "386:9:38", "nodeType": "VariableDeclaration", "scope": 7089, "src": "378:17:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7078, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "378:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "377:19:38" }, "returnParameters": { "id": 7083, "nodeType": "ParameterList", "parameters": [], "src": "415:0:38" }, "scope": 7090, "src": "356:112:38", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" } ], "scope": 7091, "src": "72:398:38", "usedErrors": [] } ], "src": "38:433:38" }, "legacyAST": { "absolutePath": "project:/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 7090 ] }, "id": 7091, "license": "AGPL-3.0", "nodeType": "SourceUnit", "nodes": [ { "id": 7059, "literals": [ "solidity", ">=", "0.4", ".22", "<", "0.9", ".0" ], "nodeType": "PragmaDirective", "src": "38:32:38" }, { "abstract": false, "baseContracts": [], "canonicalName": "Migrations", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 7090, "linearizedBaseContracts": [ 7090 ], "name": "Migrations", "nameLocation": "81:10:38", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "8da5cb5b", "id": 7063, "mutability": "mutable", "name": "owner", "nameLocation": "113:5:38", "nodeType": "VariableDeclaration", "scope": 7090, "src": "98:33:38", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7060, "name": "address", "nodeType": "ElementaryTypeName", "src": "98:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": { "expression": { "id": 7061, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, "src": "121:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7062, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "src": "121:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "public" }, { "constant": false, "functionSelector": "445df0ac", "id": 7065, "mutability": "mutable", "name": "last_completed_migration", "nameLocation": "152:24:38", "nodeType": "VariableDeclaration", "scope": 7090, "src": "137:39:38", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7064, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "137:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "public" }, { "body": { "id": 7076, "nodeType": "Block", "src": "205:145:38", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 7071, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 7068, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, "src": "236:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7069, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "src": "236:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "id": 7070, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7063, "src": "250:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "236:19:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "546869732066756e6374696f6e206973207265737472696374656420746f2074686520636f6e74726163742773206f776e6572", "id": 7072, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "269:53:38", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f60fe2d9d123295bf92ecf95167f1fa709e374da35e4c083bd39dc2d82acd8b1", "typeString": "literal_string \"This function is restricted to the contract's owner\"" }, "value": "This function is restricted to the contract's owner" } ],