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
6139500e
Commit
6139500e
authored
Apr 03, 2017
by
Manuel Aráoz
Committed by
GitHub
Apr 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #180 from frangio/fix-179-rename-transferable
Rename `TransferableToken` to `LimitedTransferToken`
parents
025e7db7
0b88944b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
LimitedTransferToken.sol
contracts/token/LimitedTransferToken.sol
+5
-5
VestedToken.sol
contracts/token/VestedToken.sol
+2
-2
No files found.
contracts/token/
Transferable
Token.sol
→
contracts/token/
LimitedTransfer
Token.sol
View file @
6139500e
...
@@ -4,15 +4,15 @@ import "./ERC20.sol";
...
@@ -4,15 +4,15 @@ import "./ERC20.sol";
/*
/*
Transferable
Token defines the generic interface and the implementation
LimitedTransfer
Token defines the generic interface and the implementation
to limit token transferability for different events.
to limit token transferability for different events.
It is intended to be used as a base class for other token contracts.
It is intended to be used as a base class for other token contracts.
Over
-writ
ting transferableTokens(address holder, uint64 time) is the way to provide
Over
wri
ting transferableTokens(address holder, uint64 time) is the way to provide
the specific logic for limit
t
ing token transferability for a holder over time.
the specific logic for limiting token transferability for a holder over time.
TransferableToken has been designed to allow for different limit
ting factors,
LimitedTransferToken has been designed to allow for different limi
ting factors,
this can be achieved by recursively calling super.transferableTokens() until the
this can be achieved by recursively calling super.transferableTokens() until the
base class is hit. For example:
base class is hit. For example:
...
@@ -25,7 +25,7 @@ https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/Ve
...
@@ -25,7 +25,7 @@ https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/Ve
*/
*/
contract
Transferable
Token is ERC20 {
contract
LimitedTransfer
Token is ERC20 {
// Checks whether it can transfer or otherwise throws.
// Checks whether it can transfer or otherwise throws.
modifier canTransfer(address _sender, uint _value) {
modifier canTransfer(address _sender, uint _value) {
if (_value > transferableTokens(_sender, uint64(now))) throw;
if (_value > transferableTokens(_sender, uint64(now))) throw;
...
...
contracts/token/VestedToken.sol
View file @
6139500e
...
@@ -2,9 +2,9 @@ pragma solidity ^0.4.8;
...
@@ -2,9 +2,9 @@ pragma solidity ^0.4.8;
import "./StandardToken.sol";
import "./StandardToken.sol";
import "./
Transferable
Token.sol";
import "./
LimitedTransfer
Token.sol";
contract VestedToken is StandardToken,
Transferable
Token {
contract VestedToken is StandardToken,
LimitedTransfer
Token {
struct TokenGrant {
struct TokenGrant {
address granter;
address granter;
uint256 value;
uint256 value;
...
...
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