B4J Question [ Web3X ] How can i get the balance of other currencies within the wallet?

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
how do i get the balance of other currencies in the wallet created with Web3X?

to get the ETH balance I use this example code, but is it possible to get the balance of other currencies in the wallet, bep20, erc20, etc?

B4X:
    Wait For (Web3Ropsten.EthGetBalance(Credentials.Address, Utils.BLOCK_LATEST)) Complete (Result As W3AsyncResult)
    If Result.Success Then
        Dim wei As BigInteger = Result.Value
        Log(Utils.ConvertFromWei(wei, "ether") & " ether")
    End If
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…