I'm using Crowdsale.sol from OpenZeppelin / zeppelin-solidity. Here's a snippet:
import '../token/MintableToken.sol';
import '../math/SafeMath.sol';
/**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end block, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/
contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
Is this inheriting from MintableToken?
MintableToken.sol inherits from StandardToken.sol and Ownable.sol. StandardToken.sol inherits from BasicToken.sol and ERC20.sol. BasicToken.sol inherits from ERC20Basic.sol and SafeMath.sol.
I want to use function balanceOf
from BasicToken.sol and uint256 public totalSupply
from ERC20Basic.sol, but these do not appear on remix.ethereum.org (using "JavaScript VM") after creating the Crowdsale contract .
If I change Crowdsale.sol to any of the following:
contract Crowdsale is StandardToken {
contract Crowdsale is MintableToken {
contract Crowdsale is BasicToken {
...balanceOf
and totalSupply
appear (after creating contract), but they only return 0. I send some funds to the contract and enter the sender's address into balanceOf
and it returns 0. I click on totalSupply
and it returns zero. They do not seem to be working.
What do I need to do to get these to work?