convert 2 spaces to 4 spaces
This commit is contained in:
@ -14,19 +14,19 @@ import "../token/ERC20/ERC20Mintable.sol";
|
||||
*/
|
||||
contract SampleCrowdsaleToken is Initializable, ERC20Mintable {
|
||||
|
||||
string public name;
|
||||
string public symbol;
|
||||
uint8 public decimals;
|
||||
string public name;
|
||||
string public symbol;
|
||||
uint8 public decimals;
|
||||
|
||||
function initialize(address sender) public initializer {
|
||||
ERC20Mintable.initialize(sender);
|
||||
function initialize(address sender) public initializer {
|
||||
ERC20Mintable.initialize(sender);
|
||||
|
||||
name = "Sample Crowdsale Token";
|
||||
symbol = "SCT";
|
||||
decimals = 18;
|
||||
}
|
||||
name = "Sample Crowdsale Token";
|
||||
symbol = "SCT";
|
||||
decimals = 18;
|
||||
}
|
||||
|
||||
uint256[50] private ______gap;
|
||||
uint256[50] private ______gap;
|
||||
}
|
||||
|
||||
|
||||
@ -48,27 +48,27 @@ contract SampleCrowdsaleToken is Initializable, ERC20Mintable {
|
||||
// solium-disable-next-line max-len
|
||||
contract SampleCrowdsale is Initializable, Crowdsale, CappedCrowdsale, RefundableCrowdsale, MintedCrowdsale {
|
||||
|
||||
function initialize(
|
||||
uint256 openingTime,
|
||||
uint256 closingTime,
|
||||
uint256 rate,
|
||||
address wallet,
|
||||
uint256 cap,
|
||||
ERC20Mintable token,
|
||||
uint256 goal
|
||||
)
|
||||
public
|
||||
initializer
|
||||
{
|
||||
Crowdsale.initialize(rate, wallet, token);
|
||||
CappedCrowdsale.initialize(cap);
|
||||
TimedCrowdsale.initialize(openingTime, closingTime);
|
||||
RefundableCrowdsale.initialize(goal);
|
||||
function initialize(
|
||||
uint256 openingTime,
|
||||
uint256 closingTime,
|
||||
uint256 rate,
|
||||
address wallet,
|
||||
uint256 cap,
|
||||
ERC20Mintable token,
|
||||
uint256 goal
|
||||
)
|
||||
public
|
||||
initializer
|
||||
{
|
||||
Crowdsale.initialize(rate, wallet, token);
|
||||
CappedCrowdsale.initialize(cap);
|
||||
TimedCrowdsale.initialize(openingTime, closingTime);
|
||||
RefundableCrowdsale.initialize(goal);
|
||||
|
||||
//As goal needs to be met for a successful crowdsale
|
||||
//the value needs to less or equal than a cap which is limit for accepted funds
|
||||
require(goal <= cap);
|
||||
}
|
||||
//As goal needs to be met for a successful crowdsale
|
||||
//the value needs to less or equal than a cap which is limit for accepted funds
|
||||
require(goal <= cap);
|
||||
}
|
||||
|
||||
uint256[50] private ______gap;
|
||||
uint256[50] private ______gap;
|
||||
}
|
||||
|
||||
@ -13,19 +13,19 @@ import "../token/ERC20/ERC20.sol";
|
||||
*/
|
||||
contract SimpleToken is Initializable, ERC20 {
|
||||
|
||||
string public constant name = "SimpleToken";
|
||||
string public constant symbol = "SIM";
|
||||
uint8 public constant decimals = 18;
|
||||
string public constant name = "SimpleToken";
|
||||
string public constant symbol = "SIM";
|
||||
uint8 public constant decimals = 18;
|
||||
|
||||
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
|
||||
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
|
||||
|
||||
/**
|
||||
* @dev Constructor that gives sender all of existing tokens.
|
||||
*/
|
||||
function initialize(address sender) public initializer {
|
||||
_mint(sender, INITIAL_SUPPLY);
|
||||
}
|
||||
/**
|
||||
* @dev Constructor that gives sender all of existing tokens.
|
||||
*/
|
||||
function initialize(address sender) public initializer {
|
||||
_mint(sender, INITIAL_SUPPLY);
|
||||
}
|
||||
|
||||
|
||||
uint256[50] private ______gap;
|
||||
uint256[50] private ______gap;
|
||||
}
|
||||
|
||||
@ -11,32 +11,32 @@ import "../token/ERC20/ERC20Pausable.sol";
|
||||
*
|
||||
*/
|
||||
contract StandardToken is Initializable, ERC20Detailed, ERC20Mintable, ERC20Pausable {
|
||||
function initialize(
|
||||
string name, string symbol, uint8 decimals, uint256 initialSupply, address initialHolder,
|
||||
address[] minters, address[] pausers
|
||||
) public initializer {
|
||||
ERC20Detailed.initialize(name, symbol, decimals);
|
||||
function initialize(
|
||||
string name, string symbol, uint8 decimals, uint256 initialSupply, address initialHolder,
|
||||
address[] minters, address[] pausers
|
||||
) public initializer {
|
||||
ERC20Detailed.initialize(name, symbol, decimals);
|
||||
|
||||
// Mint the initial supply
|
||||
if (initialSupply > 0) { // To allow passing a null address when not doing any initial supply
|
||||
_mint(initialHolder, initialSupply);
|
||||
// Mint the initial supply
|
||||
if (initialSupply > 0) { // To allow passing a null address when not doing any initial supply
|
||||
_mint(initialHolder, initialSupply);
|
||||
}
|
||||
|
||||
// Initialize the minter and pauser roles, and renounce them
|
||||
ERC20Mintable.initialize(address(this));
|
||||
renounceMinter();
|
||||
|
||||
ERC20Pausable.initialize(address(this));
|
||||
renouncePauser();
|
||||
|
||||
// Add the requested minters and pausers (this can be done after renouncing since
|
||||
// these are the internal calls)
|
||||
for (uint256 i = 0; i < minters.length; ++i) {
|
||||
_addMinter(minters[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < pausers.length; ++i) {
|
||||
_addPauser(pausers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the minter and pauser roles, and renounce them
|
||||
ERC20Mintable.initialize(address(this));
|
||||
renounceMinter();
|
||||
|
||||
ERC20Pausable.initialize(address(this));
|
||||
renouncePauser();
|
||||
|
||||
// Add the requested minters and pausers (this can be done after renouncing since
|
||||
// these are the internal calls)
|
||||
for (uint256 i = 0; i < minters.length; ++i) {
|
||||
_addMinter(minters[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < pausers.length; ++i) {
|
||||
_addPauser(pausers[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user