use openzeppelin IERC20

This commit is contained in:
Andrea Franz 2020-09-30 12:37:55 +02:00
parent 6320527a8f
commit 65588974d5
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D
6 changed files with 1767 additions and 18 deletions

View File

@ -2,7 +2,7 @@ pragma solidity ^0.6.1;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
import "./Bucket.sol"; import "./Bucket.sol";
import "./erc20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract ERC20Bucket is Bucket { contract ERC20Bucket is Bucket {
uint256 public redeemableSupply; uint256 public redeemableSupply;

View File

@ -1,15 +0,0 @@
pragma solidity ^0.6.1;
// https://github.com/ethereum/EIPs/issues/20
interface IERC20 {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function transfer(address _to, uint256 _value) external returns (bool success);
function approve(address _spender, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function balanceOf(address _owner) external view returns (uint256 balance);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
function totalSupply() external view returns (uint256 supply);
}

View File

@ -1,6 +1,6 @@
pragma solidity >=0.5.0 <0.7.0; pragma solidity >=0.5.0 <0.7.0;
import "./IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
abstract contract IERC20Detailed is IERC20 { abstract contract IERC20Detailed is IERC20 {
function name() virtual public view returns (string memory); function name() virtual public view returns (string memory);

View File

@ -1,6 +1,6 @@
pragma solidity ^0.6.1; pragma solidity ^0.6.1;
import "./IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract StandardToken is IERC20 { contract StandardToken is IERC20 {

6
package.json Normal file
View File

@ -0,0 +1,6 @@
{
"dependencies": {
"@openzeppelin/contracts": "^3.2.0",
"eth-gas-reporter": "^0.2.17"
}
}

1758
yarn.lock Normal file

File diff suppressed because it is too large Load Diff