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
61e33197
Commit
61e33197
authored
Apr 03, 2017
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename TransferableToken to LimitedTransferToken
fixes #179
parent
025e7db7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
LimitedTransferToken.sol
contracts/token/LimitedTransferToken.sol
+3
-3
VestedToken.sol
contracts/token/VestedToken.sol
+2
-2
No files found.
contracts/token/
Transferable
Token.sol
→
contracts/token/
LimitedTransfer
Token.sol
View file @
61e33197
...
@@ -4,7 +4,7 @@ import "./ERC20.sol";
...
@@ -4,7 +4,7 @@ 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.
...
@@ -12,7 +12,7 @@ It is intended to be used as a base class for other token contracts.
...
@@ -12,7 +12,7 @@ It is intended to be used as a base class for other token contracts.
Over-writting transferableTokens(address holder, uint64 time) is the way to provide
Over-writting transferableTokens(address holder, uint64 time) is the way to provide
the specific logic for limitting token transferability for a holder over time.
the specific logic for limitting token transferability for a holder over time.
Transferable
Token has been designed to allow for different limitting factors,
LimitedTransfer
Token has been designed to allow for different limitting 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 @
61e33197
...
@@ -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