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
e57f4be1
Commit
e57f4be1
authored
Jan 11, 2018
by
AugustoL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename SmartToken to ERC827
parent
a806520d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
ERC827TokenMock.sol
contracts/mocks/ERC827TokenMock.sol
+4
-4
ERC827.sol
contracts/token/ERC827.sol
+3
-3
ERC827Token.js
test/ERC827Token.js
+4
-4
No files found.
contracts/mocks/
Smart
TokenMock.sol
→
contracts/mocks/
ERC827
TokenMock.sol
View file @
e57f4be1
pragma solidity ^0.4.13;
import '../token/
SmartToken
.sol';
import '../token/
ERC827
.sol';
// mock class using
Smart
Token
contract
SmartTokenMock is SmartToken
{
// mock class using
ERC827
Token
contract
ERC827TokenMock is ERC827
{
function
Smart
TokenMock(address initialAccount, uint256 initialBalance) {
function
ERC827
TokenMock(address initialAccount, uint256 initialBalance) {
balances[initialAccount] = initialBalance;
totalSupply = initialBalance;
}
...
...
contracts/token/
SmartToken
.sol
→
contracts/token/
ERC827
.sol
View file @
e57f4be1
...
...
@@ -3,14 +3,14 @@ pragma solidity ^0.4.13;
import "./StandardToken.sol";
/**
@title
SmartToken
, an extension of ERC20 token standard
@title
ERC827
, an extension of ERC20 token standard
Implementation the
SmartToken
, following the ERC20 standard with extra
Implementation the
ERC827
, following the ERC20 standard with extra
methods to transfer value and data and execute calls in transfers and
approvals.
Uses OpenZeppelin StandardToken.
*/
contract
SmartToken
is StandardToken {
contract
ERC827
is StandardToken {
/**
@dev `approveData` is an addition to ERC20 token methods. It allows to
...
...
test/
Smart
Token.js
→
test/
ERC827
Token.js
View file @
e57f4be1
import
EVMRevert
from
'./helpers/EVMRevert'
;
var
Message
=
artifacts
.
require
(
'./mock/MessageHelper.sol'
);
var
SmartTokenMock
=
artifacts
.
require
(
'./mock/Smart
TokenMock.sol'
);
var
ERC827TokenMock
=
artifacts
.
require
(
'./mock/ERC827
TokenMock.sol'
);
var
BigNumber
=
web3
.
BigNumber
;
...
...
@@ -10,11 +10,11 @@ require('chai')
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
should
();
contract
(
'
Smart
Token'
,
function
(
accounts
)
{
contract
(
'
ERC827
Token'
,
function
(
accounts
)
{
let
token
;
beforeEach
(
async
function
()
{
token
=
await
Smart
TokenMock
.
new
(
accounts
[
0
],
100
);
token
=
await
ERC827
TokenMock
.
new
(
accounts
[
0
],
100
);
});
it
(
'should return the correct totalSupply after construction'
,
async
function
()
{
...
...
@@ -24,7 +24,7 @@ contract('SmartToken', function (accounts) {
});
it
(
'should return the correct allowance amount after approval'
,
async
function
()
{
let
token
=
await
Smart
TokenMock
.
new
();
let
token
=
await
ERC827
TokenMock
.
new
();
await
token
.
approve
(
accounts
[
1
],
100
);
let
allowance
=
await
token
.
allowance
(
accounts
[
0
],
accounts
[
1
]);
...
...
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