use of org.aion.solidity.SolidityType.BoolType in project aion by aionnetwork.
the class SolidityTypeTest method testBool.
@Test
public void testBool() throws Exception {
byte[] params = new BoolType().encode(true);
System.out.println(Hex.toHexString(params));
AionTransaction tx = createTransaction(ByteUtil.merge(Hex.decode("e8dde232"), params));
MiningBlock block = createDummyBlock();
RepositoryCache repo = createRepository(tx);
AionTxReceipt receipt = executeTransaction(tx, block, repo).getReceipt();
System.out.println(receipt);
assertArrayEquals(params, receipt.getTransactionOutput());
assertEquals(Boolean.TRUE, new BoolType().decode(receipt.getTransactionOutput()));
}
Aggregations