Skip to content

Instantly share code, notes, and snippets.

@0xjjpa
Created July 4, 2018 19:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xjjpa/fbd536a5d32fe33d12820b6fd6110ba3 to your computer and use it in GitHub Desktop.
Save 0xjjpa/fbd536a5d32fe33d12820b6fd6110ba3 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.24;
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/crowdsale/validation/CappedCrowdsale.sol";
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/crowdsale/emission/MintedCrowdsale.sol";
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/MintableToken.sol";
/**
* @title SampleCrowdsaleToken
* @dev Very simple ERC20 Token that can be minted.
* It is meant to be used in a crowdsale contract.
*/
contract TTAUCrowdsaleToken is MintableToken {
string public constant name = "Tarco AU Coin"; // solium-disable-line uppercase
string public constant symbol = "TTAU"; // solium-disable-line uppercase
uint8 public constant decimals = 18; // solium-disable-line uppercase
}
/**
* @title SampleCrowdsale
* @dev This is an example of a fully fledged crowdsale.
* The way to add new features to a base crowdsale is by multiple inheritance.
* In this example we are providing following extensions:
* CappedCrowdsale - sets a max boundary for raised funds
* RefundableCrowdsale - set a min goal to be reached and returns funds if it's not met
*
* After adding multiple features it's good practice to run integration tests
* to ensure that subcontracts works together as intended.
*/
// XXX There doesn't seem to be a way to split this line that keeps solium
// happy. See:
// https://github.com/duaraghav8/Solium/issues/205
// --elopio - 2018-05-10
// solium-disable-next-line max-len
contract TTAUCrowdsale is CappedCrowdsale, MintedCrowdsale {
constructor(
uint256 _rate,
address _wallet,
uint256 _cap,
MintableToken _token
)
public
Crowdsale(_rate, _wallet, _token)
CappedCrowdsale(_cap)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment