Remove grantTokens without vesting function

pull/140/head
Jorge Izquierdo 8 years ago
parent 917b129517
commit f305382ef4
  1. 6
      contracts/token/GrantableToken.sol
  2. 2
      test/GrantableToken.js

@ -13,10 +13,6 @@ contract GrantableToken is StandardToken {
mapping (address => TokenGrant[]) public grants;
function grantTokens(address _to, uint256 _value) {
transfer(_to, _value);
}
function grantVestedTokens(address _to, uint256 _value, uint64 _start, uint64 _cliff, uint64 _vesting) {
if (_cliff < _start) throw;
if (_vesting < _start) throw;
@ -25,7 +21,7 @@ contract GrantableToken is StandardToken {
TokenGrant memory grant = TokenGrant({start: _start, value: _value, cliff: _cliff, vesting: _vesting, granter: msg.sender});
grants[_to].push(grant);
grantTokens(_to, _value);
transfer(_to, _value);
}
function revokeTokenGrant(address _holder, uint _grantId) {

@ -16,7 +16,7 @@ contract('GrantableToken', function(accounts) {
})
it('granter can grant tokens without vesting', async () => {
await token.grantTokens(receiver, tokenAmount, { from: granter })
await token.transfer(receiver, tokenAmount, { from: granter })
assert.equal(await token.balanceOf(receiver), tokenAmount);
assert.equal(await token.transferableTokens(receiver, +new Date()/1000), tokenAmount);

Loading…
Cancel
Save