New answers tagged

0

You can't do token.transfer(PresaleCrowdsale.address, '100000000000000000') The contract address does not have that amount of tokens, its the msg.sender address that has the tokens. balances[msg.sender] = totalSupply_; Hence doing token.transfer(PresaleCrowdsale.address, '100000000000000000') would throw subtraction overflow error. You should do ...


1

To manually test the MinterRole you need to change the account you are sending the transaction from. e.g. accounts[0] has the MinterRole, accounts[1] does not have the MinterRole so reverts when you attempt to mint. truffle(develop)> accounts = await web3.eth.getAccounts() truffle(develop)> token.mint(accounts[9], "10000000000000000000", {from:...


0

Re: The hunch, no. Your expectation is misaligned. This is a state-changing function is not marked view or pure (read-only) and this correct because you do, indeed, want the function to update the state. We don't see the code, but this appears to be a "set", not a "get". Now, in all such state-changing situations, the expected result of the callback is a ...


0

Read the top of the ERC20Mintable.sol file (which you have linked at the top of your own question): contract ERC20Mintable is ERC20, MinterRole ... Contract ERC20Mintable IS MinterRole (in contrast with HAS MinterRole). This mean that ERC20Mintable inherits all the (non-private) functions and variables of MinterRole. Hence you should call the function ...


0

For future reference, this was unfortunately just a typo. I hope you found this quickly. It is RefundableCrowdsale not RefundableCrowdSale For information on using OpenZeppelin Crowdsales, please see the documentation: https://docs.openzeppelin.org/v2.3.0/crowdsales If you have any questions on using OpenZeppelin you can always ask in the community forum


Top 50 recent answers are included