use of org.hyperledger.besu.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcRequestException in project besu by hyperledger.
the class DomainObjectDecodeUtils method decodeRawTransaction.
public static Transaction decodeRawTransaction(final String rawTransaction) throws InvalidJsonRpcRequestException {
try {
Bytes txnBytes = Bytes.fromHexString(rawTransaction);
final boolean isGoQuorumCompatibilityMode = GoQuorumOptions.getGoQuorumCompatibilityMode();
return TransactionDecoder.decodeOpaqueBytes(txnBytes, isGoQuorumCompatibilityMode);
} catch (final IllegalArgumentException | RLPException e) {
throw new InvalidJsonRpcRequestException("Invalid raw transaction hex", e);
}
}
Aggregations