use of org.aion.rpc.types.RPCTypesConverter.AccountStateConverter in project aion by aionnetwork.
the class OpsRPCImplTest method testOps_getAccountState.
@Test
public void testOps_getAccountState() {
AionAddress aionAddress = new AionAddress(ByteUtil.hexStringToBytes("a07913c03686c9659c1b614d098fd1db380a52b71fd58526b53d8107f7b355d5"));
Request request = new Request(idGenerator.generateID(), getAccountStateMethod, AddressParamsConverter.encode(new AddressParams(aionAddress)), VersionType.Version2);
final RPCTypes.AccountState result = execute(request, AccountStateConverter::decode);
assertNotNull(result);
assertEquals(aionAddress, result.address);
assertEquals(BigInteger.TEN, result.balance);
assertEquals(BigInteger.TEN, result.nonce);
}
Aggregations