Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
f305382e
Commit
f305382e
authored
Feb 10, 2017
by
Jorge Izquierdo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove grantTokens without vesting function
parent
917b1295
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
GrantableToken.sol
contracts/token/GrantableToken.sol
+1
-5
GrantableToken.js
test/GrantableToken.js
+1
-1
No files found.
contracts/token/GrantableToken.sol
View file @
f305382e
...
@@ -13,10 +13,6 @@ contract GrantableToken is StandardToken {
...
@@ -13,10 +13,6 @@ contract GrantableToken is StandardToken {
mapping (address => TokenGrant[]) public grants;
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) {
function grantVestedTokens(address _to, uint256 _value, uint64 _start, uint64 _cliff, uint64 _vesting) {
if (_cliff < _start) throw;
if (_cliff < _start) throw;
if (_vesting < _start) throw;
if (_vesting < _start) throw;
...
@@ -25,7 +21,7 @@ contract GrantableToken is StandardToken {
...
@@ -25,7 +21,7 @@ contract GrantableToken is StandardToken {
TokenGrant memory grant = TokenGrant({start: _start, value: _value, cliff: _cliff, vesting: _vesting, granter: msg.sender});
TokenGrant memory grant = TokenGrant({start: _start, value: _value, cliff: _cliff, vesting: _vesting, granter: msg.sender});
grants[_to].push(grant);
grants[_to].push(grant);
grantTokens
(_to, _value);
transfer
(_to, _value);
}
}
function revokeTokenGrant(address _holder, uint _grantId) {
function revokeTokenGrant(address _holder, uint _grantId) {
...
...
test/GrantableToken.js
View file @
f305382e
...
@@ -16,7 +16,7 @@ contract('GrantableToken', function(accounts) {
...
@@ -16,7 +16,7 @@ contract('GrantableToken', function(accounts) {
})
})
it
(
'granter can grant tokens without vesting'
,
async
()
=>
{
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
.
balanceOf
(
receiver
),
tokenAmount
);
assert
.
equal
(
await
token
.
transferableTokens
(
receiver
,
+
new
Date
()
/
1000
),
tokenAmount
);
assert
.
equal
(
await
token
.
transferableTokens
(
receiver
,
+
new
Date
()
/
1000
),
tokenAmount
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment