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
7bd95b1e
Commit
7bd95b1e
authored
Jan 11, 2018
by
AugustoL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Overload ERC20 funcitons with new _data argument
parent
4ecdf312
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ERC827.sol
contracts/token/ERC827.sol
+4
-4
ERC827Token.js
test/ERC827Token.js
+0
-0
No files found.
contracts/token/ERC827.sol
View file @
7bd95b1e
...
@@ -13,7 +13,7 @@ import "./StandardToken.sol";
...
@@ -13,7 +13,7 @@ import "./StandardToken.sol";
contract ERC827 is StandardToken {
contract ERC827 is StandardToken {
/**
/**
@dev
`approveData` is an a
ddition to ERC20 token methods. It allows to
@dev
A
ddition to ERC20 token methods. It allows to
approve the transfer of value and execute a call with the sent data.
approve the transfer of value and execute a call with the sent data.
Beware that changing an allowance with this method brings the risk that
Beware that changing an allowance with this method brings the risk that
...
@@ -29,7 +29,7 @@ contract ERC827 is StandardToken {
...
@@ -29,7 +29,7 @@ contract ERC827 is StandardToken {
@return true if the call function was executed successfully
@return true if the call function was executed successfully
*/
*/
function approve
Data
(address _spender, uint256 _value, bytes _data) public returns (bool) {
function approve(address _spender, uint256 _value, bytes _data) public returns (bool) {
require(_spender != address(this));
require(_spender != address(this));
super.approve(_spender, _value);
super.approve(_spender, _value);
...
@@ -49,7 +49,7 @@ contract ERC827 is StandardToken {
...
@@ -49,7 +49,7 @@ contract ERC827 is StandardToken {
@return true if the call function was executed successfully
@return true if the call function was executed successfully
*/
*/
function transfer
Data
(address _to, uint256 _value, bytes _data) public returns (bool) {
function transfer(address _to, uint256 _value, bytes _data) public returns (bool) {
require(_to != address(this));
require(_to != address(this));
super.transfer(_to, _value);
super.transfer(_to, _value);
...
@@ -69,7 +69,7 @@ contract ERC827 is StandardToken {
...
@@ -69,7 +69,7 @@ contract ERC827 is StandardToken {
@return true if the call function was executed successfully
@return true if the call function was executed successfully
*/
*/
function transfer
Data
From(address _from, address _to, uint256 _value, bytes _data) public returns (bool) {
function transferFrom(address _from, address _to, uint256 _value, bytes _data) public returns (bool) {
require(_to != address(this));
require(_to != address(this));
super.transferFrom(_from, _to, _value);
super.transferFrom(_from, _to, _value);
...
...
test/ERC827Token.js
View file @
7bd95b1e
This diff is collapsed.
Click to expand it.
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