Abfrage des Kontostands eines ERC20 in einem Testnetzwerk

Ich versuche, einen Code zu debuggen, der nach dem Token-Guthaben eines Kontos sucht.

Ist es möglich, dies im Rinkeby-Netzwerk abzufragen? Mein Code gibt nichts zurück.

contract ERC20 {
    function totalSupply() constant returns (uint totalSupply);
    function balanceOf(address _owner) constant returns (uint balance);
    function transfer(address _to, uint _value) returns (bool success);
    event Transfer(address indexed _from, address indexed _to, uint _value);
}

contract Test{

    ERC20 icoToken;

    function Test(){
        icoToken = ERC20(0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0);
        //this is the EOS token address
    }

    function getMyBalance(address myAddress) constant returns (uint256 theB){
        theB = icoToken.balanceOf(myAddress);
        return theB;
    }
}

Es passiert nichts, wenn ich eine ETH-Adresse in getMyBalance eingebe.

Antworten (1)

Das Konto auf Rinkeby ist kein Vertrag.

Hatte EOS einen Test-ICO/Token auf Rinkeby? Wenn ja, sollten Sie diese Rinkeby-spezifische Adresse verwenden.