1

I'm trying to create a crowdsale contract based on zeppelin-solidity. I'm using the following code to create the CROWDSALE contract, as well as TOKEN contract, based on this example.

pragma solidity ^0.4.18;

import 'zeppelin-solidity/contracts/token/MintableToken.sol';
import 'zeppelin-solidity/contracts/crowdsale/Crowdsale.sol';

contract DreamToken is MintableToken {

  string public constant name = "Dream Token";
  string public constant symbol = "DMT";
  uint8 public constant decimals = 18;
}

contract DreamTokenCrowdsale is Crowdsale {

   function DreamTokenCrowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) public
     Crowdsale(_startTime, _endTime, _rate, _wallet)
   {

   }

   function createTokenContract() internal returns (MintableToken) {
     return new DreamToken();
   }

 }

The crowdsale contract is created and fully functional. I have also verified the contract in rinkeby.

However, there is something wrong with the TOKEN contract. The crowdsale contract shows that the token is created at this address but etherscan shows that there is no such address and I cannot verify the token contract.

When I send ether to the crowdsale contract address, it indeed sends the purchased tokens. But in etherscan it shows that the tokens are sent from '0x000..." address.

enter image description here

Can anyone suggest what am I doing wrong here?

0

You can see your token here ERC20-TOKEN Dream Token

The reason why you see that the token were sent from the 0x000... address is because you minted the new tokens. When tokens are minted the address that is associated with the generation of the token is the 0x000... address.

  • I'm a little confused here. Shouldn't the token be sent from the contract address of the token? And is there any way I can verify the token contract? – qmFaisal Dec 19 '17 at 19:03
  • @QuaziMohammadFaisal That depends on what you've done in your contract. – I.B Dec 19 '17 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.