1

So I made a fake token, and I took the code from the ethereum.org website. But I'm not sure if its right.... It seems when I transfer them on the testnet in mist, mist says "50 undefined 1ee6 were transfered from..." and not the name of the token.

What could be the problem here? Code is below....

    contract Token is owned {
    string public constant name = "Token";
    string public constant symbol = "F";
    uint256 public constant decimals = 18;
    string public version = "1.0";


    /* This creates an array with all balances */
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;

    /* This generates a public event on the blockchain that will notify clients */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /* This notifies clients about the amount burnt */
    event Burn(address indexed from, uint256 value);

    /* Initializes contract with initial supply tokens to the creator of the contract */
   function Token(
    uint256 initialSupply,
    string tokenName,
    uint8 decimalUnits,
    string tokenSymbol,
    address centralMinter
    ) {
  • The code seems to be incomplete, what is the owned contract? – Paolo Guerra Jul 14 '17 at 8:26
  • Standard owned just saying msg.sender is owner – Zach Jul 14 '17 at 19:15
0

A token can be recognized by wallets (such as Remix, Mew) if it follows these directives: https://theethereum.wiki/w/index.php/ERC20_Token_Standard

I had the same problem with MEW that instead of the amount of my custom token it displayed 'Not a valid ERC20 token'; see the topic here: Use MEW for testing smart contract

After defining that contract structure, the amount of token is correctly displayed in MEW.

0

Use the contract address to verify it's the original one! Most of the dapp show their contract address.

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.