Files
openzeppelin-contracts/build/contracts/TokenVesting.json
2018-08-23 11:45:35 -03:00

7541 lines
329 KiB
JSON

{
"contractName": "TokenVesting",
"abi": [
{
"constant": true,
"inputs": [],
"name": "duration",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "cliff",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "beneficiary",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "revocable",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "released",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "start",
"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": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "revoked",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "amount",
"type": "uint256"
}
],
"name": "Released",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "Revoked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"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": "_beneficiary",
"type": "address"
},
{
"name": "_start",
"type": "uint256"
},
{
"name": "_cliff",
"type": "uint256"
},
{
"name": "_duration",
"type": "uint256"
},
{
"name": "_revocable",
"type": "bool"
}
],
"name": "initialize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_sender",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "release",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "revoke",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "releasableAmount",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "vestedAmount",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506116e9806100206000396000f3006080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630fb5a6b4146100eb57806313d033c0146101165780631726cbc8146101415780631916558714610198578063384711cc146101db57806338af3eed1461023257806374a8f10314610289578063872a7810146102cc5780638da5cb5b146102fb578063914a4ed7146103525780639852595c146103df578063be9a655514610436578063c0bac1a814610461578063c4d66de814610528578063f2fde38b1461056b578063fa01dc06146105ae575b600080fd5b3480156100f757600080fd5b50610100610609565b6040518082815260200191505060405180910390f35b34801561012257600080fd5b5061012b61060f565b6040518082815260200191505060405180910390f35b34801561014d57600080fd5b50610182600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610615565b6040518082815260200191505060405180910390f35b3480156101a457600080fd5b506101d9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610678565b005b3480156101e757600080fd5b5061021c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b1565b6040518082815260200191505060405180910390f35b34801561023e57600080fd5b506102476109b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029557600080fd5b506102ca600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109db565b005b3480156102d857600080fd5b506102e1610c7f565b604051808215151515815260200191505060405180910390f35b34801561030757600080fd5b50610310610c92565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035e57600080fd5b506103dd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803515159060200190929190505050610cb8565b005b3480156103eb57600080fd5b50610420600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611010565b6040518082815260200191505060405180910390f35b34801561044257600080fd5b5061044b611028565b6040518082815260200191505060405180910390f35b34801561046d57600080fd5b5061050e600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061102e565b604051808215151515815260200191505060405180910390f35b34801561053457600080fd5b50610569600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611119565b005b34801561057757600080fd5b506105ac600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113d7565b005b3480156105ba57600080fd5b506105ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061152f565b604051808215151515815260200191505060405180910390f35b60055481565b60035481565b6000610671600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610663846107b1565b61154f90919063ffffffff16565b9050919050565b600061068382610615565b905060008111151561069457600080fd5b6106e681600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461156890919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610776600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828473ffffffffffffffffffffffffffffffffffffffff166115849092919063ffffffff16565b7ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c565816040518082815260200191505060405180910390a15050565b60008060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b505050506040513d602081101561087b57600080fd5b810190808051906020019092919050505091506108e0600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361156890919063ffffffff16565b90506003544210156108f557600092506109ae565b61090c60055460045461156890919063ffffffff16565b421015806109635750600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610970578092506109ae565b6109ab60055461099d61098e6004544261154f90919063ffffffff16565b8461166f90919063ffffffff16565b6116a790919063ffffffff16565b92505b5050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a3c57600080fd5b600660009054906101000a900460ff161515610a5757600080fd5b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610ab057600080fd5b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610b4b57600080fd5b505af1158015610b5f573d6000803e3d6000fd5b505050506040513d6020811015610b7557600080fd5b81019080805190602001909291905050509250610b9184610615565b9150610ba6828461154f90919063ffffffff16565b90506001600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610c4d600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828673ffffffffffffffffffffffffffffffffffffffff166115849092919063ffffffff16565b7f44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee660405160405180910390a150505050565b600660009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600c81526020017f546f6b656e56657374696e6700000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250610d2e828261102e565b151515610d3a57600080fd5b610d4388611119565b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614151515610d7f57600080fd5b838511151515610d8e57600080fd5b86600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600660006101000a81548160ff02191690831515021790555083600581905550610e03858761156890919063ffffffff16565b600381905550856004819055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610e77578082015181840152602081019050610e5c565b50505050905090810190601f168015610ea45780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610edd578082015181840152602081019050610ec2565b50505050905090810190601f168015610f0a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b602083101515610f535780518252602082019150602081019050602083039250610f2e565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515610fbc5780518252602082019150602081019050602083039250610f97565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff0219169083151502179055505050505050505050565b60076020528060005260406000206000915090505481565b60045481565b600080836040518082805190602001908083835b6020831015156110675780518252602082019150602081019050602083039250611042565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156110d057805182526020820191506020810190506020830392506110ab565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b6040805190810160405280600781526020017f4f776e61626c65000000000000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e3000000000000000000000000000000000000000000000000000000081525061118f828261102e565b15151561119b57600080fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611243578082015181840152602081019050611228565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156112a957808201518184015260208101905061128e565b50505050905090810190601f1680156112d65780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b60208310151561131f57805182526020820191506020810190506020830392506112fa565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156113885780518252602082019150602081019050602083039250611363565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561146f57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60086020528060005260406000206000915054906101000a900460ff1681565b600082821115151561155d57fe5b818303905092915050565b6000818301905082811015151561157b57fe5b80905092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b505050506040513d602081101561165157600080fd5b8101908080519060200190929190505050151561166a57fe5b505050565b60008083141561168257600090506116a1565b818302905081838281151561169357fe5b0414151561169d57fe5b8090505b92915050565b600081838115156116b457fe5b049050929150505600a165627a7a72305820f5e0e3b159468a3907d03bc1e253ea328fa6072f4cbab92ef3fccd8b740ae3900029",
"deployedBytecode": "0x6080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630fb5a6b4146100eb57806313d033c0146101165780631726cbc8146101415780631916558714610198578063384711cc146101db57806338af3eed1461023257806374a8f10314610289578063872a7810146102cc5780638da5cb5b146102fb578063914a4ed7146103525780639852595c146103df578063be9a655514610436578063c0bac1a814610461578063c4d66de814610528578063f2fde38b1461056b578063fa01dc06146105ae575b600080fd5b3480156100f757600080fd5b50610100610609565b6040518082815260200191505060405180910390f35b34801561012257600080fd5b5061012b61060f565b6040518082815260200191505060405180910390f35b34801561014d57600080fd5b50610182600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610615565b6040518082815260200191505060405180910390f35b3480156101a457600080fd5b506101d9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610678565b005b3480156101e757600080fd5b5061021c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b1565b6040518082815260200191505060405180910390f35b34801561023e57600080fd5b506102476109b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029557600080fd5b506102ca600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109db565b005b3480156102d857600080fd5b506102e1610c7f565b604051808215151515815260200191505060405180910390f35b34801561030757600080fd5b50610310610c92565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035e57600080fd5b506103dd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803515159060200190929190505050610cb8565b005b3480156103eb57600080fd5b50610420600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611010565b6040518082815260200191505060405180910390f35b34801561044257600080fd5b5061044b611028565b6040518082815260200191505060405180910390f35b34801561046d57600080fd5b5061050e600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061102e565b604051808215151515815260200191505060405180910390f35b34801561053457600080fd5b50610569600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611119565b005b34801561057757600080fd5b506105ac600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113d7565b005b3480156105ba57600080fd5b506105ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061152f565b604051808215151515815260200191505060405180910390f35b60055481565b60035481565b6000610671600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610663846107b1565b61154f90919063ffffffff16565b9050919050565b600061068382610615565b905060008111151561069457600080fd5b6106e681600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461156890919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610776600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828473ffffffffffffffffffffffffffffffffffffffff166115849092919063ffffffff16565b7ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c565816040518082815260200191505060405180910390a15050565b60008060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b505050506040513d602081101561087b57600080fd5b810190808051906020019092919050505091506108e0600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361156890919063ffffffff16565b90506003544210156108f557600092506109ae565b61090c60055460045461156890919063ffffffff16565b421015806109635750600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610970578092506109ae565b6109ab60055461099d61098e6004544261154f90919063ffffffff16565b8461166f90919063ffffffff16565b6116a790919063ffffffff16565b92505b5050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a3c57600080fd5b600660009054906101000a900460ff161515610a5757600080fd5b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610ab057600080fd5b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610b4b57600080fd5b505af1158015610b5f573d6000803e3d6000fd5b505050506040513d6020811015610b7557600080fd5b81019080805190602001909291905050509250610b9184610615565b9150610ba6828461154f90919063ffffffff16565b90506001600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610c4d600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828673ffffffffffffffffffffffffffffffffffffffff166115849092919063ffffffff16565b7f44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee660405160405180910390a150505050565b600660009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600c81526020017f546f6b656e56657374696e6700000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250610d2e828261102e565b151515610d3a57600080fd5b610d4388611119565b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614151515610d7f57600080fd5b838511151515610d8e57600080fd5b86600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600660006101000a81548160ff02191690831515021790555083600581905550610e03858761156890919063ffffffff16565b600381905550856004819055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610e77578082015181840152602081019050610e5c565b50505050905090810190601f168015610ea45780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610edd578082015181840152602081019050610ec2565b50505050905090810190601f168015610f0a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b602083101515610f535780518252602082019150602081019050602083039250610f2e565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515610fbc5780518252602082019150602081019050602083039250610f97565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff0219169083151502179055505050505050505050565b60076020528060005260406000206000915090505481565b60045481565b600080836040518082805190602001908083835b6020831015156110675780518252602082019150602081019050602083039250611042565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156110d057805182526020820191506020810190506020830392506110ab565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b6040805190810160405280600781526020017f4f776e61626c65000000000000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e3000000000000000000000000000000000000000000000000000000081525061118f828261102e565b15151561119b57600080fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611243578082015181840152602081019050611228565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156112a957808201518184015260208101905061128e565b50505050905090810190601f1680156112d65780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b60208310151561131f57805182526020820191506020810190506020830392506112fa565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156113885780518252602082019150602081019050602083039250611363565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561146f57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60086020528060005260406000206000915054906101000a900460ff1681565b600082821115151561155d57fe5b818303905092915050565b6000818301905082811015151561157b57fe5b80905092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b505050506040513d602081101561165157600080fd5b8101908080519060200190929190505050151561166a57fe5b505050565b60008083141561168257600090506116a1565b818302905081838281151561169357fe5b0414151561169d57fe5b8090505b92915050565b600081838115156116b457fe5b049050929150505600a165627a7a72305820f5e0e3b159468a3907d03bc1e253ea328fa6072f4cbab92ef3fccd8b740ae3900029",
"sourceMap": "468:3244:44:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;468:3244:44;;;;;;;",
"deployedSourceMap": "468:3244:44:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;766:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;766:23:44;;;;;;;;;;;;;;;;;;;;;;;718:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;718:20:44;;;;;;;;;;;;;;;;;;;;;;;3016:132;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3016:132:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2047:265;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2047:265:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;3273:437;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3273:437:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;687:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;687:26:44;;;;;;;;;;;;;;;;;;;;;;;;;;;2520:342;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2520:342:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;794:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;794:21:44;;;;;;;;;;;;;;;;;;;;;;;;;;;307:20:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;307:20:25;;;;;;;;;;;;;;;;;;;;;;;;;;;1462:464:44;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1462:464:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;820:44;;8:9:-1;5:2;;;30:1;27;20:12;5:2;820:44:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;742:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;742:20:44;;;;;;;;;;;;;;;;;;;;;;;1950:140:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1950:140:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;537:104:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;537:104:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;949:174;;8:9:-1;5:2;;;30:1;27;20:12;5:2;949:174:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;868:40:44;;8:9:-1;5:2;;;30:1;27;20:12;5:2;868:40:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;766:23;;;;:::o;718:20::-;;;;:::o;3016:132::-;3081:7;3103:40;3127:8;:15;3136:5;3127:15;;;;;;;;;;;;;;;;3103:19;3116:5;3103:12;:19::i;:::-;:23;;:40;;;;:::i;:::-;3096:47;;3016:132;;;:::o;2047:265::-;2095:18;2116:23;2133:5;2116:16;:23::i;:::-;2095:44;;2167:1;2154:10;:14;2146:23;;;;;;;;2194:31;2214:10;2194:8;:15;2203:5;2194:15;;;;;;;;;;;;;;;;:19;;:31;;;;:::i;:::-;2176:8;:15;2185:5;2176:15;;;;;;;;;;;;;;;:49;;;;2232:43;2251:11;;;;;;;;;;;2264:10;2232:5;:18;;;;:43;;;;;:::i;:::-;2287:20;2296:10;2287:20;;;;;;;;;;;;;;;;;;2047:265;;:::o;3273:437::-;3334:7;3349:22;3401:20;3374:5;:15;;;3390:4;3374:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3374:21:44;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3374:21:44;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3374:21:44;;;;;;;;;;;;;;;;3349:46;;3424:35;3443:8;:15;3452:5;3443:15;;;;;;;;;;;;;;;;3424:14;:18;;:35;;;;:::i;:::-;3401:58;;3488:5;;3470:15;:23;3466:240;;;3510:1;3503:8;;;;3466:240;3547:19;3557:8;;3547:5;;:9;;:19;;;;:::i;:::-;3528:15;:38;;:56;;;;3570:7;:14;3578:5;3570:14;;;;;;;;;;;;;;;;;;;;;;;;;3528:56;3524:182;;;3601:12;3594:19;;;;3524:182;3641:58;3690:8;;3641:44;3658:26;3678:5;;3658:15;:19;;:26;;;;:::i;:::-;3641:12;:16;;:44;;;;:::i;:::-;:48;;:58;;;;:::i;:::-;3634:65;;3273:437;;;;;;:::o;687:26::-;;;;;;;;;;;;;:::o;2520:342::-;2632:15;2678:18;2728:14;770:5:25;;;;;;;;;;;756:19;;:10;:19;;;748:28;;;;;;;;2585:9:44;;;;;;;;;;;2577:18;;;;;;;;2610:7;:14;2618:5;2610:14;;;;;;;;;;;;;;;;;;;;;;;;;2609:15;2601:24;;;;;;;;2650:5;:15;;;2666:4;2650:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2650:21:44;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2650:21:44;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2650:21:44;;;;;;;;;;;;;;;;2632:39;;2699:23;2716:5;2699:16;:23::i;:::-;2678:44;;2745:23;2757:10;2745:7;:11;;:23;;;;:::i;:::-;2728:40;;2792:4;2775:7;:14;2783:5;2775:14;;;;;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;2803:33;2822:5;;;;;;;;;;;2829:6;2803:5;:18;;;;:33;;;;;:::i;:::-;2848:9;;;;;;;;;;2520:342;;;;:::o;794:21::-;;;;;;;;;;;;;:::o;307:20:25:-;;;;;;;;;;;;;:::o;1462:464:44:-;1004:223:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:37;1094:12;1108:11;1083:10;:37::i;:::-;1082:38;1074:47;;;;;;;;1679:27:44;1698:7;1679:18;:27::i;:::-;1745:1;1721:26;;:12;:26;;;;1713:35;;;;;;;;1772:9;1762:6;:19;;1754:28;;;;;;;;1803:12;1789:11;;:26;;;;;;;;;;;;;;;;;;1833:10;1821:9;;:22;;;;;;;;;;;;;;;;;;1860:9;1849:8;:20;;;;1883:18;1894:6;1883;:10;;:18;;;;:::i;:::-;1875:5;:26;;;;1915:6;1907:5;:14;;;;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;;;;;;;;;;;;;;;;;;1462:464:44;;;;;;;;:::o;820:44::-;;;;;;;;;;;;;;;;;:::o;742:20::-;;;;:::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;537:104:25:-;1004:223:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:37;1094:12;1108:11;1083:10;:37::i;:::-;1082:38;1074:47;;;;;;;;629:7:25;621:5;;:15;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;537:104:25;;;:::o;949:174::-;770:5;;;;;;;;;;;756:19;;:10;:19;;;748:28;;;;;;;;1045:1;1025:22;;:8;:22;;;;1017:31;;;;;;;;1087:8;1059:37;;1080:5;;;;;;;;;;;1059:37;;;;;;;;;;;;1110:8;1102:5;;:16;;;;;;;;;;;;;;;;;;949:174;:::o;868:40:44:-;;;;;;;;;;;;;;;;;;;;;;:::o;836:110:6:-;894:7;921:1;916;:6;;909:14;;;;;;940:1;936;:5;929:12;;836:110;;;;:::o;1008:123::-;1066:9;1091:1;1087;:5;1083:9;;1110:1;1105;:6;;1098:14;;;;;;1125:1;1118:8;;1008:123;;;;:::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;203:167:6:-;261:9;287:1;282;:6;278:35;;;305:1;298:8;;;;278:35;326:1;322;:5;318:9;;349:1;344;340;:5;;;;;;;;:10;333:18;;;;;;364:1;357:8;;203:167;;;;;:::o;452:272::-;510:7;718:1;714;:5;;;;;;;;707:12;;452:272;;;;:::o",
"source": "/* solium-disable security/no-block-members */\n\npragma solidity ^0.4.21;\n\nimport \"./ERC20Basic.sol\";\nimport \"./SafeERC20.sol\";\nimport \"../../ownership/Ownable.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"zos-lib/contracts/migrations/Migratable.sol\";\n\n\n/**\n * @title TokenVesting\n * @dev A token holder contract that can release its token balance gradually like a\n * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the\n * owner.\n */\ncontract TokenVesting is Migratable, Ownable {\n using SafeMath for uint256;\n using SafeERC20 for ERC20Basic;\n\n event Released(uint256 amount);\n event Revoked();\n\n // beneficiary of tokens after they are released\n address public beneficiary;\n\n uint256 public cliff;\n uint256 public start;\n uint256 public duration;\n\n bool public revocable;\n\n mapping (address => uint256) public released;\n mapping (address => bool) public revoked;\n\n /**\n * @dev Creates a vesting contract that vests its balance of any ERC20 token to the\n * _beneficiary, gradually in a linear fashion until _start + _duration. By then all\n * of the balance will have vested.\n * @param _beneficiary address of the beneficiary to whom vested tokens are transferred\n * @param _cliff duration in seconds of the cliff in which tokens will begin to vest\n * @param _duration duration in seconds of the period in which the tokens will vest\n * @param _revocable whether the vesting is revocable or not\n */\n function initialize(\n address _sender,\n address _beneficiary,\n uint256 _start,\n uint256 _cliff,\n uint256 _duration,\n bool _revocable\n )\n public\n isInitializer(\"TokenVesting\", \"1.9.0\")\n {\n Ownable.initialize(_sender);\n\n require(_beneficiary != address(0));\n require(_cliff <= _duration);\n\n beneficiary = _beneficiary;\n revocable = _revocable;\n duration = _duration;\n cliff = _start.add(_cliff);\n start = _start;\n }\n\n /**\n * @notice Transfers vested tokens to beneficiary.\n * @param token ERC20 token which is being vested\n */\n function release(ERC20Basic token) public {\n uint256 unreleased = releasableAmount(token);\n\n require(unreleased > 0);\n\n released[token] = released[token].add(unreleased);\n\n token.safeTransfer(beneficiary, unreleased);\n\n emit Released(unreleased);\n }\n\n /**\n * @notice Allows the owner to revoke the vesting. Tokens already vested\n * remain in the contract, the rest are returned to the owner.\n * @param token ERC20 token which is being vested\n */\n function revoke(ERC20Basic token) public onlyOwner {\n require(revocable);\n require(!revoked[token]);\n\n uint256 balance = token.balanceOf(this);\n\n uint256 unreleased = releasableAmount(token);\n uint256 refund = balance.sub(unreleased);\n\n revoked[token] = true;\n\n token.safeTransfer(owner, refund);\n\n emit Revoked();\n }\n\n /**\n * @dev Calculates the amount that has already vested but hasn't been released yet.\n * @param token ERC20 token which is being vested\n */\n function releasableAmount(ERC20Basic token) public view returns (uint256) {\n return vestedAmount(token).sub(released[token]);\n }\n\n /**\n * @dev Calculates the amount that has already vested.\n * @param token ERC20 token which is being vested\n */\n function vestedAmount(ERC20Basic token) public view returns (uint256) {\n uint256 currentBalance = token.balanceOf(this);\n uint256 totalBalance = currentBalance.add(released[token]);\n\n if (block.timestamp < cliff) {\n return 0;\n } else if (block.timestamp >= start.add(duration) || revoked[token]) {\n return totalBalance;\n } else {\n return totalBalance.mul(block.timestamp.sub(start)).div(duration);\n }\n }\n}\n",
"sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/TokenVesting.sol",
"ast": {
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/TokenVesting.sol",
"exportedSymbols": {
"TokenVesting": [
3462
]
},
"id": 3463,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3187,
"literals": [
"solidity",
"^",
"0.4",
".21"
],
"nodeType": "PragmaDirective",
"src": "48:24:44"
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/ERC20Basic.sol",
"file": "./ERC20Basic.sol",
"id": 3188,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 2512,
"src": "74:26:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/SafeERC20.sol",
"file": "./SafeERC20.sol",
"id": 3189,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 2808,
"src": "101:25:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/ownership/Ownable.sol",
"file": "../../ownership/Ownable.sol",
"id": 3190,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 1581,
"src": "127:37:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol",
"file": "../../math/SafeMath.sol",
"id": 3191,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 537,
"src": "165:33:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "zos-lib/contracts/migrations/Migratable.sol",
"file": "zos-lib/contracts/migrations/Migratable.sol",
"id": 3192,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 4770,
"src": "199:53:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 3193,
"name": "Migratable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4769,
"src": "493:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migratable_$4769",
"typeString": "contract Migratable"
}
},
"id": 3194,
"nodeType": "InheritanceSpecifier",
"src": "493:10:44"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 3195,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1580,
"src": "505:7:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$1580",
"typeString": "contract Ownable"
}
},
"id": 3196,
"nodeType": "InheritanceSpecifier",
"src": "505:7:44"
}
],
"contractDependencies": [
1580,
4769
],
"contractKind": "contract",
"documentation": "@title TokenVesting\n@dev A token holder contract that can release its token balance gradually like a\ntypical vesting scheme, with a cliff and vesting period. Optionally revocable by the\nowner.",
"fullyImplemented": true,
"id": 3462,
"linearizedBaseContracts": [
3462,
1580,
4769
],
"name": "TokenVesting",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 3199,
"libraryName": {
"contractScope": null,
"id": 3197,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 536,
"src": "523:8:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$536",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "517:27:44",
"typeName": {
"id": 3198,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "536:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"id": 3202,
"libraryName": {
"contractScope": null,
"id": 3200,
"name": "SafeERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2807,
"src": "553:9:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeERC20_$2807",
"typeString": "library SafeERC20"
}
},
"nodeType": "UsingForDirective",
"src": "547:31:44",
"typeName": {
"contractScope": null,
"id": 3201,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "567:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
}
},
{
"anonymous": false,
"documentation": null,
"id": 3206,
"name": "Released",
"nodeType": "EventDefinition",
"parameters": {
"id": 3205,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3204,
"indexed": false,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3206,
"src": "597:14:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3203,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "597:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "596:16:44"
},
"src": "582:31:44"
},
{
"anonymous": false,
"documentation": null,
"id": 3208,
"name": "Revoked",
"nodeType": "EventDefinition",
"parameters": {
"id": 3207,
"nodeType": "ParameterList",
"parameters": [],
"src": "629:2:44"
},
"src": "616:16:44"
},
{
"constant": false,
"id": 3210,
"name": "beneficiary",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "687:26:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3209,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "687:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3212,
"name": "cliff",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "718:20:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3211,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "718:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3214,
"name": "start",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "742:20:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3213,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "742:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3216,
"name": "duration",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "766:23:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3215,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "766:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3218,
"name": "revocable",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "794:21:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3217,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "794:4:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3222,
"name": "released",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "820:44:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 3221,
"keyType": {
"id": 3219,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "829:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "820:28:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 3220,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "840:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3226,
"name": "revoked",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "868:40:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 3225,
"keyType": {
"id": 3223,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "877:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "868:25:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 3224,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "888:4:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 3288,
"nodeType": "Block",
"src": "1673:253:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3248,
"name": "_sender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3228,
"src": "1698:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 3245,
"name": "Ownable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1580,
"src": "1679:7:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Ownable_$1580_$",
"typeString": "type(contract Ownable)"
}
},
"id": 3247,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 1543,
"src": "1679:18:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 3249,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1679:27:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3250,
"nodeType": "ExpressionStatement",
"src": "1679:27:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3256,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3252,
"name": "_beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3230,
"src": "1721:12:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 3254,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1745:1:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 3253,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1737:7:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3255,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1737:10:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1721:26:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3251,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "1713:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1713:35:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3258,
"nodeType": "ExpressionStatement",
"src": "1713:35:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3260,
"name": "_cliff",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3234,
"src": "1762:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3261,
"name": "_duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3236,
"src": "1772:9:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1762:19:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3259,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "1754:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3263,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1754:28:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3264,
"nodeType": "ExpressionStatement",
"src": "1754:28:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3265,
"name": "beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3210,
"src": "1789:11:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3266,
"name": "_beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3230,
"src": "1803:12:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1789:26:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 3268,
"nodeType": "ExpressionStatement",
"src": "1789:26:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3271,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3269,
"name": "revocable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3218,
"src": "1821:9:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3270,
"name": "_revocable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3238,
"src": "1833:10:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1821:22:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3272,
"nodeType": "ExpressionStatement",
"src": "1821:22:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3273,
"name": "duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3216,
"src": "1849:8:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3274,
"name": "_duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3236,
"src": "1860:9:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1849:20:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3276,
"nodeType": "ExpressionStatement",
"src": "1849:20:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3282,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3277,
"name": "cliff",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3212,
"src": "1875:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3280,
"name": "_cliff",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3234,
"src": "1894:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3278,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3232,
"src": "1883:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3279,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 535,
"src": "1883:10:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3281,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1883:18:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1875:26:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3283,
"nodeType": "ExpressionStatement",
"src": "1875:26:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3284,
"name": "start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1907:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3285,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3232,
"src": "1915:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1907:14:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3287,
"nodeType": "ExpressionStatement",
"src": "1907:14:44"
}
]
},
"documentation": "@dev Creates a vesting contract that vests its balance of any ERC20 token to the\n_beneficiary, gradually in a linear fashion until _start + _duration. By then all\nof the balance will have vested.\n@param _beneficiary address of the beneficiary to whom vested tokens are transferred\n@param _cliff duration in seconds of the cliff in which tokens will begin to vest\n@param _duration duration in seconds of the period in which the tokens will vest\n@param _revocable whether the vesting is revocable or not",
"id": 3289,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"hexValue": "546f6b656e56657374696e67",
"id": 3241,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1646:14:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e0d70f1cfb5d37122c7d281c78f46fb60f53015666030a7a749c1365febf4541",
"typeString": "literal_string \"TokenVesting\""
},
"value": "TokenVesting"
},
{
"argumentTypes": null,
"hexValue": "312e392e30",
"id": 3242,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1662:7:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_48b337767c221abef259fe87e655d8fa1026fb5e60ec68ad68fa7e00bb7f050c",
"typeString": "literal_string \"1.9.0\""
},
"value": "1.9.0"
}
],
"id": 3243,
"modifierName": {
"argumentTypes": null,
"id": 3240,
"name": "isInitializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4716,
"src": "1632:13:44",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_string_memory_ptr_$",
"typeString": "modifier (string memory,string memory)"
}
},
"nodeType": "ModifierInvocation",
"src": "1632:38:44"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3239,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3228,
"name": "_sender",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1487:15:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3227,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1487:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3230,
"name": "_beneficiary",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1508:20:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3229,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1508:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3232,
"name": "_start",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1534:14:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3231,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1534:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3234,
"name": "_cliff",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1554:14:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3233,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1554:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3236,
"name": "_duration",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1574:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3235,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1574:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3238,
"name": "_revocable",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1597:15:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3237,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1597:4:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1481:135:44"
},
"payable": false,
"returnParameters": {
"id": 3244,
"nodeType": "ParameterList",
"parameters": [],
"src": "1673:0:44"
},
"scope": 3462,
"src": "1462:464:44",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3328,
"nodeType": "Block",
"src": "2089:223:44",
"statements": [
{
"assignments": [
3295
],
"declarations": [
{
"constant": false,
"id": 3295,
"name": "unreleased",
"nodeType": "VariableDeclaration",
"scope": 3329,
"src": "2095:18:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3294,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2095:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3299,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3297,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3291,
"src": "2133:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
],
"id": 3296,
"name": "releasableAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3401,
"src": "2116:16:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2511_$returns$_t_uint256_$",
"typeString": "function (contract ERC20Basic) view returns (uint256)"
}
},
"id": 3298,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2116:23:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2095:44:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3303,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3301,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3295,
"src": "2154:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3302,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2167:1:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2154:14:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3300,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "2146:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3304,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2146:23:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3305,
"nodeType": "ExpressionStatement",
"src": "2146:23:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3306,
"name": "released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "2176:8:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3308,
"indexExpression": {
"argumentTypes": null,
"id": 3307,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3291,
"src": "2185:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2176:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3313,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3295,
"src": "2214:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3309,
"name": "released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "2194:8:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3311,
"indexExpression": {
"argumentTypes": null,
"id": 3310,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3291,
"src": "2203:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2194:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3312,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 535,
"src": "2194:19:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3314,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2194:31:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2176:49:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3316,
"nodeType": "ExpressionStatement",
"src": "2176:49:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3320,
"name": "beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3210,
"src": "2251:11:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3321,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3295,
"src": "2264:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3317,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3291,
"src": "2232:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"id": 3319,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 2767,
"src": "2232:18:44",
"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": 3322,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2232:43:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3323,
"nodeType": "ExpressionStatement",
"src": "2232:43:44"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3325,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3295,
"src": "2296:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3324,
"name": "Released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3206,
"src": "2287:8:44",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3326,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2287:20:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3327,
"nodeType": "EmitStatement",
"src": "2282:25:44"
}
]
},
"documentation": "@notice Transfers vested tokens to beneficiary.\n@param token ERC20 token which is being vested",
"id": 3329,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "release",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3292,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3291,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3329,
"src": "2064:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
},
"typeName": {
"contractScope": null,
"id": 3290,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "2064:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2063:18:44"
},
"payable": false,
"returnParameters": {
"id": 3293,
"nodeType": "ParameterList",
"parameters": [],
"src": "2089:0:44"
},
"scope": 3462,
"src": "2047:265:44",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3383,
"nodeType": "Block",
"src": "2571:291:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3337,
"name": "revocable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3218,
"src": "2585:9:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3336,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "2577:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3338,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2577:18:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3339,
"nodeType": "ExpressionStatement",
"src": "2577:18:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3344,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2609:15:44",
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3341,
"name": "revoked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3226,
"src": "2610:7:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3343,
"indexExpression": {
"argumentTypes": null,
"id": 3342,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2618:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2610:14:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3340,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "2601:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3345,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2601:24:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3346,
"nodeType": "ExpressionStatement",
"src": "2601:24:44"
},
{
"assignments": [
3348
],
"declarations": [
{
"constant": false,
"id": 3348,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 3384,
"src": "2632:15:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3347,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2632:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3353,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3351,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4905,
"src": "2666:4:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TokenVesting_$3462",
"typeString": "contract TokenVesting"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_TokenVesting_$3462",
"typeString": "contract TokenVesting"
}
],
"expression": {
"argumentTypes": null,
"id": 3349,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2650:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"id": 3350,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 2493,
"src": "2650:15:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 3352,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2650:21:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2632:39:44"
},
{
"assignments": [
3355
],
"declarations": [
{
"constant": false,
"id": 3355,
"name": "unreleased",
"nodeType": "VariableDeclaration",
"scope": 3384,
"src": "2678:18:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3354,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2678:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3359,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3357,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2716:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
],
"id": 3356,
"name": "releasableAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3401,
"src": "2699:16:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2511_$returns$_t_uint256_$",
"typeString": "function (contract ERC20Basic) view returns (uint256)"
}
},
"id": 3358,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2699:23:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2678:44:44"
},
{
"assignments": [
3361
],
"declarations": [
{
"constant": false,
"id": 3361,
"name": "refund",
"nodeType": "VariableDeclaration",
"scope": 3384,
"src": "2728:14:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3360,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2728:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3366,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3364,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "2757:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3362,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3348,
"src": "2745:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3363,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 511,
"src": "2745:11:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3365,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2745:23:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2728:40:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3371,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3367,
"name": "revoked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3226,
"src": "2775:7:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3369,
"indexExpression": {
"argumentTypes": null,
"id": 3368,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2783:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2775:14:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3370,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2792:4:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "2775:21:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3372,
"nodeType": "ExpressionStatement",
"src": "2775:21:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3376,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1523,
"src": "2822:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3377,
"name": "refund",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3361,
"src": "2829:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3373,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2803:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"id": 3375,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 2767,
"src": "2803:18:44",
"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": 3378,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2803:33:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3379,
"nodeType": "ExpressionStatement",
"src": "2803:33:44"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 3380,
"name": "Revoked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3208,
"src": "2848:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 3381,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2848:9:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3382,
"nodeType": "EmitStatement",
"src": "2843:14:44"
}
]
},
"documentation": "@notice Allows the owner to revoke the vesting. Tokens already vested\nremain in the contract, the rest are returned to the owner.\n@param token ERC20 token which is being vested",
"id": 3384,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 3334,
"modifierName": {
"argumentTypes": null,
"id": 3333,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1554,
"src": "2561:9:44",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2561:9:44"
}
],
"name": "revoke",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3332,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3331,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3384,
"src": "2536:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
},
"typeName": {
"contractScope": null,
"id": 3330,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "2536:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2535:18:44"
},
"payable": false,
"returnParameters": {
"id": 3335,
"nodeType": "ParameterList",
"parameters": [],
"src": "2571:0:44"
},
"scope": 3462,
"src": "2520:342:44",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3400,
"nodeType": "Block",
"src": "3090:58:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3395,
"name": "released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "3127:8:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3397,
"indexExpression": {
"argumentTypes": null,
"id": 3396,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3386,
"src": "3136:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3127:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3392,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3386,
"src": "3116:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
],
"id": 3391,
"name": "vestedAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3461,
"src": "3103:12:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2511_$returns$_t_uint256_$",
"typeString": "function (contract ERC20Basic) view returns (uint256)"
}
},
"id": 3393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3103:19:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 511,
"src": "3103:23:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3398,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3103:40:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3390,
"id": 3399,
"nodeType": "Return",
"src": "3096:47:44"
}
]
},
"documentation": "@dev Calculates the amount that has already vested but hasn't been released yet.\n@param token ERC20 token which is being vested",
"id": 3401,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "releasableAmount",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3387,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3386,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "3042:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
},
"typeName": {
"contractScope": null,
"id": 3385,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "3042:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3041:18:44"
},
"payable": false,
"returnParameters": {
"id": 3390,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3389,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "3081:7:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3388,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3081:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3080:9:44"
},
"scope": 3462,
"src": "3016:132:44",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3460,
"nodeType": "Block",
"src": "3343:367:44",
"statements": [
{
"assignments": [
3409
],
"declarations": [
{
"constant": false,
"id": 3409,
"name": "currentBalance",
"nodeType": "VariableDeclaration",
"scope": 3461,
"src": "3349:22:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3408,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3349:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3414,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3412,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4905,
"src": "3390:4:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TokenVesting_$3462",
"typeString": "contract TokenVesting"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_TokenVesting_$3462",
"typeString": "contract TokenVesting"
}
],
"expression": {
"argumentTypes": null,
"id": 3410,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3403,
"src": "3374:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"id": 3411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 2493,
"src": "3374:15:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 3413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3374:21:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3349:46:44"
},
{
"assignments": [
3416
],
"declarations": [
{
"constant": false,
"id": 3416,
"name": "totalBalance",
"nodeType": "VariableDeclaration",
"scope": 3461,
"src": "3401:20:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3415,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3401:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3423,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3419,
"name": "released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "3443:8:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3421,
"indexExpression": {
"argumentTypes": null,
"id": 3420,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3403,
"src": "3452:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3443:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3417,
"name": "currentBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3409,
"src": "3424:14:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3418,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 535,
"src": "3424:18:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3422,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3424:35:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3401:58:44"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3427,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3424,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4774,
"src": "3470:5:44",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 3425,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3470:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 3426,
"name": "cliff",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3212,
"src": "3488:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3470:23:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 3441,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3437,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3431,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4774,
"src": "3528:5:44",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 3432,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3528:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3435,
"name": "duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3216,
"src": "3557:8:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3433,
"name": "start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "3547:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3434,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 535,
"src": "3547:9:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3436,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3547:19:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3528:38:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3438,
"name": "revoked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3226,
"src": "3570:7:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3440,
"indexExpression": {
"argumentTypes": null,
"id": 3439,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3403,
"src": "3578:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3570:14:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3528:56:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 3457,
"nodeType": "Block",
"src": "3626:80:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3454,
"name": "duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3216,
"src": "3690:8:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3450,
"name": "start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "3678:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3447,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4774,
"src": "3658:5:44",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 3448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3658:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 511,
"src": "3658:19:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3451,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3658:26:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3445,
"name": "totalBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3416,
"src": "3641:12:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3446,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 477,
"src": "3641:16:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3452,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3641:44:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 491,
"src": "3641:48:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3455,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3641:58:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3407,
"id": 3456,
"nodeType": "Return",
"src": "3634:65:44"
}
]
},
"id": 3458,
"nodeType": "IfStatement",
"src": "3524:182:44",
"trueBody": {
"id": 3444,
"nodeType": "Block",
"src": "3586:34:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3442,
"name": "totalBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3416,
"src": "3601:12:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3407,
"id": 3443,
"nodeType": "Return",
"src": "3594:19:44"
}
]
}
},
"id": 3459,
"nodeType": "IfStatement",
"src": "3466:240:44",
"trueBody": {
"id": 3430,
"nodeType": "Block",
"src": "3495:23:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3428,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3510:1:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 3407,
"id": 3429,
"nodeType": "Return",
"src": "3503:8:44"
}
]
}
}
]
},
"documentation": "@dev Calculates the amount that has already vested.\n@param token ERC20 token which is being vested",
"id": 3461,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "vestedAmount",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3404,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3403,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3461,
"src": "3295:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
},
"typeName": {
"contractScope": null,
"id": 3402,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "3295:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3294:18:44"
},
"payable": false,
"returnParameters": {
"id": 3407,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3406,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3461,
"src": "3334:7:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3405,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3334:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3333:9:44"
},
"scope": 3462,
"src": "3273:437:44",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 3463,
"src": "468:3244:44"
}
],
"src": "48:3665:44"
},
"legacyAST": {
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/TokenVesting.sol",
"exportedSymbols": {
"TokenVesting": [
3462
]
},
"id": 3463,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3187,
"literals": [
"solidity",
"^",
"0.4",
".21"
],
"nodeType": "PragmaDirective",
"src": "48:24:44"
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/ERC20Basic.sol",
"file": "./ERC20Basic.sol",
"id": 3188,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 2512,
"src": "74:26:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/SafeERC20.sol",
"file": "./SafeERC20.sol",
"id": 3189,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 2808,
"src": "101:25:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/ownership/Ownable.sol",
"file": "../../ownership/Ownable.sol",
"id": 3190,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 1581,
"src": "127:37:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol",
"file": "../../math/SafeMath.sol",
"id": 3191,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 537,
"src": "165:33:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "zos-lib/contracts/migrations/Migratable.sol",
"file": "zos-lib/contracts/migrations/Migratable.sol",
"id": 3192,
"nodeType": "ImportDirective",
"scope": 3463,
"sourceUnit": 4770,
"src": "199:53:44",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 3193,
"name": "Migratable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4769,
"src": "493:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migratable_$4769",
"typeString": "contract Migratable"
}
},
"id": 3194,
"nodeType": "InheritanceSpecifier",
"src": "493:10:44"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 3195,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1580,
"src": "505:7:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$1580",
"typeString": "contract Ownable"
}
},
"id": 3196,
"nodeType": "InheritanceSpecifier",
"src": "505:7:44"
}
],
"contractDependencies": [
1580,
4769
],
"contractKind": "contract",
"documentation": "@title TokenVesting\n@dev A token holder contract that can release its token balance gradually like a\ntypical vesting scheme, with a cliff and vesting period. Optionally revocable by the\nowner.",
"fullyImplemented": true,
"id": 3462,
"linearizedBaseContracts": [
3462,
1580,
4769
],
"name": "TokenVesting",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 3199,
"libraryName": {
"contractScope": null,
"id": 3197,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 536,
"src": "523:8:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$536",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "517:27:44",
"typeName": {
"id": 3198,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "536:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"id": 3202,
"libraryName": {
"contractScope": null,
"id": 3200,
"name": "SafeERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2807,
"src": "553:9:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeERC20_$2807",
"typeString": "library SafeERC20"
}
},
"nodeType": "UsingForDirective",
"src": "547:31:44",
"typeName": {
"contractScope": null,
"id": 3201,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "567:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
}
},
{
"anonymous": false,
"documentation": null,
"id": 3206,
"name": "Released",
"nodeType": "EventDefinition",
"parameters": {
"id": 3205,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3204,
"indexed": false,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3206,
"src": "597:14:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3203,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "597:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "596:16:44"
},
"src": "582:31:44"
},
{
"anonymous": false,
"documentation": null,
"id": 3208,
"name": "Revoked",
"nodeType": "EventDefinition",
"parameters": {
"id": 3207,
"nodeType": "ParameterList",
"parameters": [],
"src": "629:2:44"
},
"src": "616:16:44"
},
{
"constant": false,
"id": 3210,
"name": "beneficiary",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "687:26:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3209,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "687:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3212,
"name": "cliff",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "718:20:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3211,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "718:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3214,
"name": "start",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "742:20:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3213,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "742:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3216,
"name": "duration",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "766:23:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3215,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "766:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3218,
"name": "revocable",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "794:21:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3217,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "794:4:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3222,
"name": "released",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "820:44:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 3221,
"keyType": {
"id": 3219,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "829:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "820:28:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 3220,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "840:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3226,
"name": "revoked",
"nodeType": "VariableDeclaration",
"scope": 3462,
"src": "868:40:44",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 3225,
"keyType": {
"id": 3223,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "877:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "868:25:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 3224,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "888:4:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 3288,
"nodeType": "Block",
"src": "1673:253:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3248,
"name": "_sender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3228,
"src": "1698:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 3245,
"name": "Ownable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1580,
"src": "1679:7:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Ownable_$1580_$",
"typeString": "type(contract Ownable)"
}
},
"id": 3247,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 1543,
"src": "1679:18:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 3249,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1679:27:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3250,
"nodeType": "ExpressionStatement",
"src": "1679:27:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3256,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3252,
"name": "_beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3230,
"src": "1721:12:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 3254,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1745:1:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 3253,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1737:7:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3255,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1737:10:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1721:26:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3251,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "1713:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1713:35:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3258,
"nodeType": "ExpressionStatement",
"src": "1713:35:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3260,
"name": "_cliff",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3234,
"src": "1762:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3261,
"name": "_duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3236,
"src": "1772:9:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1762:19:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3259,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "1754:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3263,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1754:28:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3264,
"nodeType": "ExpressionStatement",
"src": "1754:28:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3265,
"name": "beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3210,
"src": "1789:11:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3266,
"name": "_beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3230,
"src": "1803:12:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1789:26:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 3268,
"nodeType": "ExpressionStatement",
"src": "1789:26:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3271,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3269,
"name": "revocable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3218,
"src": "1821:9:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3270,
"name": "_revocable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3238,
"src": "1833:10:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1821:22:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3272,
"nodeType": "ExpressionStatement",
"src": "1821:22:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3273,
"name": "duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3216,
"src": "1849:8:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3274,
"name": "_duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3236,
"src": "1860:9:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1849:20:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3276,
"nodeType": "ExpressionStatement",
"src": "1849:20:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3282,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3277,
"name": "cliff",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3212,
"src": "1875:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3280,
"name": "_cliff",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3234,
"src": "1894:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3278,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3232,
"src": "1883:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3279,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 535,
"src": "1883:10:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3281,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1883:18:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1875:26:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3283,
"nodeType": "ExpressionStatement",
"src": "1875:26:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3284,
"name": "start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1907:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3285,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3232,
"src": "1915:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1907:14:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3287,
"nodeType": "ExpressionStatement",
"src": "1907:14:44"
}
]
},
"documentation": "@dev Creates a vesting contract that vests its balance of any ERC20 token to the\n_beneficiary, gradually in a linear fashion until _start + _duration. By then all\nof the balance will have vested.\n@param _beneficiary address of the beneficiary to whom vested tokens are transferred\n@param _cliff duration in seconds of the cliff in which tokens will begin to vest\n@param _duration duration in seconds of the period in which the tokens will vest\n@param _revocable whether the vesting is revocable or not",
"id": 3289,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"hexValue": "546f6b656e56657374696e67",
"id": 3241,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1646:14:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e0d70f1cfb5d37122c7d281c78f46fb60f53015666030a7a749c1365febf4541",
"typeString": "literal_string \"TokenVesting\""
},
"value": "TokenVesting"
},
{
"argumentTypes": null,
"hexValue": "312e392e30",
"id": 3242,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1662:7:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_48b337767c221abef259fe87e655d8fa1026fb5e60ec68ad68fa7e00bb7f050c",
"typeString": "literal_string \"1.9.0\""
},
"value": "1.9.0"
}
],
"id": 3243,
"modifierName": {
"argumentTypes": null,
"id": 3240,
"name": "isInitializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4716,
"src": "1632:13:44",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_string_memory_ptr_$",
"typeString": "modifier (string memory,string memory)"
}
},
"nodeType": "ModifierInvocation",
"src": "1632:38:44"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3239,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3228,
"name": "_sender",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1487:15:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3227,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1487:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3230,
"name": "_beneficiary",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1508:20:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3229,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1508:7:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3232,
"name": "_start",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1534:14:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3231,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1534:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3234,
"name": "_cliff",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1554:14:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3233,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1554:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3236,
"name": "_duration",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1574:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3235,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1574:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3238,
"name": "_revocable",
"nodeType": "VariableDeclaration",
"scope": 3289,
"src": "1597:15:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3237,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1597:4:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1481:135:44"
},
"payable": false,
"returnParameters": {
"id": 3244,
"nodeType": "ParameterList",
"parameters": [],
"src": "1673:0:44"
},
"scope": 3462,
"src": "1462:464:44",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3328,
"nodeType": "Block",
"src": "2089:223:44",
"statements": [
{
"assignments": [
3295
],
"declarations": [
{
"constant": false,
"id": 3295,
"name": "unreleased",
"nodeType": "VariableDeclaration",
"scope": 3329,
"src": "2095:18:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3294,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2095:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3299,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3297,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3291,
"src": "2133:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
],
"id": 3296,
"name": "releasableAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3401,
"src": "2116:16:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2511_$returns$_t_uint256_$",
"typeString": "function (contract ERC20Basic) view returns (uint256)"
}
},
"id": 3298,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2116:23:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2095:44:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3303,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3301,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3295,
"src": "2154:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3302,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2167:1:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2154:14:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3300,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "2146:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3304,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2146:23:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3305,
"nodeType": "ExpressionStatement",
"src": "2146:23:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3306,
"name": "released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "2176:8:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3308,
"indexExpression": {
"argumentTypes": null,
"id": 3307,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3291,
"src": "2185:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2176:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3313,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3295,
"src": "2214:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3309,
"name": "released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "2194:8:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3311,
"indexExpression": {
"argumentTypes": null,
"id": 3310,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3291,
"src": "2203:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2194:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3312,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 535,
"src": "2194:19:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3314,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2194:31:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2176:49:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3316,
"nodeType": "ExpressionStatement",
"src": "2176:49:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3320,
"name": "beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3210,
"src": "2251:11:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3321,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3295,
"src": "2264:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3317,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3291,
"src": "2232:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"id": 3319,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 2767,
"src": "2232:18:44",
"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": 3322,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2232:43:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3323,
"nodeType": "ExpressionStatement",
"src": "2232:43:44"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3325,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3295,
"src": "2296:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3324,
"name": "Released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3206,
"src": "2287:8:44",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3326,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2287:20:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3327,
"nodeType": "EmitStatement",
"src": "2282:25:44"
}
]
},
"documentation": "@notice Transfers vested tokens to beneficiary.\n@param token ERC20 token which is being vested",
"id": 3329,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "release",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3292,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3291,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3329,
"src": "2064:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
},
"typeName": {
"contractScope": null,
"id": 3290,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "2064:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2063:18:44"
},
"payable": false,
"returnParameters": {
"id": 3293,
"nodeType": "ParameterList",
"parameters": [],
"src": "2089:0:44"
},
"scope": 3462,
"src": "2047:265:44",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3383,
"nodeType": "Block",
"src": "2571:291:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3337,
"name": "revocable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3218,
"src": "2585:9:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3336,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "2577:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3338,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2577:18:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3339,
"nodeType": "ExpressionStatement",
"src": "2577:18:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3344,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2609:15:44",
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3341,
"name": "revoked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3226,
"src": "2610:7:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3343,
"indexExpression": {
"argumentTypes": null,
"id": 3342,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2618:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2610:14:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3340,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4787,
4788
],
"referencedDeclaration": 4787,
"src": "2601:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3345,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2601:24:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3346,
"nodeType": "ExpressionStatement",
"src": "2601:24:44"
},
{
"assignments": [
3348
],
"declarations": [
{
"constant": false,
"id": 3348,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 3384,
"src": "2632:15:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3347,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2632:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3353,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3351,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4905,
"src": "2666:4:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TokenVesting_$3462",
"typeString": "contract TokenVesting"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_TokenVesting_$3462",
"typeString": "contract TokenVesting"
}
],
"expression": {
"argumentTypes": null,
"id": 3349,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2650:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"id": 3350,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 2493,
"src": "2650:15:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 3352,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2650:21:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2632:39:44"
},
{
"assignments": [
3355
],
"declarations": [
{
"constant": false,
"id": 3355,
"name": "unreleased",
"nodeType": "VariableDeclaration",
"scope": 3384,
"src": "2678:18:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3354,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2678:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3359,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3357,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2716:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
],
"id": 3356,
"name": "releasableAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3401,
"src": "2699:16:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2511_$returns$_t_uint256_$",
"typeString": "function (contract ERC20Basic) view returns (uint256)"
}
},
"id": 3358,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2699:23:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2678:44:44"
},
{
"assignments": [
3361
],
"declarations": [
{
"constant": false,
"id": 3361,
"name": "refund",
"nodeType": "VariableDeclaration",
"scope": 3384,
"src": "2728:14:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3360,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2728:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3366,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3364,
"name": "unreleased",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "2757:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3362,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3348,
"src": "2745:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3363,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 511,
"src": "2745:11:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3365,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2745:23:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2728:40:44"
},
{
"expression": {
"argumentTypes": null,
"id": 3371,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3367,
"name": "revoked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3226,
"src": "2775:7:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3369,
"indexExpression": {
"argumentTypes": null,
"id": 3368,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2783:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2775:14:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3370,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2792:4:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "2775:21:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3372,
"nodeType": "ExpressionStatement",
"src": "2775:21:44"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3376,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1523,
"src": "2822:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3377,
"name": "refund",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3361,
"src": "2829:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3373,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3331,
"src": "2803:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"id": 3375,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeTransfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 2767,
"src": "2803:18:44",
"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": 3378,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2803:33:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3379,
"nodeType": "ExpressionStatement",
"src": "2803:33:44"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 3380,
"name": "Revoked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3208,
"src": "2848:7:44",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 3381,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2848:9:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3382,
"nodeType": "EmitStatement",
"src": "2843:14:44"
}
]
},
"documentation": "@notice Allows the owner to revoke the vesting. Tokens already vested\nremain in the contract, the rest are returned to the owner.\n@param token ERC20 token which is being vested",
"id": 3384,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 3334,
"modifierName": {
"argumentTypes": null,
"id": 3333,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1554,
"src": "2561:9:44",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2561:9:44"
}
],
"name": "revoke",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3332,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3331,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3384,
"src": "2536:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
},
"typeName": {
"contractScope": null,
"id": 3330,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "2536:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2535:18:44"
},
"payable": false,
"returnParameters": {
"id": 3335,
"nodeType": "ParameterList",
"parameters": [],
"src": "2571:0:44"
},
"scope": 3462,
"src": "2520:342:44",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3400,
"nodeType": "Block",
"src": "3090:58:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3395,
"name": "released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "3127:8:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3397,
"indexExpression": {
"argumentTypes": null,
"id": 3396,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3386,
"src": "3136:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3127:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3392,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3386,
"src": "3116:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
],
"id": 3391,
"name": "vestedAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3461,
"src": "3103:12:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2511_$returns$_t_uint256_$",
"typeString": "function (contract ERC20Basic) view returns (uint256)"
}
},
"id": 3393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3103:19:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 511,
"src": "3103:23:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3398,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3103:40:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3390,
"id": 3399,
"nodeType": "Return",
"src": "3096:47:44"
}
]
},
"documentation": "@dev Calculates the amount that has already vested but hasn't been released yet.\n@param token ERC20 token which is being vested",
"id": 3401,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "releasableAmount",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3387,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3386,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "3042:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
},
"typeName": {
"contractScope": null,
"id": 3385,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "3042:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3041:18:44"
},
"payable": false,
"returnParameters": {
"id": 3390,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3389,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "3081:7:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3388,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3081:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3080:9:44"
},
"scope": 3462,
"src": "3016:132:44",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3460,
"nodeType": "Block",
"src": "3343:367:44",
"statements": [
{
"assignments": [
3409
],
"declarations": [
{
"constant": false,
"id": 3409,
"name": "currentBalance",
"nodeType": "VariableDeclaration",
"scope": 3461,
"src": "3349:22:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3408,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3349:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3414,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3412,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4905,
"src": "3390:4:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TokenVesting_$3462",
"typeString": "contract TokenVesting"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_TokenVesting_$3462",
"typeString": "contract TokenVesting"
}
],
"expression": {
"argumentTypes": null,
"id": 3410,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3403,
"src": "3374:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"id": 3411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 2493,
"src": "3374:15:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 3413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3374:21:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3349:46:44"
},
{
"assignments": [
3416
],
"declarations": [
{
"constant": false,
"id": 3416,
"name": "totalBalance",
"nodeType": "VariableDeclaration",
"scope": 3461,
"src": "3401:20:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3415,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3401:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3423,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3419,
"name": "released",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "3443:8:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3421,
"indexExpression": {
"argumentTypes": null,
"id": 3420,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3403,
"src": "3452:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3443:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3417,
"name": "currentBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3409,
"src": "3424:14:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3418,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 535,
"src": "3424:18:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3422,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3424:35:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3401:58:44"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3427,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3424,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4774,
"src": "3470:5:44",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 3425,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3470:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 3426,
"name": "cliff",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3212,
"src": "3488:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3470:23:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 3441,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3437,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3431,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4774,
"src": "3528:5:44",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 3432,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3528:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3435,
"name": "duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3216,
"src": "3557:8:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3433,
"name": "start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "3547:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3434,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 535,
"src": "3547:9:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3436,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3547:19:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3528:38:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3438,
"name": "revoked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3226,
"src": "3570:7:44",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3440,
"indexExpression": {
"argumentTypes": null,
"id": 3439,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3403,
"src": "3578:5:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3570:14:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3528:56:44",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 3457,
"nodeType": "Block",
"src": "3626:80:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3454,
"name": "duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3216,
"src": "3690:8:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3450,
"name": "start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "3678:5:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3447,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4774,
"src": "3658:5:44",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 3448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3658:15:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 511,
"src": "3658:19:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3451,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3658:26:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3445,
"name": "totalBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3416,
"src": "3641:12:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3446,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 477,
"src": "3641:16:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3452,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3641:44:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 491,
"src": "3641:48:44",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3455,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3641:58:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3407,
"id": 3456,
"nodeType": "Return",
"src": "3634:65:44"
}
]
},
"id": 3458,
"nodeType": "IfStatement",
"src": "3524:182:44",
"trueBody": {
"id": 3444,
"nodeType": "Block",
"src": "3586:34:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3442,
"name": "totalBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3416,
"src": "3601:12:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3407,
"id": 3443,
"nodeType": "Return",
"src": "3594:19:44"
}
]
}
},
"id": 3459,
"nodeType": "IfStatement",
"src": "3466:240:44",
"trueBody": {
"id": 3430,
"nodeType": "Block",
"src": "3495:23:44",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3428,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3510:1:44",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 3407,
"id": 3429,
"nodeType": "Return",
"src": "3503:8:44"
}
]
}
}
]
},
"documentation": "@dev Calculates the amount that has already vested.\n@param token ERC20 token which is being vested",
"id": 3461,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "vestedAmount",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3404,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3403,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3461,
"src": "3295:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
},
"typeName": {
"contractScope": null,
"id": 3402,
"name": "ERC20Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2511,
"src": "3295:10:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Basic_$2511",
"typeString": "contract ERC20Basic"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3294:18:44"
},
"payable": false,
"returnParameters": {
"id": 3407,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3406,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3461,
"src": "3334:7:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3405,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3334:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3333:9:44"
},
"scope": 3462,
"src": "3273:437:44",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 3463,
"src": "468:3244:44"
}
],
"src": "48:3665:44"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-08-23T14:35:50.654Z"
}