2196 lines
135 KiB
JSON
2196 lines
135 KiB
JSON
{
|
|
"contractName": "Lock",
|
|
"abi": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_unlockTime",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "payable",
|
|
"type": "constructor"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "when",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Withdrawal",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_newUnlockTime",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "extendLock",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getBalance",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "owner",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address payable",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "recoverFunds",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "unlockTime",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "withdraw",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"stateMutability": "payable",
|
|
"type": "receive"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_unlockTime\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"when\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newUnlockTime\",\"type\":\"uint256\"}],\"name\":\"extendLock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"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\":{\"/home/arhan/algocitrae/contracts/Lock.sol\":\"Lock\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/arhan/algocitrae/contracts/Lock.sol\":{\"keccak256\":\"0x1d958625f665ce5b64210385a180219b6733c1b9491548c64bdb36dd073607f8\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://5a8e68e1ab656dd7ebaede1807f289196577fbc1af06c85febc33b1795fd997e\",\"dweb:/ipfs/QmZbRbHNex33g6rDvvpoay32YTNhT9Zp2mR6vYWZ61NWap\"]},\"/home/arhan/algocitrae/contracts/SafeMath.sol\":{\"keccak256\":\"0xbc02d523f38c5164be7f802e6d24bcb6683ebf968b47fac42ddaff6b009540e9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8fef988f8e43414527362aaf483fb64b6ad9c2baa6bd81861468674dcd8c7ac9\",\"dweb:/ipfs/QmZenx5rATw9FSb7ySGLBD4MEcuYBRzQQwhCczRRpD3xqY\"]}},\"version\":1}",
|
|
"bytecode": "60806040526040516104703803806104708339810160408190526020916096565b428111607e5760405162461bcd60e51b815260206004820152602360248201527f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460448201526275726560e81b606482015260840160405180910390fd5b5f55600180546001600160a01b0319163317905560ac565b5f6020828403121560a5575f80fd5b5051919050565b6103b7806100b95f395ff3fe608060405260043610610057575f3560e01c806312065fe014610062578063251c1aa3146100835780633ccfd60b1461009757806344ee3a1c146100ad5780638da5cb5b146100cc578063b79550be14610103575f80fd5b3661005e57005b5f80fd5b34801561006d575f80fd5b50475b6040519081526020015b60405180910390f35b34801561008e575f80fd5b506100705f5481565b3480156100a2575f80fd5b506100ab610117565b005b3480156100b8575f80fd5b506100ab6100c736600461033c565b610205565b3480156100d7575f80fd5b506001546100eb906001600160a01b031681565b6040516001600160a01b03909116815260200161007a565b34801561010e575f80fd5b506100ab610291565b5f544210156101665760405162461bcd60e51b8152602060048201526016602482015275165bdd4818d85b89dd081dda5d1a191c985dc81e595d60521b60448201526064015b60405180910390fd5b6001546001600160a01b031633146101905760405162461bcd60e51b815260040161015d90610353565b6040805147808252426020830152917fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b93910160405180910390a16001546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050158015610201573d5f803e3d5ffd5b5050565b6001546001600160a01b0316331461022f5760405162461bcd60e51b815260040161015d90610353565b5f54811161028d5760405162461bcd60e51b815260206004820152602560248201527f4e657720756e6c6f636b2074696d65206d75737420626520696e207468652066604482015264757475726560d81b606482015260840161015d565b5f55565b6001546001600160a01b031633146102bb5760405162461bcd60e51b815260040161015d90610353565b5f544210156103055760405162461bcd60e51b8152602060048201526016602482015275119d5b991cc8185c99481cdd1a5b1b081b1bd8dad95960521b604482015260640161015d565b60015460405147916001600160a01b03169082156108fc029083905f818181858888f19350505050158015610201573d5f803e3d5ffd5b5f6020828403121561034c575f80fd5b5035919050565b6020808252601490820152732cb7ba9030b932b713ba103a34329037bbb732b960611b60408201526060019056fea2646970667358221220f8bd3b18f9322356eeda7a7c5322568c679f3df93f81603063e1347eebb9859964736f6c634300081a0033",
|
|
"deployedBytecode": "608060405260043610610057575f3560e01c806312065fe014610062578063251c1aa3146100835780633ccfd60b1461009757806344ee3a1c146100ad5780638da5cb5b146100cc578063b79550be14610103575f80fd5b3661005e57005b5f80fd5b34801561006d575f80fd5b50475b6040519081526020015b60405180910390f35b34801561008e575f80fd5b506100705f5481565b3480156100a2575f80fd5b506100ab610117565b005b3480156100b8575f80fd5b506100ab6100c736600461033c565b610205565b3480156100d7575f80fd5b506001546100eb906001600160a01b031681565b6040516001600160a01b03909116815260200161007a565b34801561010e575f80fd5b506100ab610291565b5f544210156101665760405162461bcd60e51b8152602060048201526016602482015275165bdd4818d85b89dd081dda5d1a191c985dc81e595d60521b60448201526064015b60405180910390fd5b6001546001600160a01b031633146101905760405162461bcd60e51b815260040161015d90610353565b6040805147808252426020830152917fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b93910160405180910390a16001546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050158015610201573d5f803e3d5ffd5b5050565b6001546001600160a01b0316331461022f5760405162461bcd60e51b815260040161015d90610353565b5f54811161028d5760405162461bcd60e51b815260206004820152602560248201527f4e657720756e6c6f636b2074696d65206d75737420626520696e207468652066604482015264757475726560d81b606482015260840161015d565b5f55565b6001546001600160a01b031633146102bb5760405162461bcd60e51b815260040161015d90610353565b5f544210156103055760405162461bcd60e51b8152602060048201526016602482015275119d5b991cc8185c99481cdd1a5b1b081b1bd8dad95960521b604482015260640161015d565b60015460405147916001600160a01b03169082156108fc029083905f818181858888f19350505050158015610201573d5f803e3d5ffd5b5f6020828403121561034c575f80fd5b5035919050565b6020808252601490820152732cb7ba9030b932b713ba103a34329037bbb732b960611b60408201526060019056fea2646970667358221220f8bd3b18f9322356eeda7a7c5322568c679f3df93f81603063e1347eebb9859964736f6c634300081a0033",
|
|
"sourceMap": "92:1669:0:-:0;;;264:241;;;;;;;;;;;;;;;;;;:::i;:::-;350:15;336:11;:29;315:111;;;;-1:-1:-1;;;315:111:0;;405:2:2;315:111:0;;;387:21:2;444:2;424:18;;;417:30;483:34;463:18;;;456:62;-1:-1:-1;;;534:18:2;;;527:33;577:19;;315:111:0;;;;;;;;437:10;:24;471:5;:27;;-1:-1:-1;;;;;;471:27:0;487:10;471:27;;;92:1669;;14:184:2;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;-1:-1:-1;176:16:2;;14:184;-1:-1:-1;14:184:2:o;203:399::-;92:1669:0;;;;;;",
|
|
"deployedSourceMap": "92:1669:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1662:97;;;;;;;;;;-1:-1:-1;1731:21:0;1662:97;;;160:25:2;;;148:2;133:18;1662:97:0;;;;;;;;145:25;;;;;;;;;;;;;;;;511:356;;;;;;;;;;;;;:::i;:::-;;940:245;;;;;;;;;;-1:-1:-1;940:245:0;;;;;:::i;:::-;;:::i;176:28::-;;;;;;;;;;-1:-1:-1;176:28:0;;;;-1:-1:-1;;;;;176:28:0;;;;;;-1:-1:-1;;;;;561:32:2;;;543:51;;531:2;516:18;176:28:0;381:219:2;1258:257:0;;;;;;;;;;;;;:::i;511:356::-;575:10;;556:15;:29;;548:64;;;;-1:-1:-1;;;548:64:0;;807:2:2;548:64:0;;;789:21:2;846:2;826:18;;;819:30;-1:-1:-1;;;865:18:2;;;858:52;927:18;;548:64:0;;;;;;;;;644:5;;-1:-1:-1;;;;;644:5:0;630:10;:19;622:52;;;;-1:-1:-1;;;622:52:0;;;;;;;:::i;:::-;739:36;;;703:21;1479:25:2;;;759:15:0;1535:2:2;1520:18;;1513:34;703:21:0;739:36;;1452:18:2;739:36:0;;;;;;;837:5;;:23;;-1:-1:-1;;;;;837:5:0;;;;:23;;;;;852:7;;837:5;:23;:5;:23;852:7;837:5;:23;;;;;;;;;;;;;;;;;;;;;538:329;511:356::o;940:245::-;1023:5;;-1:-1:-1;;;;;1023:5:0;1009:10;:19;1001:52;;;;-1:-1:-1;;;1001:52:0;;;;;;;:::i;:::-;1088:10;;1071:14;:27;1063:77;;;;-1:-1:-1;;;1063:77:0;;1760:2:2;1063:77:0;;;1742:21:2;1799:2;1779:18;;;1772:30;1838:34;1818:18;;;1811:62;-1:-1:-1;;;1889:18:2;;;1882:35;1934:19;;1063:77:0;1558:401:2;1063:77:0;1151:10;:27;940:245::o;1258:257::-;1321:5;;-1:-1:-1;;;;;1321:5:0;1307:10;:19;1299:52;;;;-1:-1:-1;;;1299:52:0;;;;;;;:::i;:::-;1388:10;;1369:15;:29;;1361:64;;;;-1:-1:-1;;;1361:64:0;;2166:2:2;1361:64:0;;;2148:21:2;2205:2;2185:18;;;2178:30;-1:-1:-1;;;2224:18:2;;;2217:52;2286:18;;1361:64:0;1964:346:2;1361:64:0;1485:5;;:23;;1454:21;;-1:-1:-1;;;;;1485:5:0;;:23;;;;;1454:21;;1436:15;1485:23;1436:15;1485:23;1454:21;1485:5;:23;;;;;;;;;;;;;;;;;;;196:180:2;255:6;308:2;296:9;287:7;283:23;279:32;276:52;;;324:1;321;314:12;276:52;-1:-1:-1;347:23:2;;196:180;-1:-1:-1;196:180:2:o;956:344::-;1158:2;1140:21;;;1197:2;1177:18;;;1170:30;-1:-1:-1;;;1231:2:2;1216:18;;1209:50;1291:2;1276:18;;956:344::o",
|
|
"sourcePath": "/home/arhan/algocitrae/contracts/Lock.sol",
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.8.26+commit.8a97fa7a"
|
|
},
|
|
"ast": {
|
|
"absolutePath": "/home/arhan/algocitrae/contracts/Lock.sol",
|
|
"exportedSymbols": {
|
|
"Lock": [
|
|
157
|
|
],
|
|
"SafeMath": [
|
|
469
|
|
]
|
|
},
|
|
"id": 158,
|
|
"license": "UNLICENSED",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "39:23:0"
|
|
},
|
|
{
|
|
"absolutePath": "/home/arhan/algocitrae/contracts/SafeMath.sol",
|
|
"file": "./SafeMath.sol",
|
|
"id": 2,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 158,
|
|
"sourceUnit": 470,
|
|
"src": "64:24:0",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "Lock",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"fullyImplemented": true,
|
|
"id": 157,
|
|
"linearizedBaseContracts": [
|
|
157
|
|
],
|
|
"name": "Lock",
|
|
"nameLocation": "101:4:0",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"global": false,
|
|
"id": 5,
|
|
"libraryName": {
|
|
"id": 3,
|
|
"name": "SafeMath",
|
|
"nameLocations": [
|
|
"118:8:0"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 469,
|
|
"src": "118:8:0"
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "112:27:0",
|
|
"typeName": {
|
|
"id": 4,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "131:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "251c1aa3",
|
|
"id": 7,
|
|
"mutability": "mutable",
|
|
"name": "unlockTime",
|
|
"nameLocation": "160:10:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 157,
|
|
"src": "145:25:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 6,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "145:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "8da5cb5b",
|
|
"id": 9,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "199:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 157,
|
|
"src": "176:28:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 8,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "176:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"eventSelector": "bf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b93",
|
|
"id": 15,
|
|
"name": "Withdrawal",
|
|
"nameLocation": "217:10:0",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 14,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 11,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "236:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 15,
|
|
"src": "228:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "228:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "when",
|
|
"nameLocation": "252:4:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 15,
|
|
"src": "244:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 12,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "244:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "227:30:0"
|
|
},
|
|
"src": "211:47:0"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 40,
|
|
"nodeType": "Block",
|
|
"src": "305:200:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 24,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 21,
|
|
"name": "_unlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 17,
|
|
"src": "336:11:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 22,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "350:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 23,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "356:9:0",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "350:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "336:29:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "556e6c6f636b2074696d652073686f756c6420626520696e2074686520667574757265",
|
|
"id": 25,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "379:37:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413",
|
|
"typeString": "literal_string \"Unlock time should be in the future\""
|
|
},
|
|
"value": "Unlock time should be in the future"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413",
|
|
"typeString": "literal_string \"Unlock time should be in the future\""
|
|
}
|
|
],
|
|
"id": 20,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "315:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 26,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "315:111:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 27,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "315:111:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 30,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28,
|
|
"name": "unlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "437:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 29,
|
|
"name": "_unlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 17,
|
|
"src": "450:11:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "437:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 31,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "437:24:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 38,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 32,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9,
|
|
"src": "471:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 35,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "487:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 36,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "491:6:0",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "487:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 34,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "479:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_payable_$",
|
|
"typeString": "type(address payable)"
|
|
},
|
|
"typeName": {
|
|
"id": 33,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "479:8:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 37,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "479:19:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "471:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 39,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "471:27:0"
|
|
}
|
|
]
|
|
},
|
|
"id": 41,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 18,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 17,
|
|
"mutability": "mutable",
|
|
"name": "_unlockTime",
|
|
"nameLocation": "284:11:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 41,
|
|
"src": "276:19:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 16,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "276:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "275:21:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 19,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "305:0:0"
|
|
},
|
|
"scope": 157,
|
|
"src": "264:241:0",
|
|
"stateMutability": "payable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 80,
|
|
"nodeType": "Block",
|
|
"src": "538:329:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 48,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 45,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "556:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 46,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "562:9:0",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "556:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 47,
|
|
"name": "unlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "575:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "556:29:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "596f752063616e277420776974686472617720796574",
|
|
"id": 49,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "587:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8",
|
|
"typeString": "literal_string \"You can't withdraw yet\""
|
|
},
|
|
"value": "You can't withdraw yet"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8",
|
|
"typeString": "literal_string \"You can't withdraw yet\""
|
|
}
|
|
],
|
|
"id": 44,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "548:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 50,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "548:64:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 51,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "548:64:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 56,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 53,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "630:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 54,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "634:6:0",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "630:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"id": 55,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9,
|
|
"src": "644:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "630:19:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "596f75206172656e277420746865206f776e6572",
|
|
"id": 57,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "651:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a",
|
|
"typeString": "literal_string \"You aren't the owner\""
|
|
},
|
|
"value": "You aren't the owner"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a",
|
|
"typeString": "literal_string \"You aren't the owner\""
|
|
}
|
|
],
|
|
"id": 52,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "622:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 58,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "622:52:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 59,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "622:52:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
61
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 61,
|
|
"mutability": "mutable",
|
|
"name": "balance",
|
|
"nameLocation": "693:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 80,
|
|
"src": "685:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 60,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "685:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 67,
|
|
"initialValue": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 64,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "711:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Lock_$157",
|
|
"typeString": "contract Lock"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Lock_$157",
|
|
"typeString": "contract Lock"
|
|
}
|
|
],
|
|
"id": 63,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "703:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 62,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "703:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 65,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "703:13:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 66,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "717:7:0",
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "703:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "685:39:0"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 69,
|
|
"name": "balance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 61,
|
|
"src": "750:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 70,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "759:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 71,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "765:9:0",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "759:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 68,
|
|
"name": "Withdrawal",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 15,
|
|
"src": "739:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 72,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "739:36:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 73,
|
|
"nodeType": "EmitStatement",
|
|
"src": "734:41:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 77,
|
|
"name": "balance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 61,
|
|
"src": "852:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 74,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9,
|
|
"src": "837:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 76,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "843:8:0",
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"src": "837:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 78,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "837:23:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 79,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "837:23:0"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "3ccfd60b",
|
|
"id": 81,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "withdraw",
|
|
"nameLocation": "520:8:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 42,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "528:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 43,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "538:0:0"
|
|
},
|
|
"scope": 157,
|
|
"src": "511:356:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 105,
|
|
"nodeType": "Block",
|
|
"src": "991:194:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 90,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 87,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "1009:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 88,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1013:6:0",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1009:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"id": 89,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9,
|
|
"src": "1023:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "1009:19:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "596f75206172656e277420746865206f776e6572",
|
|
"id": 91,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1030:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a",
|
|
"typeString": "literal_string \"You aren't the owner\""
|
|
},
|
|
"value": "You aren't the owner"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a",
|
|
"typeString": "literal_string \"You aren't the owner\""
|
|
}
|
|
],
|
|
"id": 86,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1001:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 92,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1001:52:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 93,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1001:52:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 97,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 95,
|
|
"name": "_newUnlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 83,
|
|
"src": "1071:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"id": 96,
|
|
"name": "unlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1088:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1071:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4e657720756e6c6f636b2074696d65206d75737420626520696e2074686520667574757265",
|
|
"id": 98,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1100:39:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_89e55cc556893f1b78ca6c03cf10c4d7118711ad1963724f84ebb37df3159df5",
|
|
"typeString": "literal_string \"New unlock time must be in the future\""
|
|
},
|
|
"value": "New unlock time must be in the future"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_89e55cc556893f1b78ca6c03cf10c4d7118711ad1963724f84ebb37df3159df5",
|
|
"typeString": "literal_string \"New unlock time must be in the future\""
|
|
}
|
|
],
|
|
"id": 94,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1063:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 99,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1063:77:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 100,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1063:77:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 103,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 101,
|
|
"name": "unlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1151:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 102,
|
|
"name": "_newUnlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 83,
|
|
"src": "1164:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1151:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 104,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1151:27:0"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "44ee3a1c",
|
|
"id": 106,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "extendLock",
|
|
"nameLocation": "949:10:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 84,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 83,
|
|
"mutability": "mutable",
|
|
"name": "_newUnlockTime",
|
|
"nameLocation": "968:14:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 106,
|
|
"src": "960:22:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 82,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "960:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "959:24:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 85,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "991:0:0"
|
|
},
|
|
"scope": 157,
|
|
"src": "940:245:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 139,
|
|
"nodeType": "Block",
|
|
"src": "1289:226:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 113,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 110,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "1307:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 111,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1311:6:0",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1307:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"id": 112,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9,
|
|
"src": "1321:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "1307:19:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "596f75206172656e277420746865206f776e6572",
|
|
"id": 114,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1328:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a",
|
|
"typeString": "literal_string \"You aren't the owner\""
|
|
},
|
|
"value": "You aren't the owner"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a",
|
|
"typeString": "literal_string \"You aren't the owner\""
|
|
}
|
|
],
|
|
"id": 109,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1299:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 115,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1299:52:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 116,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1299:52:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 121,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 118,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "1369:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 119,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1375:9:0",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1369:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 120,
|
|
"name": "unlockTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1388:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1369:29:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "46756e647320617265207374696c6c206c6f636b6564",
|
|
"id": 122,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1400:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_5f68e5950a09f0a57cbd0ddd08910c5351d7255c93dc00d33fe526160a61e870",
|
|
"typeString": "literal_string \"Funds are still locked\""
|
|
},
|
|
"value": "Funds are still locked"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_5f68e5950a09f0a57cbd0ddd08910c5351d7255c93dc00d33fe526160a61e870",
|
|
"typeString": "literal_string \"Funds are still locked\""
|
|
}
|
|
],
|
|
"id": 117,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1361:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 123,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1361:64:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 124,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1361:64:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
126
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 126,
|
|
"mutability": "mutable",
|
|
"name": "balance",
|
|
"nameLocation": "1444:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 139,
|
|
"src": "1436:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 125,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1436:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 132,
|
|
"initialValue": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 129,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "1462:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Lock_$157",
|
|
"typeString": "contract Lock"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Lock_$157",
|
|
"typeString": "contract Lock"
|
|
}
|
|
],
|
|
"id": 128,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1454:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 127,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1454:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 130,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1454:13:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 131,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1468:7:0",
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1454:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1436:39:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 136,
|
|
"name": "balance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 126,
|
|
"src": "1500:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 133,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9,
|
|
"src": "1485:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 135,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1491:8:0",
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1485:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 137,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1485:23:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 138,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1485:23:0"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "b79550be",
|
|
"id": 140,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "recoverFunds",
|
|
"nameLocation": "1267:12:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 107,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1279:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 108,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1289:0:0"
|
|
},
|
|
"scope": 157,
|
|
"src": "1258:257:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 143,
|
|
"nodeType": "Block",
|
|
"src": "1602:2:0",
|
|
"statements": []
|
|
},
|
|
"id": 144,
|
|
"implemented": true,
|
|
"kind": "receive",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 141,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1582:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 142,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1602:0:0"
|
|
},
|
|
"scope": 157,
|
|
"src": "1575:29:0",
|
|
"stateMutability": "payable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 155,
|
|
"nodeType": "Block",
|
|
"src": "1714:45:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 151,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "1739:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Lock_$157",
|
|
"typeString": "contract Lock"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Lock_$157",
|
|
"typeString": "contract Lock"
|
|
}
|
|
],
|
|
"id": 150,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1731:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 149,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1731:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 152,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1731:13:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 153,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1745:7:0",
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1731:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 148,
|
|
"id": 154,
|
|
"nodeType": "Return",
|
|
"src": "1724:28:0"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "12065fe0",
|
|
"id": 156,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getBalance",
|
|
"nameLocation": "1671:10:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 145,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1681:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 148,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 147,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 156,
|
|
"src": "1705:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 146,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1705:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1704:9:0"
|
|
},
|
|
"scope": 157,
|
|
"src": "1662:97:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 158,
|
|
"src": "92:1669:0",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"src": "39:1723:0"
|
|
},
|
|
"functionHashes": {
|
|
"extendLock(uint256)": "44ee3a1c",
|
|
"getBalance()": "12065fe0",
|
|
"owner()": "8da5cb5b",
|
|
"recoverFunds()": "b79550be",
|
|
"unlockTime()": "251c1aa3",
|
|
"withdraw()": "3ccfd60b"
|
|
},
|
|
"gasEstimates": {
|
|
"creation": {
|
|
"codeDepositCost": "190200",
|
|
"executionCost": "infinite",
|
|
"totalCost": "infinite"
|
|
},
|
|
"external": {
|
|
"extendLock(uint256)": "26627",
|
|
"getBalance()": "149",
|
|
"owner()": "2402",
|
|
"recoverFunds()": "infinite",
|
|
"unlockTime()": "2282",
|
|
"withdraw()": "infinite"
|
|
}
|
|
}
|
|
} |