I'm looking at Crowdsale.sol from OpenZeppelin / zeppelin-solidity. Here's a snippet:

import '../token/MintableToken.sol';

contract Crowdsale {

  MintableToken public token;

After I create the Crowdsale contract on remix.ethereum.org, Crowdsale's functions and MintableToken token's address are shown. But it does not show token's functions such as balanceOf and totalSupply. Is there a way to see this, or is this lacking in remix.ethereum.org?

[Added on 2017-08-05] I want to create Crowdsale contract, send some funds there and see my balance. This does not seem possible on remix.ethereum.org. This is possible on wallet.ethereum.org because after watching Crowdsale contract, it will show the token's address. Then you can watch the token contract and balanceOf and totalSupply will appear and be accessible. After creating Crowdsale contract on remix.ethereum.org, it shows the token's address, but there seems to be no way to access the token's functions. Is this lacking in remix.ethereum.org? On remix.ethereum.org, you can create Crowdsale.sol and MintableToken.sol contracts, but the token created by the second contract is not the same token that Crowdsale created and therefore, when you send funds to Crowdsale, your funds are going to the token that Crowdsale created, not the token that the MintableToken.sol contract created.

  • Can you share the complete code which you are using in remix IDE? – Abhishek Aug 5 '17 at 12:08
  • Not seeing the problem - I've imported all the dependent files from the OpenZepplin repository into Remix. As soon as I click "Create" for the MintableToken.sol contract all of the ERC20 functions appear, balanceOf, totalSupply, owner, allowance, approve etc. – benjaminion Aug 5 '17 at 14:11
  • Abhishek: You can see the code at zeppelin-solidity. @benjaminion I added to my post. Please see above. You created another token, different from the token that Crowdsale created. When you send funds to Crowdsale, it goes to the token that Crowdsale created, not the token that you created by creating the MintableToken.sol contract. – Curt Aug 5 '17 at 23:36
  • You can access their functions. But you're right in that you don't have the balance show up right away. You'll have to add a function to show it to you...just guessing its something like this: function balanceOf(address addr) returns (uint);.... – thefett Aug 8 '17 at 2:21

Your Answer

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

Browse other questions tagged or ask your own question.