commit 83e0c67ea690eadea64646d4987eeb01ca813eb9 Author: snsd0805 Date: Thu Apr 6 16:42:54 2023 +0800 first commit diff --git a/build/contracts/ATM.json b/build/contracts/ATM.json new file mode 100644 index 0000000..c296f05 --- /dev/null +++ b/build/contracts/ATM.json @@ -0,0 +1,4051 @@ +{ + "contractName": "ATM", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "bank_addr", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "destroy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "stateMutability": "payable", + "type": "receive", + "payable": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bank_addr\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/ATM.sol\":\"ATM\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/ATM.sol\":{\"keccak256\":\"0xacb5a205088c1cb9258949f4b030c82ce8bd44deac74e5f95cd4b9b41508a60d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e18c28ae09afcb826dee6fad30703aba8171d7da87da8153e77e6bc8df6c0616\",\"dweb:/ipfs/QmdmzwzQUVHfEqXWz26VrV5tFCK58Lk8mzrj95B25xN9Af\"]},\"project:/contracts/Bank.sol\":{\"keccak256\":\"0x7e71586662e9ff25c22934c0898039b5027d914971e8eb2876ad100c17105a04\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a4b07fc981db749280db101aed247db5698848b980348238b59058921a2396f\",\"dweb:/ipfs/QmWS5cvNoaq5MQFMzR6udwPWTu7NcoZUbLifgbLb5DpHMo\"]},\"project:/contracts/BaseContract.sol\":{\"keccak256\":\"0xe4a7a376123fde9f62e656195c2b5208f8fe81b22346263c4f52fd2408eb3ef1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921d16d096d80ce97a7596e3706588d1bbf0e3f55df790bfedac171cd9bd2dc5\",\"dweb:/ipfs/QmQmXW1HZoNrhhEtgSxapUg8hghEtVWJ1DLvbDZNbikr5j\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516107c03803806107c08339818101604052810190610032919061011c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610149565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100e9826100be565b9050919050565b6100f9816100de565b811461010457600080fd5b50565b600081519050610116816100f0565b92915050565b600060208284031215610132576101316100b9565b5b600061014084828501610107565b91505092915050565b610668806101586000396000f3fe6080604052600436106100385760003560e01c80632e1a7d4d1461004457806383197ef01461006d5780638da5cb5b146100845761003f565b3661003f57005b600080fd5b34801561005057600080fd5b5061006b60048036038101906100669190610382565b6100af565b005b34801561007957600080fd5b5061008261022c565b005b34801561009057600080fd5b50610099610323565b6040516100a691906103f0565b60405180910390f35b67016345785d8a0000471161015457600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d6706f05b59d3b200006040518263ffffffff1660e01b81526004016101219190610450565b600060405180830381600087803b15801561013b57600080fd5b505af115801561014f573d6000803e3d6000fd5b505050505b67016345785d8a000081111561019f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610196906104ee565b60405180910390fd5b478111156101e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d990610580565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610228573d6000803e3d6000fd5b5050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102b190610612565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610320573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080fd5b6000819050919050565b61035f8161034c565b811461036a57600080fd5b50565b60008135905061037c81610356565b92915050565b60006020828403121561039857610397610347565b5b60006103a68482850161036d565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103da826103af565b9050919050565b6103ea816103cf565b82525050565b600060208201905061040560008301846103e1565b92915050565b6000819050919050565b6000819050919050565b600061043a6104356104308461040b565b610415565b61034c565b9050919050565b61044a8161041f565b82525050565b60006020820190506104656000830184610441565b92915050565b600082825260208201905092915050565b7f596f75207265717565737420616d6f756e742063616e6e6f742062696767657260008201527f207468616e20302e312065746865720000000000000000000000000000000000602082015250565b60006104d8602f8361046b565b91506104e38261047c565b604082019050919050565b60006020820190508181036000830152610507816104cb565b9050919050565b7f546869732041544d20646f65736e2774206861766520656e6f7567682045544860008201527f20746f2077697468647261770000000000000000000000000000000000000000602082015250565b600061056a602c8361046b565b91506105758261050e565b604082019050919050565b600060208201905081810360008301526105998161055d565b9050919050565b7f546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e60008201527f2061636365737300000000000000000000000000000000000000000000000000602082015250565b60006105fc60278361046b565b9150610607826105a0565b604082019050919050565b6000602082019050818103600083015261062b816105ef565b905091905056fea26469706673582212200521cc993228aa54841fa64b380119092ed1328d422246267ded778d7e74a40f64736f6c63430008130033", + "deployedBytecode": "0x6080604052600436106100385760003560e01c80632e1a7d4d1461004457806383197ef01461006d5780638da5cb5b146100845761003f565b3661003f57005b600080fd5b34801561005057600080fd5b5061006b60048036038101906100669190610382565b6100af565b005b34801561007957600080fd5b5061008261022c565b005b34801561009057600080fd5b50610099610323565b6040516100a691906103f0565b60405180910390f35b67016345785d8a0000471161015457600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d6706f05b59d3b200006040518263ffffffff1660e01b81526004016101219190610450565b600060405180830381600087803b15801561013b57600080fd5b505af115801561014f573d6000803e3d6000fd5b505050505b67016345785d8a000081111561019f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610196906104ee565b60405180910390fd5b478111156101e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d990610580565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610228573d6000803e3d6000fd5b5050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102b190610612565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610320573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080fd5b6000819050919050565b61035f8161034c565b811461036a57600080fd5b50565b60008135905061037c81610356565b92915050565b60006020828403121561039857610397610347565b5b60006103a68482850161036d565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103da826103af565b9050919050565b6103ea816103cf565b82525050565b600060208201905061040560008301846103e1565b92915050565b6000819050919050565b6000819050919050565b600061043a6104356104308461040b565b610415565b61034c565b9050919050565b61044a8161041f565b82525050565b60006020820190506104656000830184610441565b92915050565b600082825260208201905092915050565b7f596f75207265717565737420616d6f756e742063616e6e6f742062696767657260008201527f207468616e20302e312065746865720000000000000000000000000000000000602082015250565b60006104d8602f8361046b565b91506104e38261047c565b604082019050919050565b60006020820190508181036000830152610507816104cb565b9050919050565b7f546869732041544d20646f65736e2774206861766520656e6f7567682045544860008201527f20746f2077697468647261770000000000000000000000000000000000000000602082015250565b600061056a602c8361046b565b91506105758261050e565b604082019050919050565b600060208201905081810360008301526105998161055d565b9050919050565b7f546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e60008201527f2061636365737300000000000000000000000000000000000000000000000000602082015250565b60006105fc60278361046b565b9150610607826105a0565b604082019050919050565b6000602082019050818103600083015261062b816105ef565b905091905056fea26469706673582212200521cc993228aa54841fa64b380119092ed1328d422246267ded778d7e74a40f64736f6c63430008130033", + "immutableReferences": {}, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:1199:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:3", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:3", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:3" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:3" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:3" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:3", + "type": "" + } + ], + "src": "7:75:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:3" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:3" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "379:81:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:65:3", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "404:5:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "411:42:3", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "400:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "400:54:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:3", + "type": "" + } + ], + "src": "334:126:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "511:51:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "521:35:3", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "550:5:3" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "532:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "532:24:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "521:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "493:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "503:7:3", + "type": "" + } + ], + "src": "466:96:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "611:79:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "668:16:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "677:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "680:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "670:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "670:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "670:12:3" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "634:5:3" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "659:5:3" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "641:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "641:24:3" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "631:2:3" + }, + "nodeType": "YulFunctionCall", + "src": "631:35:3" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "624:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "624:43:3" + }, + "nodeType": "YulIf", + "src": "621:63:3" + } + ] + }, + "name": "validator_revert_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "604:5:3", + "type": "" + } + ], + "src": "568:122:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "759:80:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "769:22:3", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "784:6:3" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "778:5:3" + }, + "nodeType": "YulFunctionCall", + "src": "778:13:3" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "769:5:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "827:5:3" + } + ], + "functionName": { + "name": "validator_revert_t_address", + "nodeType": "YulIdentifier", + "src": "800:26:3" + }, + "nodeType": "YulFunctionCall", + "src": "800:33:3" + }, + "nodeType": "YulExpressionStatement", + "src": "800:33:3" + } + ] + }, + "name": "abi_decode_t_address_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "737:6:3", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "745:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "753:5:3", + "type": "" + } + ], + "src": "696:143:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "922:274:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "968:83:3", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "970:77:3" + }, + "nodeType": "YulFunctionCall", + "src": "970:79:3" + }, + "nodeType": "YulExpressionStatement", + "src": "970:79:3" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "943:7:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "952:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "939:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "939:23:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "964:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "935:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "935:32:3" + }, + "nodeType": "YulIf", + "src": "932:119:3" + }, + { + "nodeType": "YulBlock", + "src": "1061:128:3", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1076:15:3", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1090:1:3", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1080:6:3", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1105:74:3", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1151:9:3" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1162:6:3" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1147:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "1147:22:3" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1171:7:3" + } + ], + "functionName": { + "name": "abi_decode_t_address_fromMemory", + "nodeType": "YulIdentifier", + "src": "1115:31:3" + }, + "nodeType": "YulFunctionCall", + "src": "1115:64:3" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1105:6:3" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "892:9:3", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "903:7:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "915:6:3", + "type": "" + } + ], + "src": "845:351:3" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\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 validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_address_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n}\n", + "id": 3, + "language": "Yul", + "name": "#utility.yul" + } + ], + "deployedGeneratedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:5720:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:3", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:3", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:3" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:3" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:3" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:3", + "type": "" + } + ], + "src": "7:75:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:3" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:3" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "379:32:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:16:3", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "400:5:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:3", + "type": "" + } + ], + "src": "334:77:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "460:79:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "517:16:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "526:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "529:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "519:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "519:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "519:12:3" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "483:5:3" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "508:5:3" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "490:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "490:24:3" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "480:2:3" + }, + "nodeType": "YulFunctionCall", + "src": "480:35:3" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "473:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "473:43:3" + }, + "nodeType": "YulIf", + "src": "470:63:3" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "453:5:3", + "type": "" + } + ], + "src": "417:122:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "597:87:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "607:29:3", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "629:6:3" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "616:12:3" + }, + "nodeType": "YulFunctionCall", + "src": "616:20:3" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "607:5:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "672:5:3" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "645:26:3" + }, + "nodeType": "YulFunctionCall", + "src": "645:33:3" + }, + "nodeType": "YulExpressionStatement", + "src": "645:33:3" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "575:6:3", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "583:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "591:5:3", + "type": "" + } + ], + "src": "545:139:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "756:263:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "802:83:3", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "804:77:3" + }, + "nodeType": "YulFunctionCall", + "src": "804:79:3" + }, + "nodeType": "YulExpressionStatement", + "src": "804:79:3" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "777:7:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "786:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "773:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "773:23:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "798:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "769:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "769:32:3" + }, + "nodeType": "YulIf", + "src": "766:119:3" + }, + { + "nodeType": "YulBlock", + "src": "895:117:3", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "910:15:3", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "924:1:3", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "914:6:3", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "939:63:3", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "974:9:3" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "985:6:3" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "970:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "970:22:3" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "994:7:3" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "949:20:3" + }, + "nodeType": "YulFunctionCall", + "src": "949:53:3" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "939:6:3" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "726:9:3", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "737:7:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "749:6:3", + "type": "" + } + ], + "src": "690:329:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1070:81:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1080:65:3", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1095:5:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1102:42:3", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "1091:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "1091:54:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "1080:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1052:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "1062:7:3", + "type": "" + } + ], + "src": "1025:126:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1202:51:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1212:35:3", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1241:5:3" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "1223:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "1223:24:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "1212:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1184:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "1194:7:3", + "type": "" + } + ], + "src": "1157:96:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1324:53:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1341:3:3" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1364:5:3" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "1346:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "1346:24:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1334:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "1334:37:3" + }, + "nodeType": "YulExpressionStatement", + "src": "1334:37:3" + } + ] + }, + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1312:5:3", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1319:3:3", + "type": "" + } + ], + "src": "1259:118:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1481:124:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1491:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1503:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1514:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1499:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "1499:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "1491:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1571:6:3" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1584:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1595:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1580:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "1580:17:3" + } + ], + "functionName": { + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulIdentifier", + "src": "1527:43:3" + }, + "nodeType": "YulFunctionCall", + "src": "1527:71:3" + }, + "nodeType": "YulExpressionStatement", + "src": "1527:71:3" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1453:9:3", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1465:6:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1476:4:3", + "type": "" + } + ], + "src": "1383:222:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1681:32:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1691:16:3", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1702:5:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "1691:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_rational_500000000000000000_by_1", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1663:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "1673:7:3", + "type": "" + } + ], + "src": "1611:102:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1751:28:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1761:12:3", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1768:5:3" + }, + "variableNames": [ + { + "name": "ret", + "nodeType": "YulIdentifier", + "src": "1761:3:3" + } + ] + } + ] + }, + "name": "identity", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1737:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "ret", + "nodeType": "YulTypedName", + "src": "1747:3:3", + "type": "" + } + ], + "src": "1719:60:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1870:107:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1880:91:3", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1963:5:3" + } + ], + "functionName": { + "name": "cleanup_t_rational_500000000000000000_by_1", + "nodeType": "YulIdentifier", + "src": "1920:42:3" + }, + "nodeType": "YulFunctionCall", + "src": "1920:49:3" + } + ], + "functionName": { + "name": "identity", + "nodeType": "YulIdentifier", + "src": "1911:8:3" + }, + "nodeType": "YulFunctionCall", + "src": "1911:59:3" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "1893:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "1893:78:3" + }, + "variableNames": [ + { + "name": "converted", + "nodeType": "YulIdentifier", + "src": "1880:9:3" + } + ] + } + ] + }, + "name": "convert_t_rational_500000000000000000_by_1_to_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1850:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "converted", + "nodeType": "YulTypedName", + "src": "1860:9:3", + "type": "" + } + ], + "src": "1785:192:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2073:91:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2090:3:3" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2151:5:3" + } + ], + "functionName": { + "name": "convert_t_rational_500000000000000000_by_1_to_t_uint256", + "nodeType": "YulIdentifier", + "src": "2095:55:3" + }, + "nodeType": "YulFunctionCall", + "src": "2095:62:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2083:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2083:75:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2083:75:3" + } + ] + }, + "name": "abi_encode_t_rational_500000000000000000_by_1_to_t_uint256_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2061:5:3", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2068:3:3", + "type": "" + } + ], + "src": "1983:181:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2293:149:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2303:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2315:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2326:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2311:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2311:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2303:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "2408:6:3" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2421:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2432:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2417:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2417:17:3" + } + ], + "functionName": { + "name": "abi_encode_t_rational_500000000000000000_by_1_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "2339:68:3" + }, + "nodeType": "YulFunctionCall", + "src": "2339:96:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2339:96:3" + } + ] + }, + "name": "abi_encode_tuple_t_rational_500000000000000000_by_1__to_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2265:9:3", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "2277:6:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2288:4:3", + "type": "" + } + ], + "src": "2170:272:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2544:73:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2561:3:3" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2566:6:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2554:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2554:19:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2554:19:3" + }, + { + "nodeType": "YulAssignment", + "src": "2582:29:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2601:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2606:4:3", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2597:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2597:14:3" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "2582:11:3" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2516:3:3", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "2521:6:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "2532:11:3", + "type": "" + } + ], + "src": "2448:169:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2729:128:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2751:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2759:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2747:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2747:14:3" + }, + { + "hexValue": "596f75207265717565737420616d6f756e742063616e6e6f7420626967676572", + "kind": "string", + "nodeType": "YulLiteral", + "src": "2763:34:3", + "type": "", + "value": "You request amount cannot bigger" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2740:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2740:58:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2740:58:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2819:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2827:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2815:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2815:15:3" + }, + { + "hexValue": "207468616e20302e31206574686572", + "kind": "string", + "nodeType": "YulLiteral", + "src": "2832:17:3", + "type": "", + "value": " than 0.1 ether" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2808:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2808:42:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2808:42:3" + } + ] + }, + "name": "store_literal_in_memory_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "2721:6:3", + "type": "" + } + ], + "src": "2623:234:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3009:220:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3019:74:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3085:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3090:2:3", + "type": "", + "value": "47" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "3026:58:3" + }, + "nodeType": "YulFunctionCall", + "src": "3026:67:3" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3019:3:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3191:3:3" + } + ], + "functionName": { + "name": "store_literal_in_memory_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0", + "nodeType": "YulIdentifier", + "src": "3102:88:3" + }, + "nodeType": "YulFunctionCall", + "src": "3102:93:3" + }, + "nodeType": "YulExpressionStatement", + "src": "3102:93:3" + }, + { + "nodeType": "YulAssignment", + "src": "3204:19:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3215:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3220:2:3", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3211:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3211:12:3" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "3204:3:3" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2997:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "3005:3:3", + "type": "" + } + ], + "src": "2863:366:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3406:248:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3416:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3428:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3439:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3424:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3424:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3416:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3463:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3474:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3459:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3459:17:3" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3482:4:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3488:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "3478:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3478:20:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3452:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "3452:47:3" + }, + "nodeType": "YulExpressionStatement", + "src": "3452:47:3" + }, + { + "nodeType": "YulAssignment", + "src": "3508:139:3", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3642:4:3" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "3516:124:3" + }, + "nodeType": "YulFunctionCall", + "src": "3516:131:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3508:4:3" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "3386:9:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "3401:4:3", + "type": "" + } + ], + "src": "3235:419:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3766:125:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "3788:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3796:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3784:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3784:14:3" + }, + { + "hexValue": "546869732041544d20646f65736e2774206861766520656e6f75676820455448", + "kind": "string", + "nodeType": "YulLiteral", + "src": "3800:34:3", + "type": "", + "value": "This ATM doesn't have enough ETH" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3777:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "3777:58:3" + }, + "nodeType": "YulExpressionStatement", + "src": "3777:58:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "3856:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3864:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3852:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3852:15:3" + }, + { + "hexValue": "20746f207769746864726177", + "kind": "string", + "nodeType": "YulLiteral", + "src": "3869:14:3", + "type": "", + "value": " to withdraw" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3845:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "3845:39:3" + }, + "nodeType": "YulExpressionStatement", + "src": "3845:39:3" + } + ] + }, + "name": "store_literal_in_memory_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "3758:6:3", + "type": "" + } + ], + "src": "3660:231:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4043:220:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4053:74:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4119:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4124:2:3", + "type": "", + "value": "44" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "4060:58:3" + }, + "nodeType": "YulFunctionCall", + "src": "4060:67:3" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4053:3:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4225:3:3" + } + ], + "functionName": { + "name": "store_literal_in_memory_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e", + "nodeType": "YulIdentifier", + "src": "4136:88:3" + }, + "nodeType": "YulFunctionCall", + "src": "4136:93:3" + }, + "nodeType": "YulExpressionStatement", + "src": "4136:93:3" + }, + { + "nodeType": "YulAssignment", + "src": "4238:19:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4249:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4254:2:3", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4245:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4245:12:3" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "4238:3:3" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "4031:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "4039:3:3", + "type": "" + } + ], + "src": "3897:366:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4440:248:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4450:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4462:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4473:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4458:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4458:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4450:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4497:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4508:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4493:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4493:17:3" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4516:4:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4522:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "4512:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4512:20:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4486:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "4486:47:3" + }, + "nodeType": "YulExpressionStatement", + "src": "4486:47:3" + }, + { + "nodeType": "YulAssignment", + "src": "4542:139:3", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4676:4:3" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "4550:124:3" + }, + "nodeType": "YulFunctionCall", + "src": "4550:131:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4542:4:3" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "4420:9:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "4435:4:3", + "type": "" + } + ], + "src": "4269:419:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4800:120:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "4822:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4830:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4818:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4818:14:3" + }, + { + "hexValue": "546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e", + "kind": "string", + "nodeType": "YulLiteral", + "src": "4834:34:3", + "type": "", + "value": "This function only the owner can" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4811:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "4811:58:3" + }, + "nodeType": "YulExpressionStatement", + "src": "4811:58:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "4890:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4898:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4886:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4886:15:3" + }, + { + "hexValue": "20616363657373", + "kind": "string", + "nodeType": "YulLiteral", + "src": "4903:9:3", + "type": "", + "value": " access" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4879:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "4879:34:3" + }, + "nodeType": "YulExpressionStatement", + "src": "4879:34:3" + } + ] + }, + "name": "store_literal_in_memory_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "4792:6:3", + "type": "" + } + ], + "src": "4694:226:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5072:220:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5082:74:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5148:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5153:2:3", + "type": "", + "value": "39" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "5089:58:3" + }, + "nodeType": "YulFunctionCall", + "src": "5089:67:3" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5082:3:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5254:3:3" + } + ], + "functionName": { + "name": "store_literal_in_memory_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002", + "nodeType": "YulIdentifier", + "src": "5165:88:3" + }, + "nodeType": "YulFunctionCall", + "src": "5165:93:3" + }, + "nodeType": "YulExpressionStatement", + "src": "5165:93:3" + }, + { + "nodeType": "YulAssignment", + "src": "5267:19:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5278:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5283:2:3", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5274:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5274:12:3" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "5267:3:3" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "5060:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "5068:3:3", + "type": "" + } + ], + "src": "4926:366:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5469:248:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5479:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5491:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5502:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5487:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5487:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5479:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5526:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5537:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5522:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5522:17:3" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5545:4:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5551:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "5541:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5541:20:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5515:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "5515:47:3" + }, + "nodeType": "YulExpressionStatement", + "src": "5515:47:3" + }, + { + "nodeType": "YulAssignment", + "src": "5571:139:3", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5705:4:3" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "5579:124:3" + }, + "nodeType": "YulFunctionCall", + "src": "5579:131:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5571:4:3" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "5449:9:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "5464:4:3", + "type": "" + } + ], + "src": "5298:419:3" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\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 function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\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 cleanup_t_rational_500000000000000000_by_1(value) -> cleaned {\n cleaned := value\n }\n\n function identity(value) -> ret {\n ret := value\n }\n\n function convert_t_rational_500000000000000000_by_1_to_t_uint256(value) -> converted {\n converted := cleanup_t_uint256(identity(cleanup_t_rational_500000000000000000_by_1(value)))\n }\n\n function abi_encode_t_rational_500000000000000000_by_1_to_t_uint256_fromStack(value, pos) {\n mstore(pos, convert_t_rational_500000000000000000_by_1_to_t_uint256(value))\n }\n\n function abi_encode_tuple_t_rational_500000000000000000_by_1__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_rational_500000000000000000_by_1_to_t_uint256_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_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0(memPtr) {\n\n mstore(add(memPtr, 0), \"You request amount cannot bigger\")\n\n mstore(add(memPtr, 32), \" than 0.1 ether\")\n\n }\n\n function abi_encode_t_stringliteral_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 47)\n store_literal_in_memory_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0__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_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e(memPtr) {\n\n mstore(add(memPtr, 0), \"This ATM doesn't have enough ETH\")\n\n mstore(add(memPtr, 32), \" to withdraw\")\n\n }\n\n function abi_encode_t_stringliteral_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 44)\n store_literal_in_memory_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e__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_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e_to_t_string_memory_ptr_fromStack( tail)\n\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": "117:447:0:-:0;;;160:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;141:10:2;133:5;;:18;;;;;;;;;;;;;;;;;;215:9:0;195:4;;:31;;;;;;;;;;;;;;;;;;160:70;117:447;;88:117:3;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:143::-;753:5;784:6;778:13;769:22;;800:33;827:5;800:33;:::i;:::-;696:143;;;;:::o;845:351::-;915:6;964:2;952:9;943:7;939:23;935:32;932:119;;;970:79;;:::i;:::-;932:119;1090:1;1115:64;1171:7;1162:6;1151:9;1147:22;1115:64;:::i;:::-;1105:74;;1061:128;845:351;;;;:::o;117:447:0:-;;;;;;;", + "deployedSourceMap": "117:447:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;233:329;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;267:89:2;;;;;;;;;;;;;:::i;:::-;;91:20;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;233:329:0;303:9;278:21;:34;275:73;;319:4;;;;;;;;;;;:13;;;333:9;319:24;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;275:73;367:9;359:6;:17;;351:77;;;;;;;;;;;;:::i;:::-;;;;;;;;;448:21;440:6;:29;;432:86;;;;;;;;;;;;:::i;:::-;;;;;;;;;530:10;522:28;;:36;551:6;522:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;233:329;:::o;267:89:2:-;206:5;;;;;;;;;;192:19;;:10;:19;;;184:71;;;;;;;;;;;;:::i;:::-;;;;;;;;;314:5:::1;::::0;::::1;;;;;;;;306:23;;:46;330:21;306:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;267:89::o:0;91:20::-;;;;;;;;;;;;:::o;88:117:3:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:329::-;749:6;798:2;786:9;777:7;773:23;769:32;766:119;;;804:79;;:::i;:::-;766:119;924:1;949:53;994:7;985:6;974:9;970:22;949:53;:::i;:::-;939:63;;895:117;690:329;;;;:::o;1025:126::-;1062:7;1102:42;1095:5;1091:54;1080:65;;1025:126;;;:::o;1157:96::-;1194:7;1223:24;1241:5;1223:24;:::i;:::-;1212:35;;1157:96;;;:::o;1259:118::-;1346:24;1364:5;1346:24;:::i;:::-;1341:3;1334:37;1259:118;;:::o;1383:222::-;1476:4;1514:2;1503:9;1499:18;1491:26;;1527:71;1595:1;1584:9;1580:17;1571:6;1527:71;:::i;:::-;1383:222;;;;:::o;1611:102::-;1673:7;1702:5;1691:16;;1611:102;;;:::o;1719:60::-;1747:3;1768:5;1761:12;;1719:60;;;:::o;1785:192::-;1860:9;1893:78;1911:59;1920:49;1963:5;1920:49;:::i;:::-;1911:59;:::i;:::-;1893:78;:::i;:::-;1880:91;;1785:192;;;:::o;1983:181::-;2095:62;2151:5;2095:62;:::i;:::-;2090:3;2083:75;1983:181;;:::o;2170:272::-;2288:4;2326:2;2315:9;2311:18;2303:26;;2339:96;2432:1;2421:9;2417:17;2408:6;2339:96;:::i;:::-;2170:272;;;;:::o;2448:169::-;2532:11;2566:6;2561:3;2554:19;2606:4;2601:3;2597:14;2582:29;;2448:169;;;;:::o;2623:234::-;2763:34;2759:1;2751:6;2747:14;2740:58;2832:17;2827:2;2819:6;2815:15;2808:42;2623:234;:::o;2863:366::-;3005:3;3026:67;3090:2;3085:3;3026:67;:::i;:::-;3019:74;;3102:93;3191:3;3102:93;:::i;:::-;3220:2;3215:3;3211:12;3204:19;;2863:366;;;:::o;3235:419::-;3401:4;3439:2;3428:9;3424:18;3416:26;;3488:9;3482:4;3478:20;3474:1;3463:9;3459:17;3452:47;3516:131;3642:4;3516:131;:::i;:::-;3508:139;;3235:419;;;:::o;3660:231::-;3800:34;3796:1;3788:6;3784:14;3777:58;3869:14;3864:2;3856:6;3852:15;3845:39;3660:231;:::o;3897:366::-;4039:3;4060:67;4124:2;4119:3;4060:67;:::i;:::-;4053:74;;4136:93;4225:3;4136:93;:::i;:::-;4254:2;4249:3;4245:12;4238:19;;3897:366;;;:::o;4269:419::-;4435:4;4473:2;4462:9;4458:18;4450:26;;4522:9;4516:4;4512:20;4508:1;4497:9;4493:17;4486:47;4550:131;4676:4;4550:131;:::i;:::-;4542:139;;4269:419;;;:::o;4694:226::-;4834:34;4830:1;4822:6;4818:14;4811:58;4903:9;4898:2;4890:6;4886:15;4879:34;4694:226;:::o;4926:366::-;5068:3;5089:67;5153:2;5148:3;5089:67;:::i;:::-;5082:74;;5165:93;5254:3;5165:93;:::i;:::-;5283:2;5278:3;5274:12;5267:19;;4926:366;;;:::o;5298:419::-;5464:4;5502:2;5491:9;5487:18;5479:26;;5551:9;5545:4;5541:20;5537:1;5526:9;5522:17;5515:47;5579:131;5705:4;5579:131;:::i;:::-;5571:139;;5298:419;;;:::o", + "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport \"./BaseContract.sol\";\nimport \"./Bank.sol\";\n\ncontract ATM is BaseContract{\n\tBank bank;\n\tconstructor(address bank_addr) {\n\t\tbank = Bank(payable(bank_addr));\n\t}\n\n\tfunction withdraw(uint amount) public {\n\t\tif(address(this).balance <= 0.1 ether) {\n\t\t\tbank.withdraw(0.5 ether);\n\t\t}\n\t\trequire(amount<=0.1 ether, \"You request amount cannot bigger than 0.1 ether\");\n\t\trequire(amount<=address(this).balance, \"This ATM doesn't have enough ETH to withdraw\");\n\t\tpayable(msg.sender).transfer(amount);\n\t}\n}\n", + "sourcePath": "/home/snsd0805/code/1112_blockchain/HW2_Advanced_Faucet/contracts/ATM.sol", + "ast": { + "absolutePath": "project:/contracts/ATM.sol", + "exportedSymbols": { + "ATM": [ + 72 + ], + "Bank": [ + 166 + ], + "BaseContract": [ + 214 + ] + }, + "id": 73, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.4", + ".22", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "32:32:0" + }, + { + "absolutePath": "project:/contracts/BaseContract.sol", + "file": "./BaseContract.sol", + "id": 2, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 73, + "sourceUnit": 215, + "src": "66:28:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/Bank.sol", + "file": "./Bank.sol", + "id": 3, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 73, + "sourceUnit": 167, + "src": "95:20:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4, + "name": "BaseContract", + "nameLocations": [ + "133:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 214, + "src": "133:12:0" + }, + "id": 5, + "nodeType": "InheritanceSpecifier", + "src": "133:12:0" + } + ], + "canonicalName": "ATM", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 72, + "linearizedBaseContracts": [ + 72, + 214 + ], + "name": "ATM", + "nameLocation": "126:3:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "bank", + "nameLocation": "153:4:0", + "nodeType": "VariableDeclaration", + "scope": 72, + "src": "148:9:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Bank_$166", + "typeString": "contract Bank" + }, + "typeName": { + "id": 7, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6, + "name": "Bank", + "nameLocations": [ + "148:4:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 166, + "src": "148:4:0" + }, + "referencedDeclaration": 166, + "src": "148:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Bank_$166", + "typeString": "contract Bank" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 22, + "nodeType": "Block", + "src": "191:39:0", + "statements": [ + { + "expression": { + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 13, + "name": "bank", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "195:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Bank_$166", + "typeString": "contract Bank" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 17, + "name": "bank_addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "215:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "207:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "207:8:0", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "207:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 14, + "name": "Bank", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 166, + "src": "202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Bank_$166_$", + "typeString": "type(contract Bank)" + } + }, + "id": 19, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "202:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Bank_$166", + "typeString": "contract Bank" + } + }, + "src": "195:31:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Bank_$166", + "typeString": "contract Bank" + } + }, + "id": 21, + "nodeType": "ExpressionStatement", + "src": "195:31:0" + } + ] + }, + "id": 23, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 11, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10, + "mutability": "mutable", + "name": "bank_addr", + "nameLocation": "180:9:0", + "nodeType": "VariableDeclaration", + "scope": 23, + "src": "172:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "172:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "171:19:0" + }, + "returnParameters": { + "id": 12, + "nodeType": "ParameterList", + "parameters": [], + "src": "191:0:0" + }, + "scope": 72, + "src": "160:70:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 70, + "nodeType": "Block", + "src": "271:291:0", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 34, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 30, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "286:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ATM_$72", + "typeString": "contract ATM" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ATM_$72", + "typeString": "contract ATM" + } + ], + "id": 29, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "278:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 28, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "278:7:0", + "typeDescriptions": {} + } + }, + "id": 31, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "278:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 32, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "292:7:0", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "278:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "302e31", + "id": 33, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "303:9:0", + "subdenomination": "ether", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000000_by_1", + "typeString": "int_const 100000000000000000" + }, + "value": "0.1" + }, + "src": "278:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 42, + "nodeType": "IfStatement", + "src": "275:73:0", + "trueBody": { + "id": 41, + "nodeType": "Block", + "src": "314:34:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "302e35", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "333:9:0", + "subdenomination": "ether", + "typeDescriptions": { + "typeIdentifier": "t_rational_500000000000000000_by_1", + "typeString": "int_const 500000000000000000" + }, + "value": "0.5" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_500000000000000000_by_1", + "typeString": "int_const 500000000000000000" + } + ], + "expression": { + "id": 35, + "name": "bank", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "319:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Bank_$166", + "typeString": "contract Bank" + } + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "324:8:0", + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 165, + "src": "319:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "319:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "319:24:0" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 44, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "359:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "302e31", + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "367:9:0", + "subdenomination": "ether", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000000_by_1", + "typeString": "int_const 100000000000000000" + }, + "value": "0.1" + }, + "src": "359:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "596f75207265717565737420616d6f756e742063616e6e6f7420626967676572207468616e20302e31206574686572", + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "378:49:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0", + "typeString": "literal_string \"You request amount cannot bigger than 0.1 ether\"" + }, + "value": "You request amount cannot bigger than 0.1 ether" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_88aa1d38043ad612a5bd3cf6af90a5a4173bf63e5e2d2acf062571b31d7562d0", + "typeString": "literal_string \"You request amount cannot bigger than 0.1 ether\"" + } + ], + "id": 43, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "351:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "351:77:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "351:77:0" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 51, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "440:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 54, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "456:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ATM_$72", + "typeString": "contract ATM" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ATM_$72", + "typeString": "contract ATM" + } + ], + "id": 53, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "448:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "448:7:0", + "typeDescriptions": {} + } + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "448:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 56, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "462:7:0", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "448:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "440:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546869732041544d20646f65736e2774206861766520656e6f7567682045544820746f207769746864726177", + "id": 58, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "471:46:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e", + "typeString": "literal_string \"This ATM doesn't have enough ETH to withdraw\"" + }, + "value": "This ATM doesn't have enough ETH to withdraw" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_951c6c204a160ed91974382975e9f63d26a9475fc11185703124d836e6656a3e", + "typeString": "literal_string \"This ATM doesn't have enough ETH to withdraw\"" + } + ], + "id": 50, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "432:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 59, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "432:86:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60, + "nodeType": "ExpressionStatement", + "src": "432:86:0" + }, + { + "expression": { + "arguments": [ + { + "id": 67, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "551:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 63, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "530:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "534:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "530:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 62, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "522:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 61, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "522:8:0", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "522:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "542:8:0", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "522:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "522:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 69, + "nodeType": "ExpressionStatement", + "src": "522:36:0" + } + ] + }, + "functionSelector": "2e1a7d4d", + "id": 71, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "242:8:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 25, + "mutability": "mutable", + "name": "amount", + "nameLocation": "256:6:0", + "nodeType": "VariableDeclaration", + "scope": 71, + "src": "251:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "251:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "250:13:0" + }, + "returnParameters": { + "id": 27, + "nodeType": "ParameterList", + "parameters": [], + "src": "271:0:0" + }, + "scope": 72, + "src": "233:329:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 73, + "src": "117:447:0", + "usedErrors": [] + } + ], + "src": "32:533:0" + }, + "compiler": { + "name": "solc", + "version": "0.8.19+commit.7dd6d404.Emscripten.clang" + }, + "networks": { + "5777": { + "events": {}, + "links": {}, + "address": "0xb0bAd9C307436e37073bEC8a845Eb121c94491D5", + "transactionHash": "0x8e9cd18dba4189113682aa7571e9b02757ee9bcd693be9a76cb16bc98b4c8344" + }, + "11155111": { + "events": {}, + "links": {}, + "address": "0x7ed82F1851960a0c2d2BA689c056616e2472Ddce", + "transactionHash": "0x6e839bcbf67572b740b6b4136ad56e076adc3c9b5a6fbaace0297d6e226003b6" + } + }, + "schemaVersion": "3.4.13", + "updatedAt": "2023-03-29T08:50:14.693Z", + "networkType": "ethereum", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/build/contracts/Bank.json b/build/contracts/Bank.json new file mode 100644 index 0000000..f3863af --- /dev/null +++ b/build/contracts/Bank.json @@ -0,0 +1,3900 @@ +{ + "contractName": "Bank", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "destroy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "stateMutability": "payable", + "type": "receive", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "atm", + "type": "address" + } + ], + "name": "addATM", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"atm\",\"type\":\"address\"}],\"name\":\"addATM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/Bank.sol\":\"Bank\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/Bank.sol\":{\"keccak256\":\"0x7e71586662e9ff25c22934c0898039b5027d914971e8eb2876ad100c17105a04\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a4b07fc981db749280db101aed247db5698848b980348238b59058921a2396f\",\"dweb:/ipfs/QmWS5cvNoaq5MQFMzR6udwPWTu7NcoZUbLifgbLb5DpHMo\"]},\"project:/contracts/BaseContract.sol\":{\"keccak256\":\"0xe4a7a376123fde9f62e656195c2b5208f8fe81b22346263c4f52fd2408eb3ef1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921d16d096d80ce97a7596e3706588d1bbf0e3f55df790bfedac171cd9bd2dc5\",\"dweb:/ipfs/QmQmXW1HZoNrhhEtgSxapUg8hghEtVWJ1DLvbDZNbikr5j\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107f9806100606000396000f3fe6080604052600436106100435760003560e01c80632e1a7d4d1461004f57806383197ef01461007857806385c1a0021461008f5780638da5cb5b146100b85761004a565b3661004a57005b600080fd5b34801561005b57600080fd5b506100766004803603810190610071919061049a565b6100e3565b005b34801561008457600080fd5b5061008d610250565b005b34801561009b57600080fd5b506100b660048036038101906100b19190610525565b610347565b005b3480156100c457600080fd5b506100cd61043b565b6040516100da9190610561565b60405180910390f35b6000805b60018054905081101561018157600181815481106101085761010761057c565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff160361016e5760019150610181565b8080610179906105da565b9150506100e7565b50806101c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b99061067f565b60405180910390fd5b47821115610205576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fc90610711565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015801561024b573d6000803e3d6000fd5b505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d5906107a3565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610344573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103cc906107a3565b60405180910390fd5b6001819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080fd5b6000819050919050565b61047781610464565b811461048257600080fd5b50565b6000813590506104948161046e565b92915050565b6000602082840312156104b0576104af61045f565b5b60006104be84828501610485565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104f2826104c7565b9050919050565b610502816104e7565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b60006020828403121561053b5761053a61045f565b5b600061054984828501610510565b91505092915050565b61055b816104e7565b82525050565b60006020820190506105766000830184610552565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006105e582610464565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610617576106166105ab565b5b600182019050919050565b600082825260208201905092915050565b7f596f75277265206e6f74206f75722041544d2e00000000000000000000000000600082015250565b6000610669601383610622565b915061067482610633565b602082019050919050565b600060208201905081810360008301526106988161065c565b9050919050565b7f42616e6b20646f65736e2774206861766520656e6f756768206d6f6e6579207460008201527f6f2077697468647261772e000000000000000000000000000000000000000000602082015250565b60006106fb602b83610622565b91506107068261069f565b604082019050919050565b6000602082019050818103600083015261072a816106ee565b9050919050565b7f546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e60008201527f2061636365737300000000000000000000000000000000000000000000000000602082015250565b600061078d602783610622565b915061079882610731565b604082019050919050565b600060208201905081810360008301526107bc81610780565b905091905056fea2646970667358221220ec4ba2f1703f5a512f6b6f3cc45b2f5ebeb8b8fe31a15dada9eb9429ba67b21c64736f6c63430008130033", + "deployedBytecode": "0x6080604052600436106100435760003560e01c80632e1a7d4d1461004f57806383197ef01461007857806385c1a0021461008f5780638da5cb5b146100b85761004a565b3661004a57005b600080fd5b34801561005b57600080fd5b506100766004803603810190610071919061049a565b6100e3565b005b34801561008457600080fd5b5061008d610250565b005b34801561009b57600080fd5b506100b660048036038101906100b19190610525565b610347565b005b3480156100c457600080fd5b506100cd61043b565b6040516100da9190610561565b60405180910390f35b6000805b60018054905081101561018157600181815481106101085761010761057c565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff160361016e5760019150610181565b8080610179906105da565b9150506100e7565b50806101c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b99061067f565b60405180910390fd5b47821115610205576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fc90610711565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015801561024b573d6000803e3d6000fd5b505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d5906107a3565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610344573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103cc906107a3565b60405180910390fd5b6001819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080fd5b6000819050919050565b61047781610464565b811461048257600080fd5b50565b6000813590506104948161046e565b92915050565b6000602082840312156104b0576104af61045f565b5b60006104be84828501610485565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104f2826104c7565b9050919050565b610502816104e7565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b60006020828403121561053b5761053a61045f565b5b600061054984828501610510565b91505092915050565b61055b816104e7565b82525050565b60006020820190506105766000830184610552565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006105e582610464565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610617576106166105ab565b5b600182019050919050565b600082825260208201905092915050565b7f596f75277265206e6f74206f75722041544d2e00000000000000000000000000600082015250565b6000610669601383610622565b915061067482610633565b602082019050919050565b600060208201905081810360008301526106988161065c565b9050919050565b7f42616e6b20646f65736e2774206861766520656e6f756768206d6f6e6579207460008201527f6f2077697468647261772e000000000000000000000000000000000000000000602082015250565b60006106fb602b83610622565b91506107068261069f565b604082019050919050565b6000602082019050818103600083015261072a816106ee565b9050919050565b7f546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e60008201527f2061636365737300000000000000000000000000000000000000000000000000602082015250565b600061078d602783610622565b915061079882610731565b604082019050919050565b600060208201905081810360008301526107bc81610780565b905091905056fea2646970667358221220ec4ba2f1703f5a512f6b6f3cc45b2f5ebeb8b8fe31a15dada9eb9429ba67b21c64736f6c63430008130033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:6036:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:3", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:3", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:3" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:3" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:3" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:3", + "type": "" + } + ], + "src": "7:75:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:3" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:3" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "379:32:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:16:3", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "400:5:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:3", + "type": "" + } + ], + "src": "334:77:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "460:79:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "517:16:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "526:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "529:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "519:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "519:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "519:12:3" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "483:5:3" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "508:5:3" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "490:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "490:24:3" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "480:2:3" + }, + "nodeType": "YulFunctionCall", + "src": "480:35:3" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "473:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "473:43:3" + }, + "nodeType": "YulIf", + "src": "470:63:3" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "453:5:3", + "type": "" + } + ], + "src": "417:122:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "597:87:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "607:29:3", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "629:6:3" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "616:12:3" + }, + "nodeType": "YulFunctionCall", + "src": "616:20:3" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "607:5:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "672:5:3" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "645:26:3" + }, + "nodeType": "YulFunctionCall", + "src": "645:33:3" + }, + "nodeType": "YulExpressionStatement", + "src": "645:33:3" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "575:6:3", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "583:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "591:5:3", + "type": "" + } + ], + "src": "545:139:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "756:263:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "802:83:3", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "804:77:3" + }, + "nodeType": "YulFunctionCall", + "src": "804:79:3" + }, + "nodeType": "YulExpressionStatement", + "src": "804:79:3" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "777:7:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "786:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "773:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "773:23:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "798:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "769:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "769:32:3" + }, + "nodeType": "YulIf", + "src": "766:119:3" + }, + { + "nodeType": "YulBlock", + "src": "895:117:3", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "910:15:3", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "924:1:3", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "914:6:3", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "939:63:3", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "974:9:3" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "985:6:3" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "970:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "970:22:3" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "994:7:3" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "949:20:3" + }, + "nodeType": "YulFunctionCall", + "src": "949:53:3" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "939:6:3" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "726:9:3", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "737:7:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "749:6:3", + "type": "" + } + ], + "src": "690:329:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1070:81:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1080:65:3", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1095:5:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1102:42:3", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "1091:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "1091:54:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "1080:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1052:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "1062:7:3", + "type": "" + } + ], + "src": "1025:126:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1202:51:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1212:35:3", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1241:5:3" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "1223:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "1223:24:3" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "1212:7:3" + } + ] + } + ] + }, + "name": "cleanup_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1184:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "1194:7:3", + "type": "" + } + ], + "src": "1157:96:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1302:79:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1359:16:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1368:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1371:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1361:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "1361:12:3" + }, + "nodeType": "YulExpressionStatement", + "src": "1361:12:3" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1325:5:3" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1350:5:3" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "1332:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "1332:24:3" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "1322:2:3" + }, + "nodeType": "YulFunctionCall", + "src": "1322:35:3" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1315:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "1315:43:3" + }, + "nodeType": "YulIf", + "src": "1312:63:3" + } + ] + }, + "name": "validator_revert_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1295:5:3", + "type": "" + } + ], + "src": "1259:122:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1439:87:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1449:29:3", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1471:6:3" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "1458:12:3" + }, + "nodeType": "YulFunctionCall", + "src": "1458:20:3" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1449:5:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1514:5:3" + } + ], + "functionName": { + "name": "validator_revert_t_address", + "nodeType": "YulIdentifier", + "src": "1487:26:3" + }, + "nodeType": "YulFunctionCall", + "src": "1487:33:3" + }, + "nodeType": "YulExpressionStatement", + "src": "1487:33:3" + } + ] + }, + "name": "abi_decode_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1417:6:3", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1425:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1433:5:3", + "type": "" + } + ], + "src": "1387:139:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1598:263:3", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1644:83:3", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "1646:77:3" + }, + "nodeType": "YulFunctionCall", + "src": "1646:79:3" + }, + "nodeType": "YulExpressionStatement", + "src": "1646:79:3" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1619:7:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1628:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "1615:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "1615:23:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1640:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "1611:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "1611:32:3" + }, + "nodeType": "YulIf", + "src": "1608:119:3" + }, + { + "nodeType": "YulBlock", + "src": "1737:117:3", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1752:15:3", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1766:1:3", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1756:6:3", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1781:63:3", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1816:9:3" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1827:6:3" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1812:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "1812:22:3" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1836:7:3" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "1791:20:3" + }, + "nodeType": "YulFunctionCall", + "src": "1791:53:3" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1781:6:3" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1568:9:3", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "1579:7:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1591:6:3", + "type": "" + } + ], + "src": "1532:329:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1932:53:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1949:3:3" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1972:5:3" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "1954:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "1954:24:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1942:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "1942:37:3" + }, + "nodeType": "YulExpressionStatement", + "src": "1942:37:3" + } + ] + }, + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1920:5:3", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1927:3:3", + "type": "" + } + ], + "src": "1867:118:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2089:124:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2099:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2111:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2122:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2107:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2107:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2099:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "2179:6:3" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2192:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2203:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2188:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2188:17:3" + } + ], + "functionName": { + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulIdentifier", + "src": "2135:43:3" + }, + "nodeType": "YulFunctionCall", + "src": "2135:71:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2135:71:3" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2061:9:3", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "2073:6:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2084:4:3", + "type": "" + } + ], + "src": "1991:222:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2247:152:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2264:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2267:77:3", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2257:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2257:88:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2257:88:3" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2361:1:3", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2364:4:3", + "type": "", + "value": "0x32" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2354:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2354:15:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2354:15:3" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2385:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2388:4:3", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "2378:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2378:15:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2378:15:3" + } + ] + }, + "name": "panic_error_0x32", + "nodeType": "YulFunctionDefinition", + "src": "2219:180:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2433:152:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2450:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2453:77:3", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2443:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2443:88:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2443:88:3" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2547:1:3", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2550:4:3", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2540:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2540:15:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2540:15:3" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2571:1:3", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2574:4:3", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "2564:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2564:15:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2564:15:3" + } + ] + }, + "name": "panic_error_0x11", + "nodeType": "YulFunctionDefinition", + "src": "2405:180:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2634:190:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2644:33:3", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2671:5:3" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "2653:17:3" + }, + "nodeType": "YulFunctionCall", + "src": "2653:24:3" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2644:5:3" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2767:22:3", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "2769:16:3" + }, + "nodeType": "YulFunctionCall", + "src": "2769:18:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2769:18:3" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2692:5:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2699:66:3", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "2689:2:3" + }, + "nodeType": "YulFunctionCall", + "src": "2689:77:3" + }, + "nodeType": "YulIf", + "src": "2686:103:3" + }, + { + "nodeType": "YulAssignment", + "src": "2798:20:3", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2809:5:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2816:1:3", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2805:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2805:13:3" + }, + "variableNames": [ + { + "name": "ret", + "nodeType": "YulIdentifier", + "src": "2798:3:3" + } + ] + } + ] + }, + "name": "increment_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2620:5:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "ret", + "nodeType": "YulTypedName", + "src": "2630:3:3", + "type": "" + } + ], + "src": "2591:233:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2926:73:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2943:3:3" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2948:6:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2936:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "2936:19:3" + }, + "nodeType": "YulExpressionStatement", + "src": "2936:19:3" + }, + { + "nodeType": "YulAssignment", + "src": "2964:29:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2983:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2988:4:3", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2979:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "2979:14:3" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "2964:11:3" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2898:3:3", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "2903:6:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "2914:11:3", + "type": "" + } + ], + "src": "2830:169:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3111:63:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "3133:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3141:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3129:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3129:14:3" + }, + { + "hexValue": "596f75277265206e6f74206f75722041544d2e", + "kind": "string", + "nodeType": "YulLiteral", + "src": "3145:21:3", + "type": "", + "value": "You're not our ATM." + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3122:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "3122:45:3" + }, + "nodeType": "YulExpressionStatement", + "src": "3122:45:3" + } + ] + }, + "name": "store_literal_in_memory_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "3103:6:3", + "type": "" + } + ], + "src": "3005:169:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3326:220:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3336:74:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3402:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3407:2:3", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "3343:58:3" + }, + "nodeType": "YulFunctionCall", + "src": "3343:67:3" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3336:3:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3508:3:3" + } + ], + "functionName": { + "name": "store_literal_in_memory_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240", + "nodeType": "YulIdentifier", + "src": "3419:88:3" + }, + "nodeType": "YulFunctionCall", + "src": "3419:93:3" + }, + "nodeType": "YulExpressionStatement", + "src": "3419:93:3" + }, + { + "nodeType": "YulAssignment", + "src": "3521:19:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3532:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3537:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3528:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3528:12:3" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "3521:3:3" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "3314:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "3322:3:3", + "type": "" + } + ], + "src": "3180:366:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3723:248:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3733:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3745:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3756:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3741:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3741:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3733:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3780:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3791:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3776:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3776:17:3" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3799:4:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3805:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "3795:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "3795:20:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3769:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "3769:47:3" + }, + "nodeType": "YulExpressionStatement", + "src": "3769:47:3" + }, + { + "nodeType": "YulAssignment", + "src": "3825:139:3", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3959:4:3" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "3833:124:3" + }, + "nodeType": "YulFunctionCall", + "src": "3833:131:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3825:4:3" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "3703:9:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "3718:4:3", + "type": "" + } + ], + "src": "3552:419:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4083:124:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "4105:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4113:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4101:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4101:14:3" + }, + { + "hexValue": "42616e6b20646f65736e2774206861766520656e6f756768206d6f6e65792074", + "kind": "string", + "nodeType": "YulLiteral", + "src": "4117:34:3", + "type": "", + "value": "Bank doesn't have enough money t" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4094:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "4094:58:3" + }, + "nodeType": "YulExpressionStatement", + "src": "4094:58:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "4173:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4181:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4169:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4169:15:3" + }, + { + "hexValue": "6f2077697468647261772e", + "kind": "string", + "nodeType": "YulLiteral", + "src": "4186:13:3", + "type": "", + "value": "o withdraw." + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4162:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "4162:38:3" + }, + "nodeType": "YulExpressionStatement", + "src": "4162:38:3" + } + ] + }, + "name": "store_literal_in_memory_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "4075:6:3", + "type": "" + } + ], + "src": "3977:230:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4359:220:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4369:74:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4435:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4440:2:3", + "type": "", + "value": "43" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "4376:58:3" + }, + "nodeType": "YulFunctionCall", + "src": "4376:67:3" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4369:3:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4541:3:3" + } + ], + "functionName": { + "name": "store_literal_in_memory_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a", + "nodeType": "YulIdentifier", + "src": "4452:88:3" + }, + "nodeType": "YulFunctionCall", + "src": "4452:93:3" + }, + "nodeType": "YulExpressionStatement", + "src": "4452:93:3" + }, + { + "nodeType": "YulAssignment", + "src": "4554:19:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4565:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4570:2:3", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4561:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4561:12:3" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "4554:3:3" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "4347:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "4355:3:3", + "type": "" + } + ], + "src": "4213:366:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4756:248:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4766:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4778:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4789:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4774:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4774:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4766:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4813:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4824:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4809:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4809:17:3" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4832:4:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4838:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "4828:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "4828:20:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4802:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "4802:47:3" + }, + "nodeType": "YulExpressionStatement", + "src": "4802:47:3" + }, + { + "nodeType": "YulAssignment", + "src": "4858:139:3", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4992:4:3" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "4866:124:3" + }, + "nodeType": "YulFunctionCall", + "src": "4866:131:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4858:4:3" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "4736:9:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "4751:4:3", + "type": "" + } + ], + "src": "4585:419:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5116:120:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "5138:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5146:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5134:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5134:14:3" + }, + { + "hexValue": "546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e", + "kind": "string", + "nodeType": "YulLiteral", + "src": "5150:34:3", + "type": "", + "value": "This function only the owner can" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5127:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "5127:58:3" + }, + "nodeType": "YulExpressionStatement", + "src": "5127:58:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "5206:6:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5214:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5202:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5202:15:3" + }, + { + "hexValue": "20616363657373", + "kind": "string", + "nodeType": "YulLiteral", + "src": "5219:9:3", + "type": "", + "value": " access" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5195:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "5195:34:3" + }, + "nodeType": "YulExpressionStatement", + "src": "5195:34:3" + } + ] + }, + "name": "store_literal_in_memory_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "5108:6:3", + "type": "" + } + ], + "src": "5010:226:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5388:220:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5398:74:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5464:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5469:2:3", + "type": "", + "value": "39" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "5405:58:3" + }, + "nodeType": "YulFunctionCall", + "src": "5405:67:3" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5398:3:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5570:3:3" + } + ], + "functionName": { + "name": "store_literal_in_memory_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002", + "nodeType": "YulIdentifier", + "src": "5481:88:3" + }, + "nodeType": "YulFunctionCall", + "src": "5481:93:3" + }, + "nodeType": "YulExpressionStatement", + "src": "5481:93:3" + }, + { + "nodeType": "YulAssignment", + "src": "5583:19:3", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5594:3:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5599:2:3", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5590:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5590:12:3" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "5583:3:3" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "5376:3:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "5384:3:3", + "type": "" + } + ], + "src": "5242:366:3" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5785:248:3", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5795:26:3", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5807:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5818:2:3", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5803:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5803:18:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5795:4:3" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5842:9:3" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5853:1:3", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5838:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5838:17:3" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5861:4:3" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5867:9:3" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "5857:3:3" + }, + "nodeType": "YulFunctionCall", + "src": "5857:20:3" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5831:6:3" + }, + "nodeType": "YulFunctionCall", + "src": "5831:47:3" + }, + "nodeType": "YulExpressionStatement", + "src": "5831:47:3" + }, + { + "nodeType": "YulAssignment", + "src": "5887:139:3", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "6021:4:3" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "5895:124:3" + }, + "nodeType": "YulFunctionCall", + "src": "5895:131:3" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5887:4:3" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_f481286fd7e35fb08a942fbbdf386ddc72236b2a397440207a7e669288de8002__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "5765:9:3", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "5780:4:3", + "type": "" + } + ], + "src": "5614:419:3" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\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 function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\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 validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\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 panic_error_0x32() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x32)\n revert(0, 0x24)\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function increment_t_uint256(value) -> ret {\n value := cleanup_t_uint256(value)\n if eq(value, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) { panic_error_0x11() }\n ret := add(value, 1)\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_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240(memPtr) {\n\n mstore(add(memPtr, 0), \"You're not our ATM.\")\n\n }\n\n function abi_encode_t_stringliteral_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 19)\n store_literal_in_memory_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240__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_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a(memPtr) {\n\n mstore(add(memPtr, 0), \"Bank doesn't have enough money t\")\n\n mstore(add(memPtr, 32), \"o withdraw.\")\n\n }\n\n function abi_encode_t_stringliteral_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 43)\n store_literal_in_memory_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a__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_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a_to_t_string_memory_ptr_fromStack( tail)\n\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": "96:528:1:-:0;;;153:16;;;;;;;;;;141:10:2;133:5;;:18;;;;;;;;;;;;;;;;;;96:528:1;;;;;;", + "deployedSourceMap": "96:528:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;443:179;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;267:89:2;;;;;;;;;;;;;:::i;:::-;;372:68:1;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;91:20:2;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;443:179:1;195:10;221:6;217:103;233:4;:11;;;;231:1;:13;217:103;;;273:4;278:1;273:7;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;259:21;;:10;:21;;;256:60;;295:4;287:12;;305:5;;256:60;246:3;;;;;:::i;:::-;;;;217:103;;;;331:5;323:37;;;;;;;;;;;;:::i;:::-;;;;;;;;;509:21:::1;501:6;:29;;493:85;;;;;;;;;;;;:::i;:::-;;;;;;;;;590:10;582:28;;:36;611:6;582:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;191:178:::0;443:179;:::o;267:89:2:-;206:5;;;;;;;;;;192:19;;:10;:19;;;184:71;;;;;;;;;;;;:::i;:::-;;;;;;;;;314:5:::1;::::0;::::1;;;;;;;;306:23;;:46;330:21;306:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;267:89::o:0;372:68:1:-;206:5:2;;;;;;;;;;192:19;;:10;:19;;;184:71;;;;;;;;;;;;:::i;:::-;;;;;;;;;422:4:1::1;432:3;422:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;372:68:::0;:::o;91:20:2:-;;;;;;;;;;;;:::o;88:117:3:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:329::-;749:6;798:2;786:9;777:7;773:23;769:32;766:119;;;804:79;;:::i;:::-;766:119;924:1;949:53;994:7;985:6;974:9;970:22;949:53;:::i;:::-;939:63;;895:117;690:329;;;;:::o;1025:126::-;1062:7;1102:42;1095:5;1091:54;1080:65;;1025:126;;;:::o;1157:96::-;1194:7;1223:24;1241:5;1223:24;:::i;:::-;1212:35;;1157:96;;;:::o;1259:122::-;1332:24;1350:5;1332:24;:::i;:::-;1325:5;1322:35;1312:63;;1371:1;1368;1361:12;1312:63;1259:122;:::o;1387:139::-;1433:5;1471:6;1458:20;1449:29;;1487:33;1514:5;1487:33;:::i;:::-;1387:139;;;;:::o;1532:329::-;1591:6;1640:2;1628:9;1619:7;1615:23;1611:32;1608:119;;;1646:79;;:::i;:::-;1608:119;1766:1;1791:53;1836:7;1827:6;1816:9;1812:22;1791:53;:::i;:::-;1781:63;;1737:117;1532:329;;;;:::o;1867:118::-;1954:24;1972:5;1954:24;:::i;:::-;1949:3;1942:37;1867:118;;:::o;1991:222::-;2084:4;2122:2;2111:9;2107:18;2099:26;;2135:71;2203:1;2192:9;2188:17;2179:6;2135:71;:::i;:::-;1991:222;;;;:::o;2219:180::-;2267:77;2264:1;2257:88;2364:4;2361:1;2354:15;2388:4;2385:1;2378:15;2405:180;2453:77;2450:1;2443:88;2550:4;2547:1;2540:15;2574:4;2571:1;2564:15;2591:233;2630:3;2653:24;2671:5;2653:24;:::i;:::-;2644:33;;2699:66;2692:5;2689:77;2686:103;;2769:18;;:::i;:::-;2686:103;2816:1;2809:5;2805:13;2798:20;;2591:233;;;:::o;2830:169::-;2914:11;2948:6;2943:3;2936:19;2988:4;2983:3;2979:14;2964:29;;2830:169;;;;:::o;3005:::-;3145:21;3141:1;3133:6;3129:14;3122:45;3005:169;:::o;3180:366::-;3322:3;3343:67;3407:2;3402:3;3343:67;:::i;:::-;3336:74;;3419:93;3508:3;3419:93;:::i;:::-;3537:2;3532:3;3528:12;3521:19;;3180:366;;;:::o;3552:419::-;3718:4;3756:2;3745:9;3741:18;3733:26;;3805:9;3799:4;3795:20;3791:1;3780:9;3776:17;3769:47;3833:131;3959:4;3833:131;:::i;:::-;3825:139;;3552:419;;;:::o;3977:230::-;4117:34;4113:1;4105:6;4101:14;4094:58;4186:13;4181:2;4173:6;4169:15;4162:38;3977:230;:::o;4213:366::-;4355:3;4376:67;4440:2;4435:3;4376:67;:::i;:::-;4369:74;;4452:93;4541:3;4452:93;:::i;:::-;4570:2;4565:3;4561:12;4554:19;;4213:366;;;:::o;4585:419::-;4751:4;4789:2;4778:9;4774:18;4766:26;;4838:9;4832:4;4828:20;4824:1;4813:9;4809:17;4802:47;4866:131;4992:4;4866:131;:::i;:::-;4858:139;;4585:419;;;:::o;5010:226::-;5150:34;5146:1;5138:6;5134:14;5127:58;5219:9;5214:2;5206:6;5202:15;5195:34;5010:226;:::o;5242:366::-;5384:3;5405:67;5469:2;5464:3;5405:67;:::i;:::-;5398:74;;5481:93;5570:3;5481:93;:::i;:::-;5599:2;5594:3;5590:12;5583:19;;5242:366;;;:::o;5614:419::-;5780:4;5818:2;5807:9;5803:18;5795:26;;5867:9;5861:4;5857:20;5853:1;5842:9;5838:17;5831:47;5895:131;6021:4;5895:131;:::i;:::-;5887:139;;5614:419;;;:::o", + "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport \"./BaseContract.sol\";\n\ncontract Bank is BaseContract{\n\taddress[] private atms;\n\tconstructor() {}\n\n\tmodifier onlyATM() {\n\t\tbool found = false;\n\t\tfor(uint i=0; i=", + "0.4", + ".22", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "32:32:1" + }, + { + "absolutePath": "project:/contracts/BaseContract.sol", + "file": "./BaseContract.sol", + "id": 73, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 165, + "sourceUnit": 213, + "src": "66:28:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 74, + "name": "BaseContract", + "nameLocations": [ + "113:12:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 212, + "src": "113:12:1" + }, + "id": 75, + "nodeType": "InheritanceSpecifier", + "src": "113:12:1" + } + ], + "canonicalName": "Bank", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 164, + "linearizedBaseContracts": [ + 164, + 212 + ], + "name": "Bank", + "nameLocation": "105:4:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 78, + "mutability": "mutable", + "name": "atms", + "nameLocation": "146:4:1", + "nodeType": "VariableDeclaration", + "scope": 164, + "src": "128:22:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 76, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "128:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 77, + "nodeType": "ArrayTypeName", + "src": "128:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 81, + "nodeType": "Block", + "src": "167:2:1", + "statements": [] + }, + "id": 82, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 79, + "nodeType": "ParameterList", + "parameters": [], + "src": "164:2:1" + }, + "returnParameters": { + "id": 80, + "nodeType": "ParameterList", + "parameters": [], + "src": "167:0:1" + }, + "scope": 164, + "src": "153:16:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 120, + "nodeType": "Block", + "src": "191:178:1", + "statements": [ + { + "assignments": [ + 85 + ], + "declarations": [ + { + "constant": false, + "id": 85, + "mutability": "mutable", + "name": "found", + "nameLocation": "200:5:1", + "nodeType": "VariableDeclaration", + "scope": 120, + "src": "195:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 84, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "195:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 87, + "initialValue": { + "hexValue": "66616c7365", + "id": 86, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "208:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "195:18:1" + }, + { + "body": { + "id": 112, + "nodeType": "Block", + "src": "251:69:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 99, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "259:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "263:6:1", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "259:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "baseExpression": { + "id": 101, + "name": "atms", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "273:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 103, + "indexExpression": { + "id": 102, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 89, + "src": "278:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "273:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "259:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 111, + "nodeType": "IfStatement", + "src": "256:60:1", + "trueBody": { + "id": 110, + "nodeType": "Block", + "src": "281:35:1", + "statements": [ + { + "expression": { + "id": 107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 105, + "name": "found", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "287:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "295:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "287:12:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 108, + "nodeType": "ExpressionStatement", + "src": "287:12:1" + }, + { + "id": 109, + "nodeType": "Break", + "src": "305:5:1" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 92, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 89, + "src": "231:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 93, + "name": "atms", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "233:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "238:6:1", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "233:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "231:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 113, + "initializationExpression": { + "assignments": [ + 89 + ], + "declarations": [ + { + "constant": false, + "id": 89, + "mutability": "mutable", + "name": "i", + "nameLocation": "226:1:1", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "221:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 88, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "221:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 91, + "initialValue": { + "hexValue": "30", + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "228:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "221:8:1" + }, + "loopExpression": { + "expression": { + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "246:3:1", + "subExpression": { + "id": 96, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 89, + "src": "246:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 98, + "nodeType": "ExpressionStatement", + "src": "246:3:1" + }, + "nodeType": "ForStatement", + "src": "217:103:1" + }, + { + "expression": { + "arguments": [ + { + "id": 115, + "name": "found", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "331:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "596f75277265206e6f74206f75722041544d2e", + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "338:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240", + "typeString": "literal_string \"You're not our ATM.\"" + }, + "value": "You're not our ATM." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ecf4acf33105f8fdcc92b1c56968f8eddd1fb1d581cd9de39e32785fffcef240", + "typeString": "literal_string \"You're not our ATM.\"" + } + ], + "id": 114, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "323:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "323:37:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 118, + "nodeType": "ExpressionStatement", + "src": "323:37:1" + }, + { + "id": 119, + "nodeType": "PlaceholderStatement", + "src": "364:1:1" + } + ] + }, + "id": 121, + "name": "onlyATM", + "nameLocation": "181:7:1", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 83, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:1" + }, + "src": "172:197:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 134, + "nodeType": "Block", + "src": "418:22:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 131, + "name": "atm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "432:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 128, + "name": "atms", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "422:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "427:4:1", + "memberName": "push", + "nodeType": "MemberAccess", + "src": "422:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_address_$dyn_storage_ptr_$_t_address_$returns$__$attached_to$_t_array$_t_address_$dyn_storage_ptr_$", + "typeString": "function (address[] storage pointer,address)" + } + }, + "id": 132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "422:14:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 133, + "nodeType": "ExpressionStatement", + "src": "422:14:1" + } + ] + }, + "functionSelector": "85c1a002", + "id": 135, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 126, + "kind": "modifierInvocation", + "modifierName": { + "id": 125, + "name": "onlyOwner", + "nameLocations": [ + "408:9:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 189, + "src": "408:9:1" + }, + "nodeType": "ModifierInvocation", + "src": "408:9:1" + } + ], + "name": "addATM", + "nameLocation": "381:6:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 124, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 123, + "mutability": "mutable", + "name": "atm", + "nameLocation": "396:3:1", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "388:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "388:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "387:13:1" + }, + "returnParameters": { + "id": 127, + "nodeType": "ParameterList", + "parameters": [], + "src": "418:0:1" + }, + "scope": 164, + "src": "372:68:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 162, + "nodeType": "Block", + "src": "489:133:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 143, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 137, + "src": "501:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 146, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "517:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Bank_$164", + "typeString": "contract Bank" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Bank_$164", + "typeString": "contract Bank" + } + ], + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "509:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 144, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "509:7:1", + "typeDescriptions": {} + } + }, + "id": 147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "509:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "523:7:1", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "509:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "501:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "42616e6b20646f65736e2774206861766520656e6f756768206d6f6e657920746f2077697468647261772e", + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "532:45:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a", + "typeString": "literal_string \"Bank doesn't have enough money to withdraw.\"" + }, + "value": "Bank doesn't have enough money to withdraw." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a974b494e87129cdf7bb801ffd0278760cd3f8edc4c62b941d00da857d86df0a", + "typeString": "literal_string \"Bank doesn't have enough money to withdraw.\"" + } + ], + "id": 142, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "493:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "493:85:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 152, + "nodeType": "ExpressionStatement", + "src": "493:85:1" + }, + { + "expression": { + "arguments": [ + { + "id": 159, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 137, + "src": "611:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 155, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "590:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "594:6:1", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "590:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "582:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "582:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "582:19:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "602:8:1", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "582:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "582:36:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 161, + "nodeType": "ExpressionStatement", + "src": "582:36:1" + } + ] + }, + "functionSelector": "2e1a7d4d", + "id": 163, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 140, + "kind": "modifierInvocation", + "modifierName": { + "id": 139, + "name": "onlyATM", + "nameLocations": [ + "481:7:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 121, + "src": "481:7:1" + }, + "nodeType": "ModifierInvocation", + "src": "481:7:1" + } + ], + "name": "withdraw", + "nameLocation": "452:8:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 137, + "mutability": "mutable", + "name": "amount", + "nameLocation": "466:6:1", + "nodeType": "VariableDeclaration", + "scope": 163, + "src": "461:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 136, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "461:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "460:13:1" + }, + "returnParameters": { + "id": 141, + "nodeType": "ParameterList", + "parameters": [], + "src": "489:0:1" + }, + "scope": 164, + "src": "443:179:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 165, + "src": "96:528:1", + "usedErrors": [] + } + ], + "src": "32:593:1" + }, + "compiler": { + "name": "solc", + "version": "0.8.19+commit.7dd6d404.Emscripten.clang" + }, + "networks": { + "5777": { + "events": {}, + "links": {}, + "address": "0xa380843E80eB6f26cA9caA7CC4aAED43e01b5381", + "transactionHash": "0x7be20f483adaaefc292a516f0ef01cae4b7c9f1b2d77be5a7c9f1bdb670ca079" + }, + "11155111": { + "events": {}, + "links": {}, + "address": "0xc9083c99Bf625cD9eDbB3Ec1C62b5025D45418c6", + "transactionHash": "0x839ed554ca3125c95c5ccb13cf9acec12876cdb68bc0628eef953ca180678f0f" + } + }, + "schemaVersion": "3.4.13", + "updatedAt": "2023-03-29T08:50:14.690Z", + "networkType": "ethereum", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/build/contracts/BaseContract.json b/build/contracts/BaseContract.json new file mode 100644 index 0000000..4d32a05 --- /dev/null +++ b/build/contracts/BaseContract.json @@ -0,0 +1,1400 @@ +{ + "contractName": "BaseContract", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "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\"},{\"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\":\"0xe4a7a376123fde9f62e656195c2b5208f8fe81b22346263c4f52fd2408eb3ef1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://921d16d096d80ce97a7596e3706588d1bbf0e3f55df790bfedac171cd9bd2dc5\",\"dweb:/ipfs/QmQmXW1HZoNrhhEtgSxapUg8hghEtVWJ1DLvbDZNbikr5j\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102cb806100606000396000f3fe60806040526004361061002d5760003560e01c806383197ef0146100395780638da5cb5b1461005057610034565b3661003457005b600080fd5b34801561004557600080fd5b5061004e61007b565b005b34801561005c57600080fd5b50610065610172565b60405161007291906101d7565b60405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610109576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161010090610275565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561016f573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101c182610196565b9050919050565b6101d1816101b6565b82525050565b60006020820190506101ec60008301846101c8565b92915050565b600082825260208201905092915050565b7f546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e60008201527f2061636365737300000000000000000000000000000000000000000000000000602082015250565b600061025f6027836101f2565b915061026a82610203565b604082019050919050565b6000602082019050818103600083015261028e81610252565b905091905056fea26469706673582212200fa5d463616292cb14aa33ab6eb50cc7c3a0cdc8699d1a8831a5c7f5caf14f2264736f6c63430008130033", + "deployedBytecode": "0x60806040526004361061002d5760003560e01c806383197ef0146100395780638da5cb5b1461005057610034565b3661003457005b600080fd5b34801561004557600080fd5b5061004e61007b565b005b34801561005c57600080fd5b50610065610172565b60405161007291906101d7565b60405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610109576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161010090610275565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561016f573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101c182610196565b9050919050565b6101d1816101b6565b82525050565b60006020820190506101ec60008301846101c8565b92915050565b600082825260208201905092915050565b7f546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e60008201527f2061636365737300000000000000000000000000000000000000000000000000602082015250565b600061025f6027836101f2565b915061026a82610203565b604082019050919050565b6000602082019050818103600083015261028e81610252565b905091905056fea26469706673582212200fa5d463616292cb14aa33ab6eb50cc7c3a0cdc8699d1a8831a5c7f5caf14f2264736f6c63430008130033", + "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:324:2:-:0;;;115:40;;;;;;;;;;141:10;133:5;;:18;;;;;;;;;;;;;;;;;;66:324;;;;;;", + "deployedSourceMap": "66:324:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;267:89;;;;;;;;;;;;;:::i;:::-;;91:20;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;267:89;206:5;;;;;;;;;;192:19;;:10;:19;;;184:71;;;;;;;;;;;;:::i;:::-;;;;;;;;;314:5:::1;::::0;::::1;;;;;;;;306:23;;:46;330:21;306:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;267: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\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": "/home/snsd0805/code/1112_blockchain/HW2_Advanced_Faucet/contracts/BaseContract.sol", + "ast": { + "absolutePath": "project:/contracts/BaseContract.sol", + "exportedSymbols": { + "BaseContract": [ + 212 + ] + }, + "id": 213, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 166, + "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": 212, + "linearizedBaseContracts": [ + 212 + ], + "name": "BaseContract", + "nameLocation": "75:12:2", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "8da5cb5b", + "id": 168, + "mutability": "mutable", + "name": "owner", + "nameLocation": "106:5:2", + "nodeType": "VariableDeclaration", + "scope": 212, + "src": "91:20:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 167, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "91:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 176, + "nodeType": "Block", + "src": "129:26:2", + "statements": [ + { + "expression": { + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 171, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 168, + "src": "133:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 172, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "141:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "145:6:2", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "141:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "133:18:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "133:18:2" + } + ] + }, + "id": 177, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 169, + "nodeType": "ParameterList", + "parameters": [], + "src": "126:2:2" + }, + "returnParameters": { + "id": 170, + "nodeType": "ParameterList", + "parameters": [], + "src": "129:0:2" + }, + "scope": 212, + "src": "115:40:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 188, + "nodeType": "Block", + "src": "180:84:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 180, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "192:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "196:6:2", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "192:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 182, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 168, + "src": "206:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "192:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546869732066756e6374696f6e206f6e6c7920746865206f776e65722063616e20616363657373", + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "213: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": 179, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "184:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "184:71:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 186, + "nodeType": "ExpressionStatement", + "src": "184:71:2" + }, + { + "id": 187, + "nodeType": "PlaceholderStatement", + "src": "259:1:2" + } + ] + }, + "id": 189, + "name": "onlyOwner", + "nameLocation": "168:9:2", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [], + "src": "177:2:2" + }, + "src": "159:105:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 206, + "nodeType": "Block", + "src": "302:54:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 201, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "338:4:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BaseContract_$212", + "typeString": "contract BaseContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BaseContract_$212", + "typeString": "contract BaseContract" + } + ], + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "330:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "330:7:2", + "typeDescriptions": {} + } + }, + "id": 202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "330:13:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "344:7:2", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "330:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 196, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 168, + "src": "314:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "306:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "306:8:2", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "306:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "321:8:2", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "306:23:2", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "306:46:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 205, + "nodeType": "ExpressionStatement", + "src": "306:46:2" + } + ] + }, + "functionSelector": "83197ef0", + "id": 207, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 192, + "kind": "modifierInvocation", + "modifierName": { + "id": 191, + "name": "onlyOwner", + "nameLocations": [ + "293:9:2" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 189, + "src": "293:9:2" + }, + "nodeType": "ModifierInvocation", + "src": "293:9:2" + } + ], + "name": "destroy", + "nameLocation": "276:7:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 190, + "nodeType": "ParameterList", + "parameters": [], + "src": "283:2:2" + }, + "returnParameters": { + "id": 193, + "nodeType": "ParameterList", + "parameters": [], + "src": "302:0:2" + }, + "scope": 212, + "src": "267:89:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 210, + "nodeType": "Block", + "src": "386:2:2", + "statements": [] + }, + "id": 211, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 208, + "nodeType": "ParameterList", + "parameters": [], + "src": "366:2:2" + }, + "returnParameters": { + "id": 209, + "nodeType": "ParameterList", + "parameters": [], + "src": "386:0:2" + }, + "scope": 212, + "src": "359:29:2", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 213, + "src": "66:324:2", + "usedErrors": [] + } + ], + "src": "32:359:2" + }, + "compiler": { + "name": "solc", + "version": "0.8.19+commit.7dd6d404.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.4.13", + "updatedAt": "2023-03-29T08:06:21.136Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/contracts/.gitkeep b/contracts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/contracts/ATM.sol b/contracts/ATM.sol new file mode 100644 index 0000000..ce6f5d7 --- /dev/null +++ b/contracts/ATM.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.4.22 <0.9.0; + +import "./BaseContract.sol"; +import "./Bank.sol"; + +contract ATM is BaseContract{ + Bank bank; + constructor(address bank_addr) { + bank = Bank(payable(bank_addr)); + } + + function withdraw(uint amount) public { + if(address(this).balance <= 0.1 ether) { + bank.withdraw(0.5 ether); + } + require(amount<=0.1 ether, "You request amount cannot bigger than 0.1 ether"); + require(amount<=address(this).balance, "This ATM doesn't have enough ETH to withdraw"); + payable(msg.sender).transfer(amount); + } +} diff --git a/contracts/Bank.sol b/contracts/Bank.sol new file mode 100644 index 0000000..1207ca1 --- /dev/null +++ b/contracts/Bank.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.4.22 <0.9.0; + +import "./BaseContract.sol"; + +contract Bank is BaseContract{ + address[] private atms; + constructor() {} + + modifier onlyATM() { + bool found = false; + for(uint i=0; i=0.4.22 <0.9.0; + +contract BaseContract { + address public owner; + + constructor() { + owner = msg.sender; + } + + modifier onlyOwner() { + require(msg.sender == owner, "This function only the owner can access"); + _; + } + + function destroy() public onlyOwner{ + payable(owner).transfer(address(this).balance); + } + + receive() external payable {} +} diff --git a/migrations/.gitkeep b/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/migrations/1680074400_deploy_bank_atm.js b/migrations/1680074400_deploy_bank_atm.js new file mode 100644 index 0000000..067fb1e --- /dev/null +++ b/migrations/1680074400_deploy_bank_atm.js @@ -0,0 +1,22 @@ +var Bank = artifacts.require("Bank") +var ATM = artifacts.require("ATM") + +module.exports = function(_deployer) { + // Use deployer to state migration tasks. + + _deployer.deploy(Bank).then((bank) => { + return bank.sendTransaction({value: "2000000000000000000"}).then(() => { + _deployer.deploy(ATM, bank.address).then((atm1) => { + return Bank.deployed().then((instance) => { + return instance.addATM(atm1.address); + }) + }) + }).then(() => { + return _deployer.deploy(ATM, bank.address).then((atm2) => { + return Bank.deployed().then((instance) => { + return instance.addATM(atm2.address); + }) + }) + }) + }) +}; diff --git a/test/.gitkeep b/test/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/truffle-config.js b/truffle-config.js new file mode 100644 index 0000000..5c29bd8 --- /dev/null +++ b/truffle-config.js @@ -0,0 +1,141 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation, and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * https://trufflesuite.com/docs/truffle/reference/configuration + * + * Hands-off deployment with Infura + * -------------------------------- + * + * Do you have a complex application that requires lots of transactions to deploy? + * Use this approach to make deployment a breeze ๐Ÿ–๏ธ: + * + * Infura deployment needs a wallet provider (like @truffle/hdwallet-provider) + * to sign transactions before they're sent to a remote public node. + * Infura accounts are available for free at ๐Ÿ”: https://infura.io/register + * + * You'll need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. You can store your secrets ๐Ÿค in a .env file. + * In your project root, run `$ npm install dotenv`. + * Create .env (which should be .gitignored) and declare your MNEMONIC + * and Infura PROJECT_ID variables inside. + * For example, your .env file will have the following structure: + * + * MNEMONIC = + * PROJECT_ID = + * + * Deployment with Truffle Dashboard (Recommended for best security practice) + * -------------------------------------------------------------------------- + * + * Are you concerned about security and minimizing rekt status ๐Ÿค”? + * Use this method for best security: + * + * Truffle Dashboard lets you review transactions in detail, and leverages + * MetaMask for signing, so there's no need to copy-paste your mnemonic. + * More details can be found at ๐Ÿ”Ž: + * + * https://trufflesuite.com/docs/truffle/getting-started/using-the-truffle-dashboard/ + */ + +require('dotenv').config(); +const { MNEMONIC, PROJECT_ID } = process.env; + +const HDWalletProvider = require('@truffle/hdwallet-provider'); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a managed Ganache instance for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache, geth, or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 7545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + // + // An additional network, but with some advanced optionsโ€ฆ + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send transactions from (default: accounts[0]) + // websocket: true // Enable EventEmitter interface for web3 (default: false) + // }, + // + // Useful for deploying to a public network. + // Note: It's important to wrap the provider as a function to ensure truffle uses a new provider every time. + sepolia: { + provider: () => new HDWalletProvider(MNEMONIC, `https://sepolia.infura.io/v3/${PROJECT_ID}`), + network_id: 11155111, // Goerli's id + confirmations: 2, // # of confirmations to wait between deployments. (default: 0) + timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + skipDryRun: false // Skip dry run before migrations? (default: false for public nets ) + }, + // + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(MNEMONIC, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters, etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.8.19", // Fetch exact version from solc-bin (default: truffle's version) + // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + // settings: { // See the solidity docs for advice about optimization and evmVersion + // optimizer: { + // enabled: false, + // runs: 200 + // }, + // evmVersion: "byzantium" + // } + } + }, + + // Truffle DB is currently disabled by default; to enable it, change enabled: + // false to enabled: true. The default storage location can also be + // overridden by specifying the adapter settings, as shown in the commented code below. + // + // NOTE: It is not possible to migrate your contracts to truffle DB and you should + // make a backup of your artifacts to a safe location before enabling this feature. + // + // After you backed up your artifacts you can utilize db by running migrate as follows: + // $ truffle migrate --reset --compile-all + // + // db: { + // enabled: false, + // host: "127.0.0.1", + // adapter: { + // name: "indexeddb", + // settings: { + // directory: ".db" + // } + // } + // } +};