From ccba20e70b8813395ed9a01274ec00602fad94a0 Mon Sep 17 00:00:00 2001 From: Usman Saleem Date: Tue, 16 Jul 2024 15:20:34 +1000 Subject: [PATCH] fix javadoc Signed-off-by: Usman Saleem --- .../internal/parameters/JsonCallParameter.java | 11 +++++------ .../internal/parameters/JsonCallParameterTest.java | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameter.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameter.java index 1a73f084a8a..987b68c2e2f 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameter.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameter.java @@ -43,7 +43,7 @@ * JsonCallParameter param = new JsonCallParameter.JsonCallParameterBuilder() * .withFrom(Address.fromHexString("0x...")) * .withTo(Address.fromHexString("0x...")) - * .withGasLimit(21000L) + * .withGas(21000L) * .withGasPrice(Wei.of(1000000000L)) * .withValue(Wei.ZERO) * .withInput(Bytes.fromHexString("0x...")) @@ -159,7 +159,7 @@ public JsonCallParameterBuilder withFrom(final Address from) { /** * Sets the "to" address for the {@link JsonCallParameter}. This address represents the - * recipient of the call. + * recipient of the call. It can be null for contract creation transactions. * * @param to the recipient's address * @return the {@link JsonCallParameterBuilder} instance for chaining @@ -170,10 +170,9 @@ public JsonCallParameterBuilder withTo(final Address to) { } /** - * Sets the gas limit for the {@link JsonCallParameter}. The gas limit specifies the maximum - * amount of gas that the call is allowed to consume. If the actual gas consumed exceeds this - * limit, the call is reverted. By default, if not specified, the gas limit is set to -1, - * indicating that it is not set. + * Sets the gas for the {@link JsonCallParameter} used for transaction execution. eth_call uses + * 0 gas but this parameter may be needed by some executions. By default, if not specified, the + * gas is set to -1, indicating that it is not set. * * @param gas the gas limit for the call, can be {@code null} to indicate that the gas limit is * not set diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameterTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameterTest.java index ea1191a1fc2..97d7feeeb13 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameterTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonCallParameterTest.java @@ -100,7 +100,7 @@ public void inputAndDataWithDifferentValueAsPayLoadCauseException() { } @Test - public void extraParametersAreIgnoredIgnored() throws JsonProcessingException { + public void extraParametersAreIgnored() throws JsonProcessingException { // 0x96 = 150 final String json = """