-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from AugustoL/refactor/remove-not-erc20-methods
refactor(contracts): Remove not native erc20 methods and fix line breaks
- Loading branch information
Showing
6 changed files
with
58 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pragma solidity ^0.5.0; | ||
|
||
|
||
import "./ERC827.sol"; | ||
|
||
|
||
// mock class using ERC827 Token | ||
contract ERC827Mock is ERC827 { | ||
|
||
constructor(address initialAccount, uint256 initialBalance) public ERC827() { | ||
_mint(initialAccount, initialBalance); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
pragma solidity ^0.5.2; | ||
|
||
|
||
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; | ||
|
||
|
||
/** | ||
* @title ERC827 interface, an extension of ERC20 token standard | ||
* | ||
* @dev Interface of a ERC827 token, following the ERC20 standard with extra | ||
* methods to transfer value and data and execute calls in transfers and | ||
* approvals. | ||
*/ | ||
contract IERC827 is IERC20 { | ||
function approveAndCall(address _spender, uint256 _value, bytes memory _data) | ||
public payable returns (bool); | ||
|
||
function transferAndCall(address _to, uint256 _value, bytes memory _data) | ||
public payable returns (bool); | ||
|
||
function transferFromAndCall( | ||
address _from, | ||
address _to, | ||
uint256 _value, | ||
bytes memory _data | ||
) | ||
public payable returns (bool); | ||
|
||
function increaseAllowanceAndCall( | ||
address _spender, uint _addedValue, bytes memory _data | ||
) | ||
public payable returns (bool); | ||
|
||
function decreaseAllowanceAndCall( | ||
address _spender, uint _subtractedValue, bytes memory _data | ||
) | ||
public payable returns (bool); | ||
interface IERC827 { | ||
|
||
function transfer(address to, uint256 value) external returns (bool); | ||
|
||
function approve(address spender, uint256 value) external returns (bool); | ||
|
||
function transferFrom(address from, address to, uint256 value) external returns (bool); | ||
|
||
function totalSupply() external view returns (uint256); | ||
|
||
function balanceOf(address who) external view returns (uint256); | ||
|
||
function allowance(address owner, address spender) external view returns (uint256); | ||
|
||
function approveAndCall(address _spender, uint256 _value, bytes calldata _data) | ||
external payable returns (bool); | ||
|
||
function transferAndCall(address _to, uint256 _value, bytes calldata _data) | ||
external payable returns (bool); | ||
|
||
function transferFromAndCall( | ||
address _from, address _to, uint256 _value, bytes calldata _data | ||
) external payable returns (bool); | ||
|
||
event Transfer(address indexed from, address indexed to, uint256 value); | ||
|
||
event Approval(address indexed owner, address indexed spender, uint256 value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters