Module avalanche_types::units
source · Expand description
Units for AVAX and other EVM-based subnets.
Constants§
- On the X-Chain, one AVAX is 10^9 units. On the P-Chain, one AVAX is 10^9 units. ref. https://snowtrace.io/unitconverter
- On the C-Chain, one AVAX is 10^18 units. ref. https://snowtrace.io/unitconverter
Functions§
- Converts the EVM AVAX unit to nano-AVAX. On the C-Chain, one AVAX is 10^18 units. ref. https://snowtrace.io/unitconverter If it overflows, it resets to U256::MAX.
- Converts the X/P chain AVAX unit to nano-AVAX. On the X and P-Chain, one AVAX is 10^9 units. ref. https://snowtrace.io/unitconverter If it overflows, it resets to U256::MAX.
- Converts the nano AVAX to AVAX/i64 unit for C-chain and other EVM-based subnets.
- Converts the nano AVAX to AVAX unit for X and P chain.