我正在尝试使用 Java API 获取 Aion 中的帐户余额。无论我做什么,我都无法从 account
变量中获取值。
account = "a06f02e986965ddd3398c4de87e3708072ad58d96e9c53e87c31c8c970b211e5";
BigInteger account_balance = api.getChain().getBalance(account).getObject();
System.out.format("%n%s balance is = %d nAmp (over %d AION)%n",
account,
account_balance,
account_balance.divide(BigInteger.TEN.pow(18)));
有人有什么想法吗?
最佳答案
您需要将您的账户地址包裹在Address.wrap
中。
account = Address.wrap("a06f02e9...");
关于java - 显示 Aion 账户的余额,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52838707/