UNPKG

@daostack/upgrades

Version:
520 lines (519 loc) 22.6 kB
{ "fileName": "Greeter.sol", "contractName": "Greeter", "source": "pragma solidity ^0.6.0;\n// SPDX-License-Identifier: MIT\n\ncontract Greeter {\n event Greeting(string greeting);\n\n function greet(string memory who) public {\n emit Greeting(greeting(who));\n }\n\n function greeting(string memory who) public pure returns (string memory) {\n return who;\n }\n\n function say() public pure returns (string memory) {\n return \"hello\";\n }\n}\n", "sourcePath": "mock-dependency/contracts/Greeter.sol", "sourceMap": "57:317:46:-:0;;;;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "57:317:46:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;296:76;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;114:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;198:94;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;296:76;332:13;353:14;;;;;;;;;;;;;;;;;;;;;;;296:76;;:::o;114:80::-;166:23;175:13;184:3;175:8;:13;;:::i;:::-;166:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;114:80;;:::o;198:94::-;256:13;284:3;277:10;;;;198:94;;;;:::o", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "greeting", "type": "string" } ], "name": "Greeting", "type": "event" }, { "inputs": [ { "internalType": "string", "name": "who", "type": "string" } ], "name": "greet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "who", "type": "string" } ], "name": "greeting", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "say", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "pure", "type": "function" } ], "ast": { "absolutePath": "mock-dependency/contracts/Greeter.sol", "exportedSymbols": { "Greeter": [ 6833 ] }, "id": 6834, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 6798, "literals": [ "solidity", "^", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:46" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 6833, "linearizedBaseContracts": [ 6833 ], "name": "Greeter", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 6802, "name": "Greeting", "nodeType": "EventDefinition", "parameters": { "id": 6801, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6800, "indexed": false, "mutability": "mutable", "name": "greeting", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6802, "src": "93:15:46", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6799, "name": "string", "nodeType": "ElementaryTypeName", "src": "93:6:46", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "92:17:46" }, "src": "78:32:46" }, { "body": { "id": 6813, "nodeType": "Block", "src": "155:39:46", "statements": [ { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 6809, "name": "who", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6804, "src": "184:3:46", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 6808, "name": "greeting", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6824, "src": "175:8:46", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (string memory)" } }, "id": 6810, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "175:13:46", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 6807, "name": "Greeting", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6802, "src": "166:8:46", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)" } }, "id": 6811, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "166:23:46", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6812, "nodeType": "EmitStatement", "src": "161:28:46" } ] }, "documentation": null, "functionSelector": "ead710c4", "id": 6814, "implemented": true, "kind": "function", "modifiers": [], "name": "greet", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 6805, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6804, "mutability": "mutable", "name": "who", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6814, "src": "129:17:46", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6803, "name": "string", "nodeType": "ElementaryTypeName", "src": "129:6:46", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "128:19:46" }, "returnParameters": { "id": 6806, "nodeType": "ParameterList", "parameters": [], "src": "155:0:46" }, "scope": 6833, "src": "114:80:46", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 6823, "nodeType": "Block", "src": "271:21:46", "statements": [ { "expression": { "argumentTypes": null, "id": 6821, "name": "who", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6816, "src": "284:3:46", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "functionReturnParameters": 6820, "id": 6822, "nodeType": "Return", "src": "277:10:46" } ] }, "documentation": null, "functionSelector": "f8194e48", "id": 6824, "implemented": true, "kind": "function", "modifiers": [], "name": "greeting", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 6817, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6816, "mutability": "mutable", "name": "who", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6824, "src": "216:17:46", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6815, "name": "string", "nodeType": "ElementaryTypeName", "src": "216:6:46", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "215:19:46" }, "returnParameters": { "id": 6820, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6819, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6824, "src": "256:13:46", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6818, "name": "string", "nodeType": "ElementaryTypeName", "src": "256:6:46", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "255:15:46" }, "scope": 6833, "src": "198:94:46", "stateMutability": "pure", "virtual": false, "visibility": "public" }, { "body": { "id": 6831, "nodeType": "Block", "src": "347:25:46", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "68656c6c6f", "id": 6829, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "360:7:46", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", "typeString": "literal_string \"hello\"" }, "value": "hello" }, "functionReturnParameters": 6828, "id": 6830, "nodeType": "Return", "src": "353:14:46" } ] }, "documentation": null, "functionSelector": "954ab4b2", "id": 6832, "implemented": true, "kind": "function", "modifiers": [], "name": "say", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 6825, "nodeType": "ParameterList", "parameters": [], "src": "308:2:46" }, "returnParameters": { "id": 6828, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6827, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6832, "src": "332:13:46", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6826, "name": "string", "nodeType": "ElementaryTypeName", "src": "332:6:46", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "331:15:46" }, "scope": 6833, "src": "296:76:46", "stateMutability": "pure", "virtual": false, "visibility": "public" } ], "scope": 6834, "src": "57:317:46" } ], "src": "0:375:46" }, "bytecode": "0x60806040523480156100115760006000fd5b50610017565b610409806100266000396000f3fe60806040523480156100115760006000fd5b50600436106100465760003560e01c8063954ab4b21461004c578063ead710c4146100d0578063f8194e481461019357610046565b60006000fd5b6100546102d0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100955780820151818401525b602081019050610079565b50505050905090810190601f1680156100c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610191600480360360208110156100e75760006000fd5b81019080803590602001906401000000008111156101055760006000fd5b8201836020820111156101185760006000fd5b8035906020019184600183028401116401000000008311171561013b5760006000fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050909091929090919290505050610315565b005b610254600480360360208110156101aa5760006000fd5b81019080803590602001906401000000008111156101c85760006000fd5b8201836020820111156101db5760006000fd5b803590602001918460018302840111640100000000831117156101fe5760006000fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509090919290909192905050506103c4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102955780820151818401525b602081019050610279565b50505050905090810190601f1680156102c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606040518060400160405280600581526020017f68656c6c6f0000000000000000000000000000000000000000000000000000008152602001509050610312565b90565b7fa5263230ff6fc3abbbad333e24faf0f402b4e050b83a1d30ad4051f4e5d0f727610345826103c463ffffffff16565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103865780820151818401525b60208101905061036a565b50505050905090810190601f1680156103b35780820380516001836020036101000a031916815260200191505b509250505060405180910390a15b50565b60608190506103ce565b91905056fea2646970667358221220f68c02fe923bbaf4c283d30ee0d434ada3fa8b47de6c4a557b4ed130697ed34064736f6c634300060a0033", "deployedBytecode": "0x60806040523480156100115760006000fd5b50600436106100465760003560e01c8063954ab4b21461004c578063ead710c4146100d0578063f8194e481461019357610046565b60006000fd5b6100546102d0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100955780820151818401525b602081019050610079565b50505050905090810190601f1680156100c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610191600480360360208110156100e75760006000fd5b81019080803590602001906401000000008111156101055760006000fd5b8201836020820111156101185760006000fd5b8035906020019184600183028401116401000000008311171561013b5760006000fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050909091929090919290505050610315565b005b610254600480360360208110156101aa5760006000fd5b81019080803590602001906401000000008111156101c85760006000fd5b8201836020820111156101db5760006000fd5b803590602001918460018302840111640100000000831117156101fe5760006000fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509090919290909192905050506103c4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102955780820151818401525b602081019050610279565b50505050905090810190601f1680156102c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606040518060400160405280600581526020017f68656c6c6f0000000000000000000000000000000000000000000000000000008152602001509050610312565b90565b7fa5263230ff6fc3abbbad333e24faf0f402b4e050b83a1d30ad4051f4e5d0f727610345826103c463ffffffff16565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103865780820151818401525b60208101905061036a565b50505050905090810190601f1680156103b35780820380516001836020036101000a031916815260200191505b509250505060405180910390a15b50565b60608190506103ce565b91905056fea2646970667358221220f68c02fe923bbaf4c283d30ee0d434ada3fa8b47de6c4a557b4ed130697ed34064736f6c634300060a0033", "compiler": { "name": "solc", "version": "0.6.10+commit.00c0fcaf.Emscripten.clang", "optimizer": {}, "evmVersion": "constantinople" } }