2251 lines
97 KiB
JSON
2251 lines
97 KiB
JSON
{
|
|
"contractName": "TokenTimelock",
|
|
"abi": [
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "beneficiary",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "releaseTime",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"name": "contractName",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "migrationId",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"name": "isMigrated",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "token",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"name": "contractName",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"name": "migrationId",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"name": "Migrated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"name": "_sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"name": "_token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"name": "_beneficiary",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"name": "_releaseTime",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "initialize",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [],
|
|
"name": "release",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"bytecode": "0x608060405234801561001057600080fd5b506109ba806100206000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806338af3eed1461007d57806386d1a69f146100d4578063b91d4001146100eb578063c0bac1a814610116578063cf756fdf146101dd578063fc0c546a1461026a575b600080fd5b34801561008957600080fd5b506100926102c1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100e057600080fd5b506100e96102e7565b005b3480156100f757600080fd5b50610100610475565b6040518082815260200191505060405180910390f35b34801561012257600080fd5b506101c3600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061047b565b604051808215151515815260200191505060405180910390f35b3480156101e957600080fd5b50610268600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610566565b005b34801561027657600080fd5b5061027f61087d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060035442101515156102fa57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b505050506040513d60208110156103e157600080fd5b8101908080519060200190929190505050905060008111151561040357600080fd5b610472600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108a39092919063ffffffff16565b50565b60035481565b600080836040518082805190602001908083835b6020831015156104b4578051825260208201915060208101905060208303925061048f565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b60208310151561051d57805182526020820191506020810190506020830392506104f8565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b6040805190810160405280600d81526020017f546f6b656e54696d656c6f636b000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e300000000000000000000000000000000000000000000000000000008152506105dc828261047b565b1515156105e857600080fd5b42831115156105f657600080fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826003819055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b838110156106e65780820151818401526020810190506106cb565b50505050905090810190601f1680156107135780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561074c578082015181840152602081019050610731565b50505050905090810190601f1680156107795780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b6020831015156107c2578051825260208201915060208101905060208303925061079d565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b60208310151561082b5780518252602082019150602081019050602083039250610806565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561094657600080fd5b505af115801561095a573d6000803e3d6000fd5b505050506040513d602081101561097057600080fd5b8101908080519060200190929190505050151561098957fe5b5050505600a165627a7a72305820dd52428ee08c8aff1abddcf33c3c9ad3476f69bd323fa6ccf65621cbcd91148c0029",
|
|
"deployedBytecode": "0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806338af3eed1461007d57806386d1a69f146100d4578063b91d4001146100eb578063c0bac1a814610116578063cf756fdf146101dd578063fc0c546a1461026a575b600080fd5b34801561008957600080fd5b506100926102c1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100e057600080fd5b506100e96102e7565b005b3480156100f757600080fd5b50610100610475565b6040518082815260200191505060405180910390f35b34801561012257600080fd5b506101c3600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061047b565b604051808215151515815260200191505060405180910390f35b3480156101e957600080fd5b50610268600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610566565b005b34801561027657600080fd5b5061027f61087d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060035442101515156102fa57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b505050506040513d60208110156103e157600080fd5b8101908080519060200190929190505050905060008111151561040357600080fd5b610472600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108a39092919063ffffffff16565b50565b60035481565b600080836040518082805190602001908083835b6020831015156104b4578051825260208201915060208101905060208303925061048f565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b60208310151561051d57805182526020820191506020810190506020830392506104f8565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b6040805190810160405280600d81526020017f546f6b656e54696d656c6f636b000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e300000000000000000000000000000000000000000000000000000008152506105dc828261047b565b1515156105e857600080fd5b42831115156105f657600080fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826003819055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b838110156106e65780820151818401526020810190506106cb565b50505050905090810190601f1680156107135780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561074c578082015181840152602081019050610731565b50505050905090810190601f1680156107795780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b6020831015156107c2578051825260208201915060208101905060208303925061079d565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b60208310151561082b5780518252602082019150602081019050602083039250610806565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561094657600080fd5b505af115801561095a573d6000803e3d6000fd5b505050506040513d602081101561097057600080fd5b8101908080519060200190929190505050151561098957fe5b5050505600a165627a7a72305820dd52428ee08c8aff1abddcf33c3c9ad3476f69bd323fa6ccf65621cbcd91148c0029",
|
|
"sourceMap": "271:1005:43:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;271:1005:43;;;;;;;",
|
|
"deployedSourceMap": "271:1005:43:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;469:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;469:26:43;;;;;;;;;;;;;;;;;;;;;;;;;;;1024:250;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1024:250:43;;;;;;545:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;545:26:43;;;;;;;;;;;;;;;;;;;;;;;1950:140:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1950:140:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;576:369:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;576:369:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;390:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;390:23:43;;;;;;;;;;;;;;;;;;;;;;;;;;;469:26;;;;;;;;;;;;;:::o;1024:250::-;1160:14;1141:11;;1122:15;:30;;1114:39;;;;;;;;1177:5;;;;;;;;;;;:15;;;1193:4;1177:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1177:21:43;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1177:21:43;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1177:21:43;;;;;;;;;;;;;;;;1160:38;;1221:1;1212:6;:10;1204:19;;;;;;;;1230:39;1249:11;;;;;;;;;;;1262:6;1230:5;;;;;;;;;;;:18;;;;:39;;;;;:::i;:::-;1024:250;:::o;545:26::-;;;;:::o;1950:140:52:-;2031:4;2050:8;2059:12;2050:22;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2050:22:52;;;;;;;;;;;;;;;;;;;;;2073:11;2050:35;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2050:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2043:42;;1950:140;;;;:::o;576:369:43:-;1004:223:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:37;1094:12;1108:11;1083:10;:37::i;:::-;1082:38;1074:47;;;;;;;;840:15:43;825:12;:30;817:39;;;;;;;;870:6;862:5;;:14;;;;;;;;;;;;;;;;;;896:12;882:11;;:26;;;;;;;;;;;;;;;;;;928:12;914:11;:26;;;;1139:35:52;1148:12;1162:11;1139:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1139:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1139:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1218:4;1180:8;1189:12;1180:22;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1180:22:52;;;;;;;;;;;;;;;;;;;;;1203:11;1180:35;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1180:35:52;;;;;;;;;;;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;576:369:43;;;;;;:::o;390:23::-;;;;;;;;;;;;;:::o;368:120:40:-;457:5;:14;;;472:2;476:5;457:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;457:25:40;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;457:25:40;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;457:25:40;;;;;;;;;;;;;;;;450:33;;;;;;368:120;;;:::o",
|
|
"source": "pragma solidity ^0.4.21;\n\nimport \"./SafeERC20.sol\";\nimport \"zos-lib/contracts/migrations/Migratable.sol\";\n\n\n/**\n * @title TokenTimelock\n * @dev TokenTimelock is a token holder contract that will allow a\n * beneficiary to extract the tokens after a given release time\n */\ncontract TokenTimelock is Migratable {\n using SafeERC20 for ERC20Basic;\n\n // ERC20 basic token contract being held\n ERC20Basic public token;\n\n // beneficiary of tokens after they are released\n address public beneficiary;\n\n // timestamp when token release is enabled\n uint256 public releaseTime;\n\n function initialize(\n address _sender,\n ERC20Basic _token,\n address _beneficiary,\n uint256 _releaseTime\n )\n isInitializer(\"TokenTimelock\", \"1.9.0\")\n public\n {\n // solium-disable-next-line security/no-block-members\n require(_releaseTime > block.timestamp);\n token = _token;\n beneficiary = _beneficiary;\n releaseTime = _releaseTime;\n }\n\n /**\n * @notice Transfers tokens held by timelock to beneficiary.\n */\n function release() public {\n // solium-disable-next-line security/no-block-members\n require(block.timestamp >= releaseTime);\n\n uint256 amount = token.balanceOf(this);\n require(amount > 0);\n\n token.safeTransfer(beneficiary, amount);\n }\n}\n",
|
|
"sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/TokenTimelock.sol",
|
|
"ast": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/TokenTimelock.sol",
|
|
"exportedSymbols": {
|
|
"TokenTimelock": [
|
|
3185
|
|
]
|
|
},
|
|
"id": 3186,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 3105,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:43"
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/SafeERC20.sol",
|
|
"file": "./SafeERC20.sol",
|
|
"id": 3106,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3186,
|
|
"sourceUnit": 2808,
|
|
"src": "26:25:43",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "zos-lib/contracts/migrations/Migratable.sol",
|
|
"file": "zos-lib/contracts/migrations/Migratable.sol",
|
|
"id": 3107,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3186,
|
|
"sourceUnit": 4770,
|
|
"src": "52:53:43",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 3108,
|
|
"name": "Migratable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 4769,
|
|
"src": "297:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migratable_$4769",
|
|
"typeString": "contract Migratable"
|
|
}
|
|
},
|
|
"id": 3109,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "297:10:43"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
4769
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": "@title TokenTimelock\n@dev TokenTimelock is a token holder contract that will allow a\nbeneficiary to extract the tokens after a given release time",
|
|
"fullyImplemented": true,
|
|
"id": 3185,
|
|
"linearizedBaseContracts": [
|
|
3185,
|
|
4769
|
|
],
|
|
"name": "TokenTimelock",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 3112,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 3110,
|
|
"name": "SafeERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2807,
|
|
"src": "318:9:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$2807",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "312:31:43",
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3111,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2511,
|
|
"src": "332:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3114,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3185,
|
|
"src": "390:23:43",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3113,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2511,
|
|
"src": "390:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3116,
|
|
"name": "beneficiary",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3185,
|
|
"src": "469:26:43",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3115,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "469:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3118,
|
|
"name": "releaseTime",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3185,
|
|
"src": "545:26:43",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3117,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "545:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3152,
|
|
"nodeType": "Block",
|
|
"src": "753:192:43",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3137,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3134,
|
|
"name": "_releaseTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3126,
|
|
"src": "825:12:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3135,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4774,
|
|
"src": "840:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3136,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "840:15:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "825:30:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3133,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "817:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3138,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "817:39:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3139,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "817:39:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3142,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3140,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3114,
|
|
"src": "862:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3141,
|
|
"name": "_token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3122,
|
|
"src": "870:6:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"src": "862:14:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3143,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "862:14:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3144,
|
|
"name": "beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3116,
|
|
"src": "882:11:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3145,
|
|
"name": "_beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3124,
|
|
"src": "896:12:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "882:26:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 3147,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "882:26:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3150,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3148,
|
|
"name": "releaseTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3118,
|
|
"src": "914:11:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3149,
|
|
"name": "_releaseTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3126,
|
|
"src": "928:12:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "914:26:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3151,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "914:26:43"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 3153,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "546f6b656e54696d656c6f636b",
|
|
"id": 3129,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "714:15:43",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_0b962d7185fbf448bbcc074b7065cb1e18685a80b203d05fa4e86b9cd9d6a666",
|
|
"typeString": "literal_string \"TokenTimelock\""
|
|
},
|
|
"value": "TokenTimelock"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "312e392e30",
|
|
"id": 3130,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "731:7:43",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_48b337767c221abef259fe87e655d8fa1026fb5e60ec68ad68fa7e00bb7f050c",
|
|
"typeString": "literal_string \"1.9.0\""
|
|
},
|
|
"value": "1.9.0"
|
|
}
|
|
],
|
|
"id": 3131,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 3128,
|
|
"name": "isInitializer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4716,
|
|
"src": "700:13:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_string_memory_ptr_$",
|
|
"typeString": "modifier (string memory,string memory)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "700:39:43"
|
|
}
|
|
],
|
|
"name": "initialize",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3127,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3120,
|
|
"name": "_sender",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3153,
|
|
"src": "601:15:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3119,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "601:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3122,
|
|
"name": "_token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3153,
|
|
"src": "622:17:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3121,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2511,
|
|
"src": "622:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3124,
|
|
"name": "_beneficiary",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3153,
|
|
"src": "645:20:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3123,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "645:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3126,
|
|
"name": "_releaseTime",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3153,
|
|
"src": "671:20:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3125,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "671:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "595:100:43"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3132,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "753:0:43"
|
|
},
|
|
"scope": 3185,
|
|
"src": "576:369:43",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3183,
|
|
"nodeType": "Block",
|
|
"src": "1050:224:43",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3160,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3157,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4774,
|
|
"src": "1122:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1122:15:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3159,
|
|
"name": "releaseTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3118,
|
|
"src": "1141:11:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1122:30:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3156,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "1114:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3161,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1114:39:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3162,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1114:39:43"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3164
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3164,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3184,
|
|
"src": "1160:14:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3163,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1160:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3169,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3167,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4903,
|
|
"src": "1193:4:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_TokenTimelock_$3185",
|
|
"typeString": "contract TokenTimelock"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_TokenTimelock_$3185",
|
|
"typeString": "contract TokenTimelock"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3165,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3114,
|
|
"src": "1177:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3166,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balanceOf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2493,
|
|
"src": "1177:15:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3168,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1177:21:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1160:38:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3173,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3171,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3164,
|
|
"src": "1212:6:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 3172,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1221:1:43",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1212:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3170,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "1204:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3174,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1204:19:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3175,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1204:19:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3179,
|
|
"name": "beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3116,
|
|
"src": "1249:11:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3180,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3164,
|
|
"src": "1262:6:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3176,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3114,
|
|
"src": "1230:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3178,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2767,
|
|
"src": "1230:18:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Basic_$2511_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20Basic_$2511_$",
|
|
"typeString": "function (contract ERC20Basic,address,uint256)"
|
|
}
|
|
},
|
|
"id": 3181,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1230:39:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3182,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1230:39:43"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@notice Transfers tokens held by timelock to beneficiary.",
|
|
"id": 3184,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "release",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3154,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1040:2:43"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3155,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1050:0:43"
|
|
},
|
|
"scope": 3185,
|
|
"src": "1024:250:43",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 3186,
|
|
"src": "271:1005:43"
|
|
}
|
|
],
|
|
"src": "0:1277:43"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/TokenTimelock.sol",
|
|
"exportedSymbols": {
|
|
"TokenTimelock": [
|
|
3185
|
|
]
|
|
},
|
|
"id": 3186,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 3105,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:43"
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/SafeERC20.sol",
|
|
"file": "./SafeERC20.sol",
|
|
"id": 3106,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3186,
|
|
"sourceUnit": 2808,
|
|
"src": "26:25:43",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "zos-lib/contracts/migrations/Migratable.sol",
|
|
"file": "zos-lib/contracts/migrations/Migratable.sol",
|
|
"id": 3107,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3186,
|
|
"sourceUnit": 4770,
|
|
"src": "52:53:43",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 3108,
|
|
"name": "Migratable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 4769,
|
|
"src": "297:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migratable_$4769",
|
|
"typeString": "contract Migratable"
|
|
}
|
|
},
|
|
"id": 3109,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "297:10:43"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
4769
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": "@title TokenTimelock\n@dev TokenTimelock is a token holder contract that will allow a\nbeneficiary to extract the tokens after a given release time",
|
|
"fullyImplemented": true,
|
|
"id": 3185,
|
|
"linearizedBaseContracts": [
|
|
3185,
|
|
4769
|
|
],
|
|
"name": "TokenTimelock",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 3112,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 3110,
|
|
"name": "SafeERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2807,
|
|
"src": "318:9:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$2807",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "312:31:43",
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3111,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2511,
|
|
"src": "332:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3114,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3185,
|
|
"src": "390:23:43",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3113,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2511,
|
|
"src": "390:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3116,
|
|
"name": "beneficiary",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3185,
|
|
"src": "469:26:43",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3115,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "469:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3118,
|
|
"name": "releaseTime",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3185,
|
|
"src": "545:26:43",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3117,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "545:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3152,
|
|
"nodeType": "Block",
|
|
"src": "753:192:43",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3137,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3134,
|
|
"name": "_releaseTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3126,
|
|
"src": "825:12:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3135,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4774,
|
|
"src": "840:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3136,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "840:15:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "825:30:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3133,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "817:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3138,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "817:39:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3139,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "817:39:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3142,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3140,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3114,
|
|
"src": "862:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3141,
|
|
"name": "_token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3122,
|
|
"src": "870:6:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"src": "862:14:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3143,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "862:14:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3144,
|
|
"name": "beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3116,
|
|
"src": "882:11:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3145,
|
|
"name": "_beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3124,
|
|
"src": "896:12:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "882:26:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 3147,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "882:26:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3150,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3148,
|
|
"name": "releaseTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3118,
|
|
"src": "914:11:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3149,
|
|
"name": "_releaseTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3126,
|
|
"src": "928:12:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "914:26:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3151,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "914:26:43"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 3153,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "546f6b656e54696d656c6f636b",
|
|
"id": 3129,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "714:15:43",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_0b962d7185fbf448bbcc074b7065cb1e18685a80b203d05fa4e86b9cd9d6a666",
|
|
"typeString": "literal_string \"TokenTimelock\""
|
|
},
|
|
"value": "TokenTimelock"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "312e392e30",
|
|
"id": 3130,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "731:7:43",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_48b337767c221abef259fe87e655d8fa1026fb5e60ec68ad68fa7e00bb7f050c",
|
|
"typeString": "literal_string \"1.9.0\""
|
|
},
|
|
"value": "1.9.0"
|
|
}
|
|
],
|
|
"id": 3131,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 3128,
|
|
"name": "isInitializer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4716,
|
|
"src": "700:13:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_string_memory_ptr_$",
|
|
"typeString": "modifier (string memory,string memory)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "700:39:43"
|
|
}
|
|
],
|
|
"name": "initialize",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3127,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3120,
|
|
"name": "_sender",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3153,
|
|
"src": "601:15:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3119,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "601:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3122,
|
|
"name": "_token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3153,
|
|
"src": "622:17:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3121,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2511,
|
|
"src": "622:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3124,
|
|
"name": "_beneficiary",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3153,
|
|
"src": "645:20:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3123,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "645:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3126,
|
|
"name": "_releaseTime",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3153,
|
|
"src": "671:20:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3125,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "671:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "595:100:43"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3132,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "753:0:43"
|
|
},
|
|
"scope": 3185,
|
|
"src": "576:369:43",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3183,
|
|
"nodeType": "Block",
|
|
"src": "1050:224:43",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3160,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3157,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4774,
|
|
"src": "1122:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1122:15:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3159,
|
|
"name": "releaseTime",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3118,
|
|
"src": "1141:11:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1122:30:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3156,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "1114:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3161,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1114:39:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3162,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1114:39:43"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3164
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3164,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3184,
|
|
"src": "1160:14:43",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3163,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1160:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3169,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3167,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4903,
|
|
"src": "1193:4:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_TokenTimelock_$3185",
|
|
"typeString": "contract TokenTimelock"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_TokenTimelock_$3185",
|
|
"typeString": "contract TokenTimelock"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3165,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3114,
|
|
"src": "1177:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3166,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balanceOf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2493,
|
|
"src": "1177:15:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3168,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1177:21:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1160:38:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3173,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3171,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3164,
|
|
"src": "1212:6:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 3172,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1221:1:43",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1212:10:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3170,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "1204:7:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3174,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1204:19:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3175,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1204:19:43"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3179,
|
|
"name": "beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3116,
|
|
"src": "1249:11:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3180,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3164,
|
|
"src": "1262:6:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3176,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3114,
|
|
"src": "1230:5:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3178,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2767,
|
|
"src": "1230:18:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Basic_$2511_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20Basic_$2511_$",
|
|
"typeString": "function (contract ERC20Basic,address,uint256)"
|
|
}
|
|
},
|
|
"id": 3181,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1230:39:43",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3182,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1230:39:43"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@notice Transfers tokens held by timelock to beneficiary.",
|
|
"id": 3184,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "release",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3154,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1040:2:43"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3155,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1050:0:43"
|
|
},
|
|
"scope": 3185,
|
|
"src": "1024:250:43",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 3186,
|
|
"src": "271:1005:43"
|
|
}
|
|
],
|
|
"src": "0:1277:43"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "2.0.1",
|
|
"updatedAt": "2018-08-23T14:35:50.642Z"
|
|
} |