Calculate task-expiry-time & task-automation-fee
Last updated
Last updated
Supra tasks only run after the next epoch. Here’s how to calculate it.
buffer
is the duration that you wish to set the automation task to run for. Please note that the max duration that your task may be registered for is 7 days from the time of registration.
Example:
Use:
--task-expiry-time-secs 1748035485
Use this endpoint to estimate the automation execution fee:
--task-automation-fee-cap 1440000000
--task-max-gas-amount
Max gas your function can use
--task-gas-price-cap
Max gas price per unit to avoid spikes
--task-expiry-time-secs
Deadline for task (UNIX time)
--task-automation-fee-cap
Max fee (in microSUPRA) for automation
--function-id
Target public entry function to trigger
--args (optional, per target function)
Arguments to pass to the function
--task-max-gas-amount
Run a dry run to check for success
task_duration_cap_in_secs
Maximum allowable duration (in seconds) from the registration time that an automation task can run, If the expiration time exceeds this duration, the task registration will fail.
registry_max_gas_cap
Maximum gas allocation for automation tasks per epoch, exceeding this limit during task registration will cause failure and is used in fee calculation.
automation_base_fee_in_quants_per_sec
Base fee per second for the full capacity of the automation registry, measured in quants/sec. The capacity is considered full if the total committed gas of all registered tasks equals registry_max_gas_cap.
flat_registration_fee_in_quants
Flat registration fee charged by default for each task.
congestion_threshold_percentage
Relative to registry_max_gas_cap. Beyond this threshold, congestion fees apply.
congestion_base_fee_in_quants_per_sec
Base fee per second for the full capacity of the automation registry when the congestion threshold is exceeded.
congestion_exponent
The congestion fee increases exponentially based on this value, ensuring higher fees as the registry approaches full capacity
task_capacity
Maximum number of tasks that registry can hold