I have a smart contract token deployed in a Ganache instance. My dapp written with React and web3.js shows the same 10 accounts for eth.accounts
as running the same command in the geth console.
If I create my token object with the abi and contract address in geth, I get a different balance for accounts[0]
than the balance I get with my dapp. Both create the token object with the same blockchain address. Both show that eth.accounts[0]
is the same address!
I also have an Android app using web3j. It uses the same contract address and it displays the same values that the React dapp shows.
However, I also have an app in web3.py and it shows the same values that are shown in geth!
Can someone please explain to me how the same token object could display different outputs on .balanceOf("the_same_address")
if it's in the same blockchain? The only difference is if I'm using geth, web3j, web3.js or web3.py
EDIT: added picture ob browser with console (dapp) and terminal console (geth)
It gives me different balances for all accounts. It feels as if I was connecting to 2 different blockchains. However, they have the same 10 default accounts and my contracts deployed in the same addresses.
web3.eth.getBlock('latest').hash
.