[Ethereum] Solidity error when encoding arguments to query public mapping

blockchainmappingqueryremixsolidity

While developing a Smart Contract with Solidity on Remix , after creating the contract I'm trying to query a public mapping:

mapping (address => uint256) public balanceOf;

but when I call balanceOf for address 0x9b9731b07b9b5f982289bab87097eade6a4bc25d it throws the following error:

Error encoding arguments: SyntaxError: Unexpected token x in JSON at position 2

Any idea how can I properly call balanceOf?

Best Answer

The address needs be surrounded with quotes. "0xca35b7d915458ef540ade6068dfe2f44e8fa733c" should work.

Related Topic