* Update ERC721 to latest 1.11.0 from OpenZeppelin-solidity * Hardcode supported interfaces instead of using lookup table. This avoids shifting storage when extending supports interface. * Update build artifacts * Fix linter errors
7541 lines
329 KiB
JSON
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": "0x608060405234801561001057600080fd5b506116e9806100206000396000f3006080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630fb5a6b4146100eb57806313d033c0146101165780631726cbc8146101415780631916558714610198578063384711cc146101db57806338af3eed1461023257806374a8f10314610289578063872a7810146102cc5780638da5cb5b146102fb578063914a4ed7146103525780639852595c146103df578063be9a655514610436578063c0bac1a814610461578063c4d66de814610528578063f2fde38b1461056b578063fa01dc06146105ae575b600080fd5b3480156100f757600080fd5b50610100610609565b6040518082815260200191505060405180910390f35b34801561012257600080fd5b5061012b61060f565b6040518082815260200191505060405180910390f35b34801561014d57600080fd5b50610182600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610615565b6040518082815260200191505060405180910390f35b3480156101a457600080fd5b506101d9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610678565b005b3480156101e757600080fd5b5061021c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b1565b6040518082815260200191505060405180910390f35b34801561023e57600080fd5b506102476109b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029557600080fd5b506102ca600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109db565b005b3480156102d857600080fd5b506102e1610c7f565b604051808215151515815260200191505060405180910390f35b34801561030757600080fd5b50610310610c92565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035e57600080fd5b506103dd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803515159060200190929190505050610cb8565b005b3480156103eb57600080fd5b50610420600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611010565b6040518082815260200191505060405180910390f35b34801561044257600080fd5b5061044b611028565b6040518082815260200191505060405180910390f35b34801561046d57600080fd5b5061050e600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061102e565b604051808215151515815260200191505060405180910390f35b34801561053457600080fd5b50610569600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611119565b005b34801561057757600080fd5b506105ac600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113d7565b005b3480156105ba57600080fd5b506105ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061152f565b604051808215151515815260200191505060405180910390f35b60055481565b60035481565b6000610671600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610663846107b1565b61154f90919063ffffffff16565b9050919050565b600061068382610615565b905060008111151561069457600080fd5b6106e681600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461156890919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610776600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828473ffffffffffffffffffffffffffffffffffffffff166115849092919063ffffffff16565b7ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c565816040518082815260200191505060405180910390a15050565b60008060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b505050506040513d602081101561087b57600080fd5b810190808051906020019092919050505091506108e0600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361156890919063ffffffff16565b90506003544210156108f557600092506109ae565b61090c60055460045461156890919063ffffffff16565b421015806109635750600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610970578092506109ae565b6109ab60055461099d61098e6004544261154f90919063ffffffff16565b8461166f90919063ffffffff16565b6116a790919063ffffffff16565b92505b5050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a3c57600080fd5b600660009054906101000a900460ff161515610a5757600080fd5b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610ab057600080fd5b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610b4b57600080fd5b505af1158015610b5f573d6000803e3d6000fd5b505050506040513d6020811015610b7557600080fd5b81019080805190602001909291905050509250610b9184610615565b9150610ba6828461154f90919063ffffffff16565b90506001600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610c4d600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828673ffffffffffffffffffffffffffffffffffffffff166115849092919063ffffffff16565b7f44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee660405160405180910390a150505050565b600660009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600c81526020017f546f6b656e56657374696e6700000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250610d2e828261102e565b151515610d3a57600080fd5b610d4388611119565b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614151515610d7f57600080fd5b838511151515610d8e57600080fd5b86600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600660006101000a81548160ff02191690831515021790555083600581905550610e03858761156890919063ffffffff16565b600381905550856004819055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610e77578082015181840152602081019050610e5c565b50505050905090810190601f168015610ea45780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610edd578082015181840152602081019050610ec2565b50505050905090810190601f168015610f0a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b602083101515610f535780518252602082019150602081019050602083039250610f2e565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515610fbc5780518252602082019150602081019050602083039250610f97565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff0219169083151502179055505050505050505050565b60076020528060005260406000206000915090505481565b60045481565b600080836040518082805190602001908083835b6020831015156110675780518252602082019150602081019050602083039250611042565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156110d057805182526020820191506020810190506020830392506110ab565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b6040805190810160405280600781526020017f4f776e61626c65000000000000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e3000000000000000000000000000000000000000000000000000000081525061118f828261102e565b15151561119b57600080fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611243578082015181840152602081019050611228565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156112a957808201518184015260208101905061128e565b50505050905090810190601f1680156112d65780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b60208310151561131f57805182526020820191506020810190506020830392506112fa565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156113885780518252602082019150602081019050602083039250611363565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561146f57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60086020528060005260406000206000915054906101000a900460ff1681565b600082821115151561155d57fe5b818303905092915050565b6000818301905082811015151561157b57fe5b80905092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b505050506040513d602081101561165157600080fd5b8101908080519060200190929190505050151561166a57fe5b505050565b60008083141561168257600090506116a1565b818302905081838281151561169357fe5b0414151561169d57fe5b8090505b92915050565b600081838115156116b457fe5b049050929150505600a165627a7a72305820554e928f0600bea2cf1981a656fc751b8fd102742f802c40328a22062cc6cc630029",
|
|
"deployedBytecode": "0x6080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630fb5a6b4146100eb57806313d033c0146101165780631726cbc8146101415780631916558714610198578063384711cc146101db57806338af3eed1461023257806374a8f10314610289578063872a7810146102cc5780638da5cb5b146102fb578063914a4ed7146103525780639852595c146103df578063be9a655514610436578063c0bac1a814610461578063c4d66de814610528578063f2fde38b1461056b578063fa01dc06146105ae575b600080fd5b3480156100f757600080fd5b50610100610609565b6040518082815260200191505060405180910390f35b34801561012257600080fd5b5061012b61060f565b6040518082815260200191505060405180910390f35b34801561014d57600080fd5b50610182600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610615565b6040518082815260200191505060405180910390f35b3480156101a457600080fd5b506101d9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610678565b005b3480156101e757600080fd5b5061021c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b1565b6040518082815260200191505060405180910390f35b34801561023e57600080fd5b506102476109b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029557600080fd5b506102ca600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109db565b005b3480156102d857600080fd5b506102e1610c7f565b604051808215151515815260200191505060405180910390f35b34801561030757600080fd5b50610310610c92565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035e57600080fd5b506103dd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803515159060200190929190505050610cb8565b005b3480156103eb57600080fd5b50610420600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611010565b6040518082815260200191505060405180910390f35b34801561044257600080fd5b5061044b611028565b6040518082815260200191505060405180910390f35b34801561046d57600080fd5b5061050e600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061102e565b604051808215151515815260200191505060405180910390f35b34801561053457600080fd5b50610569600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611119565b005b34801561057757600080fd5b506105ac600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113d7565b005b3480156105ba57600080fd5b506105ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061152f565b604051808215151515815260200191505060405180910390f35b60055481565b60035481565b6000610671600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610663846107b1565b61154f90919063ffffffff16565b9050919050565b600061068382610615565b905060008111151561069457600080fd5b6106e681600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461156890919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610776600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828473ffffffffffffffffffffffffffffffffffffffff166115849092919063ffffffff16565b7ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c565816040518082815260200191505060405180910390a15050565b60008060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b505050506040513d602081101561087b57600080fd5b810190808051906020019092919050505091506108e0600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361156890919063ffffffff16565b90506003544210156108f557600092506109ae565b61090c60055460045461156890919063ffffffff16565b421015806109635750600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610970578092506109ae565b6109ab60055461099d61098e6004544261154f90919063ffffffff16565b8461166f90919063ffffffff16565b6116a790919063ffffffff16565b92505b5050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a3c57600080fd5b600660009054906101000a900460ff161515610a5757600080fd5b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610ab057600080fd5b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610b4b57600080fd5b505af1158015610b5f573d6000803e3d6000fd5b505050506040513d6020811015610b7557600080fd5b81019080805190602001909291905050509250610b9184610615565b9150610ba6828461154f90919063ffffffff16565b90506001600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610c4d600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828673ffffffffffffffffffffffffffffffffffffffff166115849092919063ffffffff16565b7f44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee660405160405180910390a150505050565b600660009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600c81526020017f546f6b656e56657374696e6700000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250610d2e828261102e565b151515610d3a57600080fd5b610d4388611119565b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614151515610d7f57600080fd5b838511151515610d8e57600080fd5b86600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600660006101000a81548160ff02191690831515021790555083600581905550610e03858761156890919063ffffffff16565b600381905550856004819055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610e77578082015181840152602081019050610e5c565b50505050905090810190601f168015610ea45780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610edd578082015181840152602081019050610ec2565b50505050905090810190601f168015610f0a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b602083101515610f535780518252602082019150602081019050602083039250610f2e565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b602083101515610fbc5780518252602082019150602081019050602083039250610f97565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff0219169083151502179055505050505050505050565b60076020528060005260406000206000915090505481565b60045481565b600080836040518082805190602001908083835b6020831015156110675780518252602082019150602081019050602083039250611042565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156110d057805182526020820191506020810190506020830392506110ab565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b6040805190810160405280600781526020017f4f776e61626c65000000000000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e3000000000000000000000000000000000000000000000000000000081525061118f828261102e565b15151561119b57600080fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611243578082015181840152602081019050611228565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156112a957808201518184015260208101905061128e565b50505050905090810190601f1680156112d65780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b60208310151561131f57805182526020820191506020810190506020830392506112fa565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156113885780518252602082019150602081019050602083039250611363565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561146f57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60086020528060005260406000206000915054906101000a900460ff1681565b600082821115151561155d57fe5b818303905092915050565b6000818301905082811015151561157b57fe5b80905092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b505050506040513d602081101561165157600080fd5b8101908080519060200190929190505050151561166a57fe5b505050565b60008083141561168257600090506116a1565b818302905081838281151561169357fe5b0414151561169d57fe5b8090505b92915050565b600081838115156116b457fe5b049050929150505600a165627a7a72305820554e928f0600bea2cf1981a656fc751b8fd102742f802c40328a22062cc6cc630029",
|
|
"sourceMap": "468:3244:46:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;468:3244:46;;;;;;;",
|
|
"deployedSourceMap": "468:3244:46:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;766:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;766:23:46;;;;;;;;;;;;;;;;;;;;;;;718:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;718:20:46;;;;;;;;;;;;;;;;;;;;;;;3016:132;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3016:132:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2047:265;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2047:265:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;3273:437;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3273:437:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;687:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;687:26:46;;;;;;;;;;;;;;;;;;;;;;;;;;;2520:342;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2520:342:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;794:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;794:21:46;;;;;;;;;;;;;;;;;;;;;;;;;;;307:20:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;307:20:27;;;;;;;;;;;;;;;;;;;;;;;;;;;1462:464:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1462:464:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;820:44;;8:9:-1;5:2;;;30:1;27;20:12;5:2;820:44:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;742:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;742:20:46;;;;;;;;;;;;;;;;;;;;;;;1950:140:54;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1950:140:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;537:104:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;537:104:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;949:174;;8:9:-1;5:2;;;30:1;27;20:12;5:2;949:174:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;868:40:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;868:40:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:46;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3374:21:46;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3374:21:46;;;;;;;;;;;;;;;;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:27;;;;;;;;;;;756:19;;:10;:19;;;748:28;;;;;;;;2585:9:46;;;;;;;;;;;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:46;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2650:21:46;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2650:21:46;;;;;;;;;;;;;;;;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:27:-;;;;;;;;;;;;;:::o;1462:464:46:-;1004:223:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:37;1094:12;1108:11;1083:10;:37::i;:::-;1082:38;1074:47;;;;;;;;1679:27:46;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:54;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:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:54;;;;;;;;;;;;;;;;;;;;;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:54;;;;;;;;;;;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;1462:464:46;;;;;;;;:::o;820:44::-;;;;;;;;;;;;;;;;;:::o;742:20::-;;;;:::o;1950:140:54:-;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:54;;;;;;;;;;;;;;;;;;;;;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:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2043:42;;1950:140;;;;:::o;537:104:27:-;1004:223:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:37;1094:12;1108:11;1083:10;:37::i;:::-;1082:38;1074:47;;;;;;;;629:7:27;621:5;;:15;;;;;;;;;;;;;;;;;;1139:35:54;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:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:54;;;;;;;;;;;;;;;;;;;;;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:54;;;;;;;;;;;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;537:104:27;;;:::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:46:-;;;;;;;;;;;;;;;;;;;;;;:::o;836:110:8:-;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:42:-;457:5;:14;;;472:2;476:5;457:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;457:25:42;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;457:25:42;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;457:25:42;;;;;;;;;;;;;;;;450:33;;;;;;368:120;;;:::o;203:167:8:-;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": [
|
|
3510
|
|
]
|
|
},
|
|
"id": 3511,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 3235,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "48:24:46"
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/ERC20Basic.sol",
|
|
"file": "./ERC20Basic.sol",
|
|
"id": 3236,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 2560,
|
|
"src": "74:26:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/SafeERC20.sol",
|
|
"file": "./SafeERC20.sol",
|
|
"id": 3237,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 2856,
|
|
"src": "101:25:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/ownership/Ownable.sol",
|
|
"file": "../../ownership/Ownable.sol",
|
|
"id": 3238,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 1629,
|
|
"src": "127:37:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol",
|
|
"file": "../../math/SafeMath.sol",
|
|
"id": 3239,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 580,
|
|
"src": "165:33:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "zos-lib/contracts/migrations/Migratable.sol",
|
|
"file": "zos-lib/contracts/migrations/Migratable.sol",
|
|
"id": 3240,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 4865,
|
|
"src": "199:53:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 3241,
|
|
"name": "Migratable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 4864,
|
|
"src": "493:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migratable_$4864",
|
|
"typeString": "contract Migratable"
|
|
}
|
|
},
|
|
"id": 3242,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "493:10:46"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 3243,
|
|
"name": "Ownable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1628,
|
|
"src": "505:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Ownable_$1628",
|
|
"typeString": "contract Ownable"
|
|
}
|
|
},
|
|
"id": 3244,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "505:7:46"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
1628,
|
|
4864
|
|
],
|
|
"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": 3510,
|
|
"linearizedBaseContracts": [
|
|
3510,
|
|
1628,
|
|
4864
|
|
],
|
|
"name": "TokenVesting",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 3247,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 3245,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 579,
|
|
"src": "523:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$579",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "517:27:46",
|
|
"typeName": {
|
|
"id": 3246,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "536:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 3250,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 3248,
|
|
"name": "SafeERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2855,
|
|
"src": "553:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$2855",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "547:31:46",
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3249,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "567:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 3254,
|
|
"name": "Released",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 3253,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3252,
|
|
"indexed": false,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3254,
|
|
"src": "597:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3251,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "597:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "596:16:46"
|
|
},
|
|
"src": "582:31:46"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 3256,
|
|
"name": "Revoked",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 3255,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "629:2:46"
|
|
},
|
|
"src": "616:16:46"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3258,
|
|
"name": "beneficiary",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "687:26:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3257,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "687:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3260,
|
|
"name": "cliff",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "718:20:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3259,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "718:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3262,
|
|
"name": "start",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "742:20:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3261,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "742:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3264,
|
|
"name": "duration",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "766:23:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3263,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "766:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3266,
|
|
"name": "revocable",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "794:21:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 3265,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "794:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3270,
|
|
"name": "released",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "820:44:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 3269,
|
|
"keyType": {
|
|
"id": 3267,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "829:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "820:28:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 3268,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "840:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3274,
|
|
"name": "revoked",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "868:40:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
},
|
|
"typeName": {
|
|
"id": 3273,
|
|
"keyType": {
|
|
"id": 3271,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "877:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "868:25:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
},
|
|
"valueType": {
|
|
"id": 3272,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "888:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3336,
|
|
"nodeType": "Block",
|
|
"src": "1673:253:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3296,
|
|
"name": "_sender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3276,
|
|
"src": "1698:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3293,
|
|
"name": "Ownable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1628,
|
|
"src": "1679:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Ownable_$1628_$",
|
|
"typeString": "type(contract Ownable)"
|
|
}
|
|
},
|
|
"id": 3295,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "initialize",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1591,
|
|
"src": "1679:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 3297,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1679:27:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3298,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1679:27:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 3304,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3300,
|
|
"name": "_beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3278,
|
|
"src": "1721:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 3302,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1745:1:46",
|
|
"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": 3301,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1737:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 3303,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1737:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1721:26:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3299,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "1713:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3305,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1713:35:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3306,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1713:35:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3308,
|
|
"name": "_cliff",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3282,
|
|
"src": "1762:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3309,
|
|
"name": "_duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3284,
|
|
"src": "1772:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1762:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3307,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "1754:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3311,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1754:28:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3312,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1754:28:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3315,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3313,
|
|
"name": "beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3258,
|
|
"src": "1789:11:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3314,
|
|
"name": "_beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3278,
|
|
"src": "1803:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1789:26:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 3316,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1789:26:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3319,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3317,
|
|
"name": "revocable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3266,
|
|
"src": "1821:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3318,
|
|
"name": "_revocable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3286,
|
|
"src": "1833:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "1821:22:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 3320,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1821:22:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3323,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3321,
|
|
"name": "duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3264,
|
|
"src": "1849:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3322,
|
|
"name": "_duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3284,
|
|
"src": "1860:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1849:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3324,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1849:20:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3330,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3325,
|
|
"name": "cliff",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3260,
|
|
"src": "1875:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3328,
|
|
"name": "_cliff",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3282,
|
|
"src": "1894:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3326,
|
|
"name": "_start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3280,
|
|
"src": "1883:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3327,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "1883:10:46",
|
|
"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": 3329,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1883:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1875:26:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3331,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1875:26:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3334,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3332,
|
|
"name": "start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3262,
|
|
"src": "1907:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3333,
|
|
"name": "_start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3280,
|
|
"src": "1915:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1907:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3335,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1907:14:46"
|
|
}
|
|
]
|
|
},
|
|
"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": 3337,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "546f6b656e56657374696e67",
|
|
"id": 3289,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1646:14:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_e0d70f1cfb5d37122c7d281c78f46fb60f53015666030a7a749c1365febf4541",
|
|
"typeString": "literal_string \"TokenVesting\""
|
|
},
|
|
"value": "TokenVesting"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "312e392e30",
|
|
"id": 3290,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1662:7:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_48b337767c221abef259fe87e655d8fa1026fb5e60ec68ad68fa7e00bb7f050c",
|
|
"typeString": "literal_string \"1.9.0\""
|
|
},
|
|
"value": "1.9.0"
|
|
}
|
|
],
|
|
"id": 3291,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 3288,
|
|
"name": "isInitializer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4811,
|
|
"src": "1632:13:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_string_memory_ptr_$",
|
|
"typeString": "modifier (string memory,string memory)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1632:38:46"
|
|
}
|
|
],
|
|
"name": "initialize",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3287,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3276,
|
|
"name": "_sender",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1487:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3275,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1487:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3278,
|
|
"name": "_beneficiary",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1508:20:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3277,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1508:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3280,
|
|
"name": "_start",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1534:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3279,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1534:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3282,
|
|
"name": "_cliff",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1554:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3281,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1554:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3284,
|
|
"name": "_duration",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1574:17:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3283,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1574:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3286,
|
|
"name": "_revocable",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1597:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 3285,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1597:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1481:135:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3292,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1673:0:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "1462:464:46",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3376,
|
|
"nodeType": "Block",
|
|
"src": "2089:223:46",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
3343
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3343,
|
|
"name": "unreleased",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3377,
|
|
"src": "2095:18:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3342,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2095:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3347,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3345,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3339,
|
|
"src": "2133:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
],
|
|
"id": 3344,
|
|
"name": "releasableAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3449,
|
|
"src": "2116:16:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2559_$returns$_t_uint256_$",
|
|
"typeString": "function (contract ERC20Basic) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3346,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2116:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2095:44:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3351,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3349,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3343,
|
|
"src": "2154:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 3350,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2167:1:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2154:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3348,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "2146:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3352,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2146:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3353,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2146:23:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3363,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3354,
|
|
"name": "released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3270,
|
|
"src": "2176:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 3356,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3355,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3339,
|
|
"src": "2185:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2176:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3361,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3343,
|
|
"src": "2214:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3357,
|
|
"name": "released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3270,
|
|
"src": "2194:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 3359,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3358,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3339,
|
|
"src": "2203:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2194:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3360,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "2194:19:46",
|
|
"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": 3362,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2194:31:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2176:49:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3364,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2176:49:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3368,
|
|
"name": "beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3258,
|
|
"src": "2251:11:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3369,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3343,
|
|
"src": "2264:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3365,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3339,
|
|
"src": "2232:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3367,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2815,
|
|
"src": "2232:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Basic_$2559_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20Basic_$2559_$",
|
|
"typeString": "function (contract ERC20Basic,address,uint256)"
|
|
}
|
|
},
|
|
"id": 3370,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2232:43:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3371,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2232:43:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3373,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3343,
|
|
"src": "2296:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 3372,
|
|
"name": "Released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3254,
|
|
"src": "2287:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 3374,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2287:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3375,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2282:25:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@notice Transfers vested tokens to beneficiary.\n@param token ERC20 token which is being vested",
|
|
"id": 3377,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "release",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3340,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3339,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3377,
|
|
"src": "2064:16:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3338,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "2064:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2063:18:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3341,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2089:0:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "2047:265:46",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3431,
|
|
"nodeType": "Block",
|
|
"src": "2571:291:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3385,
|
|
"name": "revocable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3266,
|
|
"src": "2585:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3384,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "2577:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3386,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2577:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3387,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2577:18:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3392,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "!",
|
|
"prefix": true,
|
|
"src": "2609:15:46",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3389,
|
|
"name": "revoked",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3274,
|
|
"src": "2610:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
}
|
|
},
|
|
"id": 3391,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3390,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2618:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2610:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3388,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "2601:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3393,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2601:24:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3394,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2601:24:46"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3396
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3396,
|
|
"name": "balance",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3432,
|
|
"src": "2632:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3395,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2632:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3401,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3399,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 5004,
|
|
"src": "2666:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_TokenVesting_$3510",
|
|
"typeString": "contract TokenVesting"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_TokenVesting_$3510",
|
|
"typeString": "contract TokenVesting"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3397,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2650:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3398,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balanceOf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2541,
|
|
"src": "2650:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3400,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2650:21:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2632:39:46"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3403
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3403,
|
|
"name": "unreleased",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3432,
|
|
"src": "2678:18:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3402,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2678:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3407,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3405,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2716:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
],
|
|
"id": 3404,
|
|
"name": "releasableAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3449,
|
|
"src": "2699:16:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2559_$returns$_t_uint256_$",
|
|
"typeString": "function (contract ERC20Basic) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3406,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2699:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2678:44:46"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3409
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3409,
|
|
"name": "refund",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3432,
|
|
"src": "2728:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3408,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2728:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3414,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3412,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3403,
|
|
"src": "2757:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3410,
|
|
"name": "balance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3396,
|
|
"src": "2745:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3411,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 554,
|
|
"src": "2745:11:46",
|
|
"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": 3413,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2745:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2728:40:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3419,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3415,
|
|
"name": "revoked",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3274,
|
|
"src": "2775:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
}
|
|
},
|
|
"id": 3417,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3416,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2783:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2775:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 3418,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2792:4:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"src": "2775:21:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 3420,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2775:21:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3424,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1571,
|
|
"src": "2822:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3425,
|
|
"name": "refund",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3409,
|
|
"src": "2829:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3421,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2803:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3423,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2815,
|
|
"src": "2803:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Basic_$2559_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20Basic_$2559_$",
|
|
"typeString": "function (contract ERC20Basic,address,uint256)"
|
|
}
|
|
},
|
|
"id": 3426,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2803:33:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3427,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2803:33:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 3428,
|
|
"name": "Revoked",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3256,
|
|
"src": "2848:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$__$returns$__$",
|
|
"typeString": "function ()"
|
|
}
|
|
},
|
|
"id": 3429,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2848:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3430,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2843:14:46"
|
|
}
|
|
]
|
|
},
|
|
"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": 3432,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 3382,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 3381,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1602,
|
|
"src": "2561:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2561:9:46"
|
|
}
|
|
],
|
|
"name": "revoke",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3380,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3379,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3432,
|
|
"src": "2536:16:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3378,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "2536:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2535:18:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3383,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2571:0:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "2520:342:46",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3448,
|
|
"nodeType": "Block",
|
|
"src": "3090:58:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3443,
|
|
"name": "released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3270,
|
|
"src": "3127:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 3445,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3444,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3434,
|
|
"src": "3136:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3127:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3440,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3434,
|
|
"src": "3116:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
],
|
|
"id": 3439,
|
|
"name": "vestedAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3509,
|
|
"src": "3103:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2559_$returns$_t_uint256_$",
|
|
"typeString": "function (contract ERC20Basic) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3441,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3103:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3442,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 554,
|
|
"src": "3103:23:46",
|
|
"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": 3446,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3103:40:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 3438,
|
|
"id": 3447,
|
|
"nodeType": "Return",
|
|
"src": "3096:47:46"
|
|
}
|
|
]
|
|
},
|
|
"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": 3449,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "releasableAmount",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3435,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3434,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3449,
|
|
"src": "3042:16:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3433,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "3042:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3041:18:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3438,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3437,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3449,
|
|
"src": "3081:7:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3436,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3081:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3080:9:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "3016:132:46",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3508,
|
|
"nodeType": "Block",
|
|
"src": "3343:367:46",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
3457
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3457,
|
|
"name": "currentBalance",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3509,
|
|
"src": "3349:22:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3456,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3349:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3462,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3460,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 5004,
|
|
"src": "3390:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_TokenVesting_$3510",
|
|
"typeString": "contract TokenVesting"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_TokenVesting_$3510",
|
|
"typeString": "contract TokenVesting"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3458,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3451,
|
|
"src": "3374:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3459,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balanceOf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2541,
|
|
"src": "3374:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3461,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3374:21:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3349:46:46"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3464
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3464,
|
|
"name": "totalBalance",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3509,
|
|
"src": "3401:20:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3463,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3401:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3471,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3467,
|
|
"name": "released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3270,
|
|
"src": "3443:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 3469,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3468,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3451,
|
|
"src": "3452:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3443:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3465,
|
|
"name": "currentBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3457,
|
|
"src": "3424:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3466,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "3424:18:46",
|
|
"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": 3470,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3424:35:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3401:58:46"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3475,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3472,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4869,
|
|
"src": "3470:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3473,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3470:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3474,
|
|
"name": "cliff",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3260,
|
|
"src": "3488:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3470:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 3489,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3485,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3479,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4869,
|
|
"src": "3528:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3480,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3528:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3483,
|
|
"name": "duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3264,
|
|
"src": "3557:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3481,
|
|
"name": "start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3262,
|
|
"src": "3547:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3482,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "3547:9:46",
|
|
"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": 3484,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3547:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3528:38:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3486,
|
|
"name": "revoked",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3274,
|
|
"src": "3570:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
}
|
|
},
|
|
"id": 3488,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3487,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3451,
|
|
"src": "3578:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3570:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "3528:56:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 3505,
|
|
"nodeType": "Block",
|
|
"src": "3626:80:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3502,
|
|
"name": "duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3264,
|
|
"src": "3690:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3498,
|
|
"name": "start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3262,
|
|
"src": "3678:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3495,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4869,
|
|
"src": "3658:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3496,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3658:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3497,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 554,
|
|
"src": "3658:19:46",
|
|
"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": 3499,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3658:26:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3493,
|
|
"name": "totalBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3464,
|
|
"src": "3641:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3494,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 520,
|
|
"src": "3641:16:46",
|
|
"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": 3500,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3641:44:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3501,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "div",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 534,
|
|
"src": "3641:48:46",
|
|
"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": 3503,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3641:58:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 3455,
|
|
"id": 3504,
|
|
"nodeType": "Return",
|
|
"src": "3634:65:46"
|
|
}
|
|
]
|
|
},
|
|
"id": 3506,
|
|
"nodeType": "IfStatement",
|
|
"src": "3524:182:46",
|
|
"trueBody": {
|
|
"id": 3492,
|
|
"nodeType": "Block",
|
|
"src": "3586:34:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3490,
|
|
"name": "totalBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3464,
|
|
"src": "3601:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 3455,
|
|
"id": 3491,
|
|
"nodeType": "Return",
|
|
"src": "3594:19:46"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 3507,
|
|
"nodeType": "IfStatement",
|
|
"src": "3466:240:46",
|
|
"trueBody": {
|
|
"id": 3478,
|
|
"nodeType": "Block",
|
|
"src": "3495:23:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 3476,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3510:1:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"functionReturnParameters": 3455,
|
|
"id": 3477,
|
|
"nodeType": "Return",
|
|
"src": "3503:8:46"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Calculates the amount that has already vested.\n@param token ERC20 token which is being vested",
|
|
"id": 3509,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "vestedAmount",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3452,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3451,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3509,
|
|
"src": "3295:16:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3450,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "3295:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3294:18:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3455,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3454,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3509,
|
|
"src": "3334:7:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3453,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3334:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3333:9:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "3273:437:46",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 3511,
|
|
"src": "468:3244:46"
|
|
}
|
|
],
|
|
"src": "48:3665:46"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/TokenVesting.sol",
|
|
"exportedSymbols": {
|
|
"TokenVesting": [
|
|
3510
|
|
]
|
|
},
|
|
"id": 3511,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 3235,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "48:24:46"
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/ERC20Basic.sol",
|
|
"file": "./ERC20Basic.sol",
|
|
"id": 3236,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 2560,
|
|
"src": "74:26:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC20/SafeERC20.sol",
|
|
"file": "./SafeERC20.sol",
|
|
"id": 3237,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 2856,
|
|
"src": "101:25:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/ownership/Ownable.sol",
|
|
"file": "../../ownership/Ownable.sol",
|
|
"id": 3238,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 1629,
|
|
"src": "127:37:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol",
|
|
"file": "../../math/SafeMath.sol",
|
|
"id": 3239,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 580,
|
|
"src": "165:33:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "zos-lib/contracts/migrations/Migratable.sol",
|
|
"file": "zos-lib/contracts/migrations/Migratable.sol",
|
|
"id": 3240,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 3511,
|
|
"sourceUnit": 4865,
|
|
"src": "199:53:46",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 3241,
|
|
"name": "Migratable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 4864,
|
|
"src": "493:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migratable_$4864",
|
|
"typeString": "contract Migratable"
|
|
}
|
|
},
|
|
"id": 3242,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "493:10:46"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 3243,
|
|
"name": "Ownable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1628,
|
|
"src": "505:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Ownable_$1628",
|
|
"typeString": "contract Ownable"
|
|
}
|
|
},
|
|
"id": 3244,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "505:7:46"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
1628,
|
|
4864
|
|
],
|
|
"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": 3510,
|
|
"linearizedBaseContracts": [
|
|
3510,
|
|
1628,
|
|
4864
|
|
],
|
|
"name": "TokenVesting",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 3247,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 3245,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 579,
|
|
"src": "523:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$579",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "517:27:46",
|
|
"typeName": {
|
|
"id": 3246,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "536:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 3250,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 3248,
|
|
"name": "SafeERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2855,
|
|
"src": "553:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$2855",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "547:31:46",
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3249,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "567:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 3254,
|
|
"name": "Released",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 3253,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3252,
|
|
"indexed": false,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3254,
|
|
"src": "597:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3251,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "597:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "596:16:46"
|
|
},
|
|
"src": "582:31:46"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 3256,
|
|
"name": "Revoked",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 3255,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "629:2:46"
|
|
},
|
|
"src": "616:16:46"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3258,
|
|
"name": "beneficiary",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "687:26:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3257,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "687:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3260,
|
|
"name": "cliff",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "718:20:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3259,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "718:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3262,
|
|
"name": "start",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "742:20:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3261,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "742:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3264,
|
|
"name": "duration",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "766:23:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3263,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "766:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3266,
|
|
"name": "revocable",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "794:21:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 3265,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "794:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3270,
|
|
"name": "released",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "820:44:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 3269,
|
|
"keyType": {
|
|
"id": 3267,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "829:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "820:28:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 3268,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "840:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3274,
|
|
"name": "revoked",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3510,
|
|
"src": "868:40:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
},
|
|
"typeName": {
|
|
"id": 3273,
|
|
"keyType": {
|
|
"id": 3271,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "877:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "868:25:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
},
|
|
"valueType": {
|
|
"id": 3272,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "888:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3336,
|
|
"nodeType": "Block",
|
|
"src": "1673:253:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3296,
|
|
"name": "_sender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3276,
|
|
"src": "1698:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3293,
|
|
"name": "Ownable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1628,
|
|
"src": "1679:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Ownable_$1628_$",
|
|
"typeString": "type(contract Ownable)"
|
|
}
|
|
},
|
|
"id": 3295,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "initialize",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1591,
|
|
"src": "1679:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 3297,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1679:27:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3298,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1679:27:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 3304,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3300,
|
|
"name": "_beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3278,
|
|
"src": "1721:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 3302,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1745:1:46",
|
|
"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": 3301,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1737:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 3303,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1737:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1721:26:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3299,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "1713:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3305,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1713:35:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3306,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1713:35:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3308,
|
|
"name": "_cliff",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3282,
|
|
"src": "1762:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3309,
|
|
"name": "_duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3284,
|
|
"src": "1772:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1762:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3307,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "1754:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3311,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1754:28:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3312,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1754:28:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3315,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3313,
|
|
"name": "beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3258,
|
|
"src": "1789:11:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3314,
|
|
"name": "_beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3278,
|
|
"src": "1803:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1789:26:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 3316,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1789:26:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3319,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3317,
|
|
"name": "revocable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3266,
|
|
"src": "1821:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3318,
|
|
"name": "_revocable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3286,
|
|
"src": "1833:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "1821:22:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 3320,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1821:22:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3323,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3321,
|
|
"name": "duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3264,
|
|
"src": "1849:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3322,
|
|
"name": "_duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3284,
|
|
"src": "1860:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1849:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3324,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1849:20:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3330,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3325,
|
|
"name": "cliff",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3260,
|
|
"src": "1875:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3328,
|
|
"name": "_cliff",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3282,
|
|
"src": "1894:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3326,
|
|
"name": "_start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3280,
|
|
"src": "1883:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3327,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "1883:10:46",
|
|
"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": 3329,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1883:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1875:26:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3331,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1875:26:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3334,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3332,
|
|
"name": "start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3262,
|
|
"src": "1907:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3333,
|
|
"name": "_start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3280,
|
|
"src": "1915:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1907:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3335,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1907:14:46"
|
|
}
|
|
]
|
|
},
|
|
"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": 3337,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "546f6b656e56657374696e67",
|
|
"id": 3289,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1646:14:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_e0d70f1cfb5d37122c7d281c78f46fb60f53015666030a7a749c1365febf4541",
|
|
"typeString": "literal_string \"TokenVesting\""
|
|
},
|
|
"value": "TokenVesting"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "312e392e30",
|
|
"id": 3290,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1662:7:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_48b337767c221abef259fe87e655d8fa1026fb5e60ec68ad68fa7e00bb7f050c",
|
|
"typeString": "literal_string \"1.9.0\""
|
|
},
|
|
"value": "1.9.0"
|
|
}
|
|
],
|
|
"id": 3291,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 3288,
|
|
"name": "isInitializer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4811,
|
|
"src": "1632:13:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_string_memory_ptr_$",
|
|
"typeString": "modifier (string memory,string memory)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1632:38:46"
|
|
}
|
|
],
|
|
"name": "initialize",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3287,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3276,
|
|
"name": "_sender",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1487:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3275,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1487:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3278,
|
|
"name": "_beneficiary",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1508:20:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 3277,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1508:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3280,
|
|
"name": "_start",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1534:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3279,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1534:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3282,
|
|
"name": "_cliff",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1554:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3281,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1554:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3284,
|
|
"name": "_duration",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1574:17:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3283,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1574:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3286,
|
|
"name": "_revocable",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3337,
|
|
"src": "1597:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 3285,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1597:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1481:135:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3292,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1673:0:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "1462:464:46",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3376,
|
|
"nodeType": "Block",
|
|
"src": "2089:223:46",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
3343
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3343,
|
|
"name": "unreleased",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3377,
|
|
"src": "2095:18:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3342,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2095:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3347,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3345,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3339,
|
|
"src": "2133:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
],
|
|
"id": 3344,
|
|
"name": "releasableAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3449,
|
|
"src": "2116:16:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2559_$returns$_t_uint256_$",
|
|
"typeString": "function (contract ERC20Basic) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3346,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2116:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2095:44:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3351,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3349,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3343,
|
|
"src": "2154:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 3350,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2167:1:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2154:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3348,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "2146:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3352,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2146:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3353,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2146:23:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3363,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3354,
|
|
"name": "released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3270,
|
|
"src": "2176:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 3356,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3355,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3339,
|
|
"src": "2185:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2176:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3361,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3343,
|
|
"src": "2214:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3357,
|
|
"name": "released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3270,
|
|
"src": "2194:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 3359,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3358,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3339,
|
|
"src": "2203:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2194:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3360,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "2194:19:46",
|
|
"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": 3362,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2194:31:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2176:49:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3364,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2176:49:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3368,
|
|
"name": "beneficiary",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3258,
|
|
"src": "2251:11:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3369,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3343,
|
|
"src": "2264:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3365,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3339,
|
|
"src": "2232:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3367,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2815,
|
|
"src": "2232:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Basic_$2559_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20Basic_$2559_$",
|
|
"typeString": "function (contract ERC20Basic,address,uint256)"
|
|
}
|
|
},
|
|
"id": 3370,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2232:43:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3371,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2232:43:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3373,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3343,
|
|
"src": "2296:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 3372,
|
|
"name": "Released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3254,
|
|
"src": "2287:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 3374,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2287:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3375,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2282:25:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@notice Transfers vested tokens to beneficiary.\n@param token ERC20 token which is being vested",
|
|
"id": 3377,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "release",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3340,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3339,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3377,
|
|
"src": "2064:16:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3338,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "2064:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2063:18:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3341,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2089:0:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "2047:265:46",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3431,
|
|
"nodeType": "Block",
|
|
"src": "2571:291:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3385,
|
|
"name": "revocable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3266,
|
|
"src": "2585:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3384,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "2577:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3386,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2577:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3387,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2577:18:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3392,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "!",
|
|
"prefix": true,
|
|
"src": "2609:15:46",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3389,
|
|
"name": "revoked",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3274,
|
|
"src": "2610:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
}
|
|
},
|
|
"id": 3391,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3390,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2618:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2610:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 3388,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4882,
|
|
4883
|
|
],
|
|
"referencedDeclaration": 4882,
|
|
"src": "2601:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 3393,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2601:24:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3394,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2601:24:46"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3396
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3396,
|
|
"name": "balance",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3432,
|
|
"src": "2632:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3395,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2632:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3401,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3399,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 5004,
|
|
"src": "2666:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_TokenVesting_$3510",
|
|
"typeString": "contract TokenVesting"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_TokenVesting_$3510",
|
|
"typeString": "contract TokenVesting"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3397,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2650:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3398,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balanceOf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2541,
|
|
"src": "2650:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3400,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2650:21:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2632:39:46"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3403
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3403,
|
|
"name": "unreleased",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3432,
|
|
"src": "2678:18:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3402,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2678:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3407,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3405,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2716:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
],
|
|
"id": 3404,
|
|
"name": "releasableAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3449,
|
|
"src": "2699:16:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2559_$returns$_t_uint256_$",
|
|
"typeString": "function (contract ERC20Basic) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3406,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2699:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2678:44:46"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3409
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3409,
|
|
"name": "refund",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3432,
|
|
"src": "2728:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3408,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2728:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3414,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3412,
|
|
"name": "unreleased",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3403,
|
|
"src": "2757:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3410,
|
|
"name": "balance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3396,
|
|
"src": "2745:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3411,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 554,
|
|
"src": "2745:11:46",
|
|
"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": 3413,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2745:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2728:40:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3419,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3415,
|
|
"name": "revoked",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3274,
|
|
"src": "2775:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
}
|
|
},
|
|
"id": 3417,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3416,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2783:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2775:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 3418,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2792:4:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"src": "2775:21:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 3420,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2775:21:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3424,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1571,
|
|
"src": "2822:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3425,
|
|
"name": "refund",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3409,
|
|
"src": "2829:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3421,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3379,
|
|
"src": "2803:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3423,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2815,
|
|
"src": "2803:18:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Basic_$2559_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20Basic_$2559_$",
|
|
"typeString": "function (contract ERC20Basic,address,uint256)"
|
|
}
|
|
},
|
|
"id": 3426,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2803:33:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3427,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2803:33:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 3428,
|
|
"name": "Revoked",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3256,
|
|
"src": "2848:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$__$returns$__$",
|
|
"typeString": "function ()"
|
|
}
|
|
},
|
|
"id": 3429,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2848:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3430,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2843:14:46"
|
|
}
|
|
]
|
|
},
|
|
"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": 3432,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 3382,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 3381,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1602,
|
|
"src": "2561:9:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2561:9:46"
|
|
}
|
|
],
|
|
"name": "revoke",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3380,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3379,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3432,
|
|
"src": "2536:16:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3378,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "2536:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2535:18:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3383,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2571:0:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "2520:342:46",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3448,
|
|
"nodeType": "Block",
|
|
"src": "3090:58:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3443,
|
|
"name": "released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3270,
|
|
"src": "3127:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 3445,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3444,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3434,
|
|
"src": "3136:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3127:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3440,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3434,
|
|
"src": "3116:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
],
|
|
"id": 3439,
|
|
"name": "vestedAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3509,
|
|
"src": "3103:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_contract$_ERC20Basic_$2559_$returns$_t_uint256_$",
|
|
"typeString": "function (contract ERC20Basic) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3441,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3103:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3442,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 554,
|
|
"src": "3103:23:46",
|
|
"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": 3446,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3103:40:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 3438,
|
|
"id": 3447,
|
|
"nodeType": "Return",
|
|
"src": "3096:47:46"
|
|
}
|
|
]
|
|
},
|
|
"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": 3449,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "releasableAmount",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3435,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3434,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3449,
|
|
"src": "3042:16:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3433,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "3042:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3041:18:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3438,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3437,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3449,
|
|
"src": "3081:7:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3436,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3081:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3080:9:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "3016:132:46",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3508,
|
|
"nodeType": "Block",
|
|
"src": "3343:367:46",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
3457
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3457,
|
|
"name": "currentBalance",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3509,
|
|
"src": "3349:22:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3456,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3349:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3462,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3460,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 5004,
|
|
"src": "3390:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_TokenVesting_$3510",
|
|
"typeString": "contract TokenVesting"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_TokenVesting_$3510",
|
|
"typeString": "contract TokenVesting"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3458,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3451,
|
|
"src": "3374:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"id": 3459,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balanceOf",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2541,
|
|
"src": "3374:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 3461,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3374:21:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3349:46:46"
|
|
},
|
|
{
|
|
"assignments": [
|
|
3464
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 3464,
|
|
"name": "totalBalance",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3509,
|
|
"src": "3401:20:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3463,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3401:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 3471,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3467,
|
|
"name": "released",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3270,
|
|
"src": "3443:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 3469,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3468,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3451,
|
|
"src": "3452:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3443:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3465,
|
|
"name": "currentBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3457,
|
|
"src": "3424:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3466,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "3424:18:46",
|
|
"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": 3470,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3424:35:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3401:58:46"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3475,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3472,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4869,
|
|
"src": "3470:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3473,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3470:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3474,
|
|
"name": "cliff",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3260,
|
|
"src": "3488:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3470:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 3489,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3485,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3479,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4869,
|
|
"src": "3528:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3480,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3528:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3483,
|
|
"name": "duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3264,
|
|
"src": "3557:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3481,
|
|
"name": "start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3262,
|
|
"src": "3547:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3482,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "3547:9:46",
|
|
"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": 3484,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3547:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3528:38:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3486,
|
|
"name": "revoked",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3274,
|
|
"src": "3570:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
}
|
|
},
|
|
"id": 3488,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3487,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3451,
|
|
"src": "3578:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3570:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "3528:56:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 3505,
|
|
"nodeType": "Block",
|
|
"src": "3626:80:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3502,
|
|
"name": "duration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3264,
|
|
"src": "3690:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 3498,
|
|
"name": "start",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3262,
|
|
"src": "3678:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3495,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4869,
|
|
"src": "3658:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 3496,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3658:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3497,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 554,
|
|
"src": "3658:19:46",
|
|
"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": 3499,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3658:26:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3493,
|
|
"name": "totalBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3464,
|
|
"src": "3641:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3494,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 520,
|
|
"src": "3641:16:46",
|
|
"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": 3500,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3641:44:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3501,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "div",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 534,
|
|
"src": "3641:48:46",
|
|
"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": 3503,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3641:58:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 3455,
|
|
"id": 3504,
|
|
"nodeType": "Return",
|
|
"src": "3634:65:46"
|
|
}
|
|
]
|
|
},
|
|
"id": 3506,
|
|
"nodeType": "IfStatement",
|
|
"src": "3524:182:46",
|
|
"trueBody": {
|
|
"id": 3492,
|
|
"nodeType": "Block",
|
|
"src": "3586:34:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3490,
|
|
"name": "totalBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3464,
|
|
"src": "3601:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 3455,
|
|
"id": 3491,
|
|
"nodeType": "Return",
|
|
"src": "3594:19:46"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 3507,
|
|
"nodeType": "IfStatement",
|
|
"src": "3466:240:46",
|
|
"trueBody": {
|
|
"id": 3478,
|
|
"nodeType": "Block",
|
|
"src": "3495:23:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 3476,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3510:1:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"functionReturnParameters": 3455,
|
|
"id": 3477,
|
|
"nodeType": "Return",
|
|
"src": "3503:8:46"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Calculates the amount that has already vested.\n@param token ERC20 token which is being vested",
|
|
"id": 3509,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "vestedAmount",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 3452,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3451,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3509,
|
|
"src": "3295:16:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 3450,
|
|
"name": "ERC20Basic",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 2559,
|
|
"src": "3295:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20Basic_$2559",
|
|
"typeString": "contract ERC20Basic"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3294:18:46"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 3455,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 3454,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 3509,
|
|
"src": "3334:7:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3453,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3334:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3333:9:46"
|
|
},
|
|
"scope": 3510,
|
|
"src": "3273:437:46",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 3511,
|
|
"src": "468:3244:46"
|
|
}
|
|
],
|
|
"src": "48:3665:46"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.23+commit.124ca40d.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "2.0.0",
|
|
"updatedAt": "2018-08-27T20:45:00.217Z"
|
|
} |