advance_faucet/build/contracts/BaseContract.json
2023-04-07 14:14:08 +08:00

1421 lines
56 KiB
JSON

{
"contractName": "BaseContract",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [],
"name": "Destroy",
"type": "event"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
},
{
"inputs": [],
"name": "destroy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Destroy\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/BaseContract.sol\":\"BaseContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/BaseContract.sol\":{\"keccak256\":\"0x224dc0bd4bed0626cd3c6472ddbd14b3f81e594690ef64800f94db034a180417\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8c18e9e30dc4ce07c3c55b64ca66aba0dd42a268e324c5413bd9dff599d0802e\",\"dweb:/ipfs/QmPkFdsgvrei43P1ockcmKr5XNwz7ZPVNe69jTMCcL6mve\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102cb806100606000396000f3fe60806040526004361061002d5760003560e01c806383197ef0146100395780638da5cb5b1461005057610034565b3661003457005b600080fd5b34801561004557600080fd5b5061004e61007b565b005b34801561005c57600080fd5b50610065610172565b60405161007291906101d7565b60405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610109576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161010090610275565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561016f573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101c182610196565b9050919050565b6101d1816101b6565b82525050565b60006020820190506101ec60008301846101c8565b92915050565b600082825260208201905092915050565b7f546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e60008201527f2061636365737300000000000000000000000000000000000000000000000000602082015250565b600061025f6027836101f2565b915061026a82610203565b604082019050919050565b6000602082019050818103600083015261028e81610252565b905091905056fea2646970667358221220580ef1aec442559597ff7e58999a3ef38eb23778dd144e069c1b6e87394d2d9f64736f6c63430008130033",
"deployedBytecode": "0x60806040526004361061002d5760003560e01c806383197ef0146100395780638da5cb5b1461005057610034565b3661003457005b600080fd5b34801561004557600080fd5b5061004e61007b565b005b34801561005c57600080fd5b50610065610172565b60405161007291906101d7565b60405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610109576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161010090610275565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561016f573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101c182610196565b9050919050565b6101d1816101b6565b82525050565b60006020820190506101ec60008301846101c8565b92915050565b600082825260208201905092915050565b7f546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e60008201527f2061636365737300000000000000000000000000000000000000000000000000602082015250565b600061025f6027836101f2565b915061026a82610203565b604082019050919050565b6000602082019050818103600083015261028e81610252565b905091905056fea2646970667358221220580ef1aec442559597ff7e58999a3ef38eb23778dd144e069c1b6e87394d2d9f64736f6c63430008130033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1794:3",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "52:81:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "62:65:3",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "77:5:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "84:42:3",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "73:3:3"
},
"nodeType": "YulFunctionCall",
"src": "73:54:3"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "62:7:3"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "34:5:3",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "44:7:3",
"type": ""
}
],
"src": "7:126:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "184:51:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "194:35:3",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "223:5:3"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "205:17:3"
},
"nodeType": "YulFunctionCall",
"src": "205:24:3"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "194:7:3"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "166:5:3",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "176:7:3",
"type": ""
}
],
"src": "139:96:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "306:53:3",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "323:3:3"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "346:5:3"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "328:17:3"
},
"nodeType": "YulFunctionCall",
"src": "328:24:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "316:6:3"
},
"nodeType": "YulFunctionCall",
"src": "316:37:3"
},
"nodeType": "YulExpressionStatement",
"src": "316:37:3"
}
]
},
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "294:5:3",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "301:3:3",
"type": ""
}
],
"src": "241:118:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "463:124:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "473:26:3",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "485:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "496:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "481:3:3"
},
"nodeType": "YulFunctionCall",
"src": "481:18:3"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "473:4:3"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "553:6:3"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "566:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "577:1:3",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "562:3:3"
},
"nodeType": "YulFunctionCall",
"src": "562:17:3"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "509:43:3"
},
"nodeType": "YulFunctionCall",
"src": "509:71:3"
},
"nodeType": "YulExpressionStatement",
"src": "509:71:3"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "435:9:3",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "447:6:3",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "458:4:3",
"type": ""
}
],
"src": "365:222:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "689:73:3",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "706:3:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "711:6:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "699:6:3"
},
"nodeType": "YulFunctionCall",
"src": "699:19:3"
},
"nodeType": "YulExpressionStatement",
"src": "699:19:3"
},
{
"nodeType": "YulAssignment",
"src": "727:29:3",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "746:3:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "751:4:3",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "742:3:3"
},
"nodeType": "YulFunctionCall",
"src": "742:14:3"
},
"variableNames": [
{
"name": "updated_pos",
"nodeType": "YulIdentifier",
"src": "727:11:3"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "661:3:3",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "666:6:3",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nodeType": "YulTypedName",
"src": "677:11:3",
"type": ""
}
],
"src": "593:169:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "874:120:3",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "896:6:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "904:1:3",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "892:3:3"
},
"nodeType": "YulFunctionCall",
"src": "892:14:3"
},
{
"hexValue": "546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e",
"kind": "string",
"nodeType": "YulLiteral",
"src": "908:34:3",
"type": "",
"value": "This function only the owner can"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "885:6:3"
},
"nodeType": "YulFunctionCall",
"src": "885:58:3"
},
"nodeType": "YulExpressionStatement",
"src": "885:58:3"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "964:6:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "972:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "960:3:3"
},
"nodeType": "YulFunctionCall",
"src": "960:15:3"
},
{
"hexValue": "20616363657373",
"kind": "string",
"nodeType": "YulLiteral",
"src": "977:9:3",
"type": "",
"value": " access"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "953:6:3"
},
"nodeType": "YulFunctionCall",
"src": "953:34:3"
},
"nodeType": "YulExpressionStatement",
"src": "953:34:3"
}
]
},
"name": "store_literal_in_memory_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "866:6:3",
"type": ""
}
],
"src": "768:226:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1146:220:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1156:74:3",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1222:3:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1227:2:3",
"type": "",
"value": "39"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1163:58:3"
},
"nodeType": "YulFunctionCall",
"src": "1163:67:3"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1156:3:3"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1328:3:3"
}
],
"functionName": {
"name": "store_literal_in_memory_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002",
"nodeType": "YulIdentifier",
"src": "1239:88:3"
},
"nodeType": "YulFunctionCall",
"src": "1239:93:3"
},
"nodeType": "YulExpressionStatement",
"src": "1239:93:3"
},
{
"nodeType": "YulAssignment",
"src": "1341:19:3",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1352:3:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1357:2:3",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1348:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1348:12:3"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "1341:3:3"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002_to_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1134:3:3",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "1142:3:3",
"type": ""
}
],
"src": "1000:366:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1543:248:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1553:26:3",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1565:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1576:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1561:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1561:18:3"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1553:4:3"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1600:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1611:1:3",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1596:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1596:17:3"
},
{
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1619:4:3"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1625:9:3"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1615:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1615:20:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1589:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1589:47:3"
},
"nodeType": "YulExpressionStatement",
"src": "1589:47:3"
},
{
"nodeType": "YulAssignment",
"src": "1645:139:3",
"value": {
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1779:4:3"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002_to_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1653:124:3"
},
"nodeType": "YulFunctionCall",
"src": "1653:131:3"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1645:4:3"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1523:9:3",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1538:4:3",
"type": ""
}
],
"src": "1372:419:3"
}
]
},
"contents": "{\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function store_literal_in_memory_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002(memPtr) {\n\n mstore(add(memPtr, 0), \"This function only the owner can\")\n\n mstore(add(memPtr, 32), \" access\")\n\n }\n\n function abi_encode_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 39)\n store_literal_in_memory_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n}\n",
"id": 3,
"language": "Yul",
"name": "#utility.yul"
}
],
"sourceMap": "66:342:2:-:0;;;133:40;;;;;;;;;;159:10;151:5;;:18;;;;;;;;;;;;;;;;;;66:342;;;;;;",
"deployedSourceMap": "66:342:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;285:89;;;;;;;;;;;;;:::i;:::-;;91:20;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;285:89;224:5;;;;;;;;;;210:19;;:10;:19;;;202:71;;;;;;;;;;;;:::i;:::-;;;;;;;;;332:5:::1;::::0;::::1;;;;;;;;324:23;;:46;348:21;324:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;285:89::o:0;91:20::-;;;;;;;;;;;;:::o;7:126:3:-;44:7;84:42;77:5;73:54;62:65;;7:126;;;:::o;139:96::-;176:7;205:24;223:5;205:24;:::i;:::-;194:35;;139:96;;;:::o;241:118::-;328:24;346:5;328:24;:::i;:::-;323:3;316:37;241:118;;:::o;365:222::-;458:4;496:2;485:9;481:18;473:26;;509:71;577:1;566:9;562:17;553:6;509:71;:::i;:::-;365:222;;;;:::o;593:169::-;677:11;711:6;706:3;699:19;751:4;746:3;742:14;727:29;;593:169;;;;:::o;768:226::-;908:34;904:1;896:6;892:14;885:58;977:9;972:2;964:6;960:15;953:34;768:226;:::o;1000:366::-;1142:3;1163:67;1227:2;1222:3;1163:67;:::i;:::-;1156:74;;1239:93;1328:3;1239:93;:::i;:::-;1357:2;1352:3;1348:12;1341:19;;1000:366;;;:::o;1372:419::-;1538:4;1576:2;1565:9;1561:18;1553:26;;1625:9;1619:4;1615:20;1611:1;1600:9;1596:17;1589:47;1653:131;1779:4;1653:131;:::i;:::-;1645:139;;1372:419;;;:::o",
"source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\ncontract BaseContract {\n\taddress public owner;\n\tevent Destroy();\n\n\tconstructor() {\n\t\towner = msg.sender;\n\t}\n\t\n\tmodifier onlyOwner() {\n\t\trequire(msg.sender == owner, \"This function only the owner can access\");\n\t\t_;\n\t}\n\n\tfunction destroy() public onlyOwner{\n\t\tpayable(owner).transfer(address(this).balance);\n\t}\n\n\treceive() external payable {}\n}\n",
"sourcePath": "/srv/http/code/1112_blockchain/advance_faucet/contracts/BaseContract.sol",
"ast": {
"absolutePath": "project:/contracts/BaseContract.sol",
"exportedSymbols": {
"BaseContract": [
272
]
},
"id": 273,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 224,
"literals": [
"solidity",
">=",
"0.4",
".22",
"<",
"0.9",
".0"
],
"nodeType": "PragmaDirective",
"src": "32:32:2"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "BaseContract",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 272,
"linearizedBaseContracts": [
272
],
"name": "BaseContract",
"nameLocation": "75:12:2",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "8da5cb5b",
"id": 226,
"mutability": "mutable",
"name": "owner",
"nameLocation": "106:5:2",
"nodeType": "VariableDeclaration",
"scope": 272,
"src": "91:20:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 225,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "91:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "public"
},
{
"anonymous": false,
"eventSelector": "f58fef8e187ef8dfd7bef096c1ef3e4f3c54f98d95b8ad5659349b07e61204df",
"id": 228,
"name": "Destroy",
"nameLocation": "120:7:2",
"nodeType": "EventDefinition",
"parameters": {
"id": 227,
"nodeType": "ParameterList",
"parameters": [],
"src": "127:2:2"
},
"src": "114:16:2"
},
{
"body": {
"id": 236,
"nodeType": "Block",
"src": "147:26:2",
"statements": [
{
"expression": {
"id": 234,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 231,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 226,
"src": "151:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 232,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967281,
"src": "159:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 233,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "163:6:2",
"memberName": "sender",
"nodeType": "MemberAccess",
"src": "159:10:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "151:18:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 235,
"nodeType": "ExpressionStatement",
"src": "151:18:2"
}
]
},
"id": 237,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 229,
"nodeType": "ParameterList",
"parameters": [],
"src": "144:2:2"
},
"returnParameters": {
"id": 230,
"nodeType": "ParameterList",
"parameters": [],
"src": "147:0:2"
},
"scope": 272,
"src": "133:40:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 248,
"nodeType": "Block",
"src": "198:84:2",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 243,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 240,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967281,
"src": "210:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 241,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "214:6:2",
"memberName": "sender",
"nodeType": "MemberAccess",
"src": "210:10:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 242,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 226,
"src": "224:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "210:19:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e20616363657373",
"id": 244,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "231:41:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002",
"typeString": "literal_string \"This function only the owner can access\""
},
"value": "This function only the owner can access"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002",
"typeString": "literal_string \"This function only the owner can access\""
}
],
"id": 239,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "202:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 245,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "202:71:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 246,
"nodeType": "ExpressionStatement",
"src": "202:71:2"
},
{
"id": 247,
"nodeType": "PlaceholderStatement",
"src": "277:1:2"
}
]
},
"id": 249,
"name": "onlyOwner",
"nameLocation": "186:9:2",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 238,
"nodeType": "ParameterList",
"parameters": [],
"src": "195:2:2"
},
"src": "177:105:2",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 266,
"nodeType": "Block",
"src": "320:54:2",
"statements": [
{
"expression": {
"arguments": [
{
"expression": {
"arguments": [
{
"id": 261,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967268,
"src": "356:4:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BaseContract_$272",
"typeString": "contract BaseContract"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_BaseContract_$272",
"typeString": "contract BaseContract"
}
],
"id": 260,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "348:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 259,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "348:7:2",
"typeDescriptions": {}
}
},
"id": 262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "348:13:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 263,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "362:7:2",
"memberName": "balance",
"nodeType": "MemberAccess",
"src": "348:21:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"arguments": [
{
"id": 256,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 226,
"src": "332:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 255,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "324:8:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_payable_$",
"typeString": "type(address payable)"
},
"typeName": {
"id": 254,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "324:8:2",
"stateMutability": "payable",
"typeDescriptions": {}
}
},
"id": 257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "324:14:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"id": 258,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "339:8:2",
"memberName": "transfer",
"nodeType": "MemberAccess",
"src": "324:23:2",
"typeDescriptions": {
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 264,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "324:46:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 265,
"nodeType": "ExpressionStatement",
"src": "324:46:2"
}
]
},
"functionSelector": "83197ef0",
"id": 267,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 252,
"kind": "modifierInvocation",
"modifierName": {
"id": 251,
"name": "onlyOwner",
"nameLocations": [
"311:9:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 249,
"src": "311:9:2"
},
"nodeType": "ModifierInvocation",
"src": "311:9:2"
}
],
"name": "destroy",
"nameLocation": "294:7:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 250,
"nodeType": "ParameterList",
"parameters": [],
"src": "301:2:2"
},
"returnParameters": {
"id": 253,
"nodeType": "ParameterList",
"parameters": [],
"src": "320:0:2"
},
"scope": 272,
"src": "285:89:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 270,
"nodeType": "Block",
"src": "404:2:2",
"statements": []
},
"id": 271,
"implemented": true,
"kind": "receive",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 268,
"nodeType": "ParameterList",
"parameters": [],
"src": "384:2:2"
},
"returnParameters": {
"id": 269,
"nodeType": "ParameterList",
"parameters": [],
"src": "404:0:2"
},
"scope": 272,
"src": "377:29:2",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
"scope": 273,
"src": "66:342:2",
"usedErrors": []
}
],
"src": "32:377:2"
},
"compiler": {
"name": "solc",
"version": "0.8.19+commit.7dd6d404.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.13",
"updatedAt": "2023-04-06T14:26:33.017Z",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}