---
title: "Comment by Martin Blanco on \"The 2018 guide to writing (and testing) real world crowdsale contracts\" | Hashnode"
description: "Now... Once the ico is finished, how can I see the balance of tokens that have been returned to the addresses that have participated? web3 .eth .getBalance ( ac"
url: "https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a998fd3e96b069606051b35"
---

[Discussion](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9)

Comment [The 2018 guide to writing (and testing) real world crowdsale contracts](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9)

[Martin Blanco](https://hashnode.com/@kaptincho)

[Mar 2, 2018](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a998fd3e96b069606051b35)

Now... Once the ico is finished, how can I see the balance of tokens that have been returned to the addresses that have participated?

```
web3.eth.getBalance(accounts[0]);
```

Shows me the eth balance, not the token balance.

[Martin Blanco](https://hashnode.com/@kaptincho)

[Mar 6, 2018](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a998fd3e96b069606051b35#reply-5a9e9ed4e96b0696060537e9)

I was looking and analyzing, to see the tokens you must make the query with the api webjs of ethereum making the call with your JSON ABI contract.

Load webjs api on html file first:

`<script src="web3.min.js"></script>`

then execute this JS example:

```
var web3 = new Web3(new Web3.providers.HttpProvider("http://RPCBlockchainIP:RPCBlockchainPort")); 
var erc20Abi = [Your JSON ABI Contract]; 
var tokenContract = web3.eth.contract(erc20Abi).at("Your Contract Token Address"); 
var tokenBalance = tokenContract.balanceOf.call("Your Account Address to Test"); 
console.log(tokenBalance);
```
