I'm trying to debug some code that checks for an account's token balance.

Is it possible to query this on the Rinkeby network? My code isn't returning anything.

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;

Nothing happens when I input an ETH address into getMyBalance.


The account on Rinkeby is not a contract.

Did EOS have a test ICO/token on Rinkeby?.. If so, you should use that Rinkeby-specific address.

| improve this answer | |

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.