Skip to content

Commit f54d50d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into elopio-refactor/1175/event-underscores
2 parents fdcd5fa + 2e0713b commit f54d50d

File tree

84 files changed

+1059
-1059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1059
-1059
lines changed

contracts/AutoIncrementing.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.4.24;
55
* @title AutoIncrementing
66
* @author Matt Condon (@shrugs)
77
* @dev Provides an auto-incrementing uint256 id acquired by the `Counter#nextId` getter.
8-
* Use this for issuing ERC721Token ids or keeping track of request ids, anything you want, really.
8+
* Use this for issuing ERC721 ids or keeping track of request ids, anything you want, really.
99
*
1010
* Include with `using AutoIncrementing for AutoIncrementing.Counter;`
1111
* @notice Does not allow an Id of 0, which is popularly used to signify a null state in solidity.

contracts/crowdsale/Crowdsale.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pragma solidity ^0.4.24;
22

3-
import "../token/ERC20/ERC20.sol";
3+
import "../token/ERC20/IERC20.sol";
44
import "../math/SafeMath.sol";
55
import "../token/ERC20/SafeERC20.sol";
66

@@ -19,17 +19,17 @@ import "../token/ERC20/SafeERC20.sol";
1919
*/
2020
contract Crowdsale {
2121
using SafeMath for uint256;
22-
using SafeERC20 for ERC20;
22+
using SafeERC20 for IERC20;
2323

2424
// The token being sold
25-
ERC20 public token;
25+
IERC20 public token;
2626

2727
// Address where funds are collected
2828
address public wallet;
2929

3030
// How many token units a buyer gets per wei.
3131
// The rate is the conversion between wei and the smallest and indivisible token unit.
32-
// So, if you are using a rate of 1 with a DetailedERC20 token with 3 decimals called TOK
32+
// So, if you are using a rate of 1 with a ERC20Detailed token with 3 decimals called TOK
3333
// 1 wei will give you 1 unit, or 0.001 TOK.
3434
uint256 public rate;
3535

@@ -55,7 +55,7 @@ contract Crowdsale {
5555
* @param _wallet Address where collected funds will be forwarded to
5656
* @param _token Address of the token being sold
5757
*/
58-
constructor(uint256 _rate, address _wallet, ERC20 _token) public {
58+
constructor(uint256 _rate, address _wallet, IERC20 _token) public {
5959
require(_rate > 0);
6060
require(_wallet != address(0));
6161
require(_token != address(0));

contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pragma solidity ^0.4.24;
22

33
import "../validation/TimedCrowdsale.sol";
4-
import "../../token/ERC20/ERC20.sol";
4+
import "../../token/ERC20/IERC20.sol";
55
import "../../math/SafeMath.sol";
66

77

contracts/crowdsale/emission/AllowanceCrowdsale.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pragma solidity ^0.4.24;
22

33
import "../Crowdsale.sol";
4-
import "../../token/ERC20/ERC20.sol";
4+
import "../../token/ERC20/IERC20.sol";
55
import "../../token/ERC20/SafeERC20.sol";
66
import "../../math/SafeMath.sol";
77

@@ -12,7 +12,7 @@ import "../../math/SafeMath.sol";
1212
*/
1313
contract AllowanceCrowdsale is Crowdsale {
1414
using SafeMath for uint256;
15-
using SafeERC20 for ERC20;
15+
using SafeERC20 for IERC20;
1616

1717
address public tokenWallet;
1818

contracts/crowdsale/emission/MintedCrowdsale.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pragma solidity ^0.4.24;
22

33
import "../Crowdsale.sol";
4-
import "../../token/ERC20/MintableToken.sol";
4+
import "../../token/ERC20/ERC20Mintable.sol";
55

66

77
/**
@@ -23,6 +23,6 @@ contract MintedCrowdsale is Crowdsale {
2323
internal
2424
{
2525
// Potentially dangerous assumption about the type of the token.
26-
require(MintableToken(address(token)).mint(_beneficiary, _tokenAmount));
26+
require(ERC20Mintable(address(token)).mint(_beneficiary, _tokenAmount));
2727
}
2828
}

contracts/examples/SampleCrowdsale.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ pragma solidity ^0.4.24;
33
import "../crowdsale/validation/CappedCrowdsale.sol";
44
import "../crowdsale/distribution/RefundableCrowdsale.sol";
55
import "../crowdsale/emission/MintedCrowdsale.sol";
6-
import "../token/ERC20/MintableToken.sol";
6+
import "../token/ERC20/ERC20Mintable.sol";
77

88

99
/**
1010
* @title SampleCrowdsaleToken
1111
* @dev Very simple ERC20 Token that can be minted.
1212
* It is meant to be used in a crowdsale contract.
1313
*/
14-
contract SampleCrowdsaleToken is MintableToken {
14+
contract SampleCrowdsaleToken is ERC20Mintable {
1515

1616
string public constant name = "Sample Crowdsale Token";
1717
string public constant symbol = "SCT";
@@ -44,7 +44,7 @@ contract SampleCrowdsale is CappedCrowdsale, RefundableCrowdsale, MintedCrowdsal
4444
uint256 _rate,
4545
address _wallet,
4646
uint256 _cap,
47-
MintableToken _token,
47+
ERC20Mintable _token,
4848
uint256 _goal
4949
)
5050
public

contracts/examples/SimpleToken.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
pragma solidity ^0.4.24;
22

33

4-
import "../token/ERC20/StandardToken.sol";
4+
import "../token/ERC20/ERC20.sol";
55

66

77
/**
88
* @title SimpleToken
99
* @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.
1010
* Note they can later distribute these tokens as they wish using `transfer` and other
11-
* `StandardToken` functions.
11+
* `ERC20` functions.
1212
*/
13-
contract SimpleToken is StandardToken {
13+
contract SimpleToken is ERC20 {
1414

1515
string public constant name = "SimpleToken";
1616
string public constant symbol = "SIM";
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ pragma solidity ^0.4.24;
22

33

44
/**
5-
* @title ERC165
5+
* @title IERC165
66
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
77
*/
8-
interface ERC165 {
8+
interface IERC165 {
99

1010
/**
1111
* @notice Query if a contract implements an interface

contracts/introspection/SupportsInterfaceWithLookup.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
pragma solidity ^0.4.24;
22

3-
import "./ERC165.sol";
3+
import "./IERC165.sol";
44

55

66
/**
77
* @title SupportsInterfaceWithLookup
88
* @author Matt Condon (@shrugs)
99
* @dev Implements ERC165 using a lookup table.
1010
*/
11-
contract SupportsInterfaceWithLookup is ERC165 {
11+
contract SupportsInterfaceWithLookup is IERC165 {
1212

1313
bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7;
1414
/**

contracts/lifecycle/TokenDestructible.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pragma solidity ^0.4.24;
22

33
import "../ownership/Ownable.sol";
4-
import "../token/ERC20/ERC20.sol";
4+
import "../token/ERC20/IERC20.sol";
55

66

77
/**
@@ -25,7 +25,7 @@ contract TokenDestructible is Ownable {
2525

2626
// Transfer tokens to owner
2727
for (uint256 i = 0; i < _tokens.length; i++) {
28-
ERC20 token = ERC20(_tokens[i]);
28+
IERC20 token = IERC20(_tokens[i]);
2929
uint256 balance = token.balanceOf(this);
3030
token.transfer(owner, balance);
3131
}

0 commit comments

Comments
 (0)