Skip to main content
PATCH
/
tenant
/
{tenantId}
/
admin
/
blockchain
/
{blockchainId}
/
update
/
gas-station-defaults
Update Blockchain Gas Station Defaults
curl --request PATCH \
  --url https://api.example.com/tenant/{tenantId}/admin/blockchain/{blockchainId}/update/gas-station-defaults \
  --header 'Content-Type: application/json' \
  --data '
{
  "blockchainId": 42,
  "minimumGasBalance": 0.25,
  "maxGasBalance": 10,
  "refillAmount": 2.5,
  "maxRefillAmount": 5
}
'
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Description

Modifies the gas station default configuration for a specific blockchain, controlling automatic wallet refill behavior including balance thresholds and refill amounts.

Input

Expects a JSON body containing:
  • minGasBalance (decimal, optional) - Minimum gas balance threshold for triggering refills.
  • maxGasBalance (decimal, optional) - Maximum gas balance allowed in wallets.
  • refillAmount (decimal, optional) - Amount to refill when threshold is reached.
  • maxRefillAmount (decimal, optional) - Maximum refill amount permitted.
Path parameters:
  • tenantId (long, required) - The unique identifier of the tenant.
  • blockchainId (long, required) - The unique identifier of the blockchain.

Output

Returns a BlockchainBaseUpdateResponse indicating success or failure of the update operation.

Examples

Request
PATCH /api/tenant/1024/admin/blockchain/1/gasstation/defaults
{
  "minGasBalance": "0.1",
  "maxGasBalance": "1.0",
  "refillAmount": "0.5",
  "maxRefillAmount": "2.0"
}
Response (200 OK)
{
  "success": true,
  "message": "Gas station defaults updated successfully"
}

Errors

  • 400 Bad Request: Invalid parameters or validation failure.
  • 401 Unauthorized: The caller is not authenticated.
  • 403 Forbidden: The caller is not authorized to update gas station defaults.
  • 404 Not Found: The tenant or blockchain could not be found.
  • 500 Internal Server Error: An unexpected server error occurred.

Notes

Changes to gas station defaults affect all subsequent wallet refill operations for the blockchain.

Path Parameters

tenantId
integer<int64>
required

The unique identifier of the tenant.

blockchainId
integer<int64>
required

The unique identifier of the blockchain.

Query Parameters

api-version
string | null

Body

application/json

Request containing the updated gas station default settings.

Request to update default gas station thresholds for a blockchain network.

blockchainId
integer<int64>

Identifier of the blockchain to apply the defaults to.

Example:

42

minimumGasBalance
number<decimal>

Minimum balance that triggers a refill operation.

Example:

0.25

maxGasBalance
number<decimal>

Maximum balance allowed after a refill.

Example:

10

refillAmount
number<decimal>

Default amount of gas to add during a refill.

Example:

2.5

maxRefillAmount
number<decimal>

Maximum amount of gas that can be added in a single refill.

Example:

5

Response

Gas station defaults updated successfully.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object

The result value returned when the operation is successful.

Example:
{ "success": true }