I'm trying to deploy a token contract and a crowdsale contract via Remix on Ropsten. However I am running into trouble. Below are both of my smart contracts and an explanation of what is happening.
MyCoin.sol
pragma solidity ^0.4.18;
import 'github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/CappedToken.sol';
contract MyCoin is CappedToken {
string public name = "MY COIN";
string public symbol = "MYC";
uint8 public decimals = 18;
uint256 public cap = 500000000000000000000000;
function MyCoin ()
CappedToken(cap)
public
payable
{
}
}
MyCoinCrowdsale.sol
pragma solidity ^0.4.19;
import 'browser/MyCoin.sol';
import 'github.com/OpenZeppelin/zeppelin-solidity/contracts/crowdsale/emission/MintedCrowdsale.sol';
contract MyCoinCrowdsale is MintedCrowdsale {
function MyCoinCrowdsale
(
uint256 _rate,
address _wallet,
CappedToken _token
)
public
Crowdsale(_rate, _wallet, _token) {
}
}
First I deploy MyCoin.sol via Remix and everything runs smoothly as shown in this txn.
However, when I deploy MyCoinCrowdsale.sol via Remix I get a txn error, which states :
Warning! Error encountered during contract execution [Reverted]
Any help would be greatly appreciated as I am completed stumped.