1

I was going through new token example given here. I have created a below contract:

pragma solidity ^0.4.16;

    contract MyToken {
        /* This creates an array with all balances */
        mapping (address => uint256) public balanceOf;
        function MyToken(uint256 initialSupply) public {
            balanceOf[msg.sender] = 25;
        }

However, whenever I am creating MyToken and check the balanceOf mapping in Remix, I get the output:

0: uint256: 0

Am I doing something wrong? Please help. Thank you.

0

In Remix GUI, you have to put the address into "".

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.