use of com.hedera.mirror.common.domain.transaction.EthereumTransaction in project hedera-mirror-node by hashgraph.
the class EthereumTransactionRepositoryTest method saveFileId.
@Test
void saveFileId() {
EthereumTransaction ethereumTransaction = domainBuilder.ethereumTransaction(false).persist();
assertThat(ethereumTransactionRepository.findById(ethereumTransaction.getId())).get().usingRecursiveComparison().ignoringFields("callDataId.type").isEqualTo(ethereumTransaction);
}
use of com.hedera.mirror.common.domain.transaction.EthereumTransaction in project hedera-mirror-node by hashgraph.
the class EthereumTransactionRepositoryTest method saveInitCode.
@Test
void saveInitCode() {
EthereumTransaction ethereumTransaction = domainBuilder.ethereumTransaction(true).persist();
assertThat(ethereumTransactionRepository.findById(ethereumTransaction.getId())).get().usingRecursiveComparison().ignoringFields("callDataId.type").isEqualTo(ethereumTransaction);
}
use of com.hedera.mirror.common.domain.transaction.EthereumTransaction in project hedera-mirror-node by hashgraph.
the class LegacyEthereumTransactionParserTest method eip155Decode.
@SneakyThrows
@Test
void eip155Decode() {
var ethereumTransaction = ethereumTransactionParser.decode(Hex.decodeHex(EIP155_RAW_TX));
assertThat(ethereumTransaction).isNotNull().satisfies(t -> assertThat(t.getType()).isZero()).satisfies(t -> assertThat(Hex.encodeHexString(t.getChainId())).isEqualTo("01")).satisfies(t -> assertThat(t.getNonce()).isEqualTo(9)).satisfies(t -> assertThat(Hex.encodeHexString(t.getGasPrice())).isEqualTo("04a817c800")).satisfies(t -> assertThat(t.getMaxPriorityFeePerGas()).isNull()).satisfies(t -> assertThat(t.getMaxFeePerGas()).isNull()).satisfies(t -> assertThat(t.getGasLimit()).isEqualTo(21_000L)).satisfies(t -> assertThat(Hex.encodeHexString(t.getToAddress())).isEqualTo("3535353535353535353535353535353535353535")).satisfies(t -> assertThat(t.getValue()).isEqualTo(new BigInteger("0de0b6b3a7640000", 16).toByteArray())).satisfies(t -> assertThat(t.getCallData()).isEmpty()).satisfies(t -> assertThat(t.getAccessList()).isNull()).satisfies(t -> assertThat(t.getRecoveryId()).isZero()).satisfies(t -> assertThat(Hex.encodeHexString(t.getSignatureV())).isEqualTo("25")).satisfies(t -> assertThat(Hex.encodeHexString(t.getSignatureR())).isEqualTo("28ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276")).satisfies(t -> assertThat(Hex.encodeHexString(t.getSignatureS())).isEqualTo("67cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83"));
}
Aggregations