Skip to main content

ash.avalanche.convert

The ash.avalanche.convert filter converts an amount between AVAX units.

Usage

This filter is useful to submit transactions without errors in the number of zeros:

ash.avalanche.tx:
[...]
params:
[...]
amount: "{{ 25 | ash.avalanche.convert('AVAX', 'nAVAX') | int }}"

Supported units

UnitAmount in wei
wei1
gwei or navax1e9 (1000000000)
avax or eth1e18 (1000000000000000000)
note

The filter is not case sensitive: ash.avalanche.convert('AVAX', 'nAVAX') is the same as ash.avalanche.convert('avax', 'navax')