Search documentation of Cartouche

# Cartouche.Wei (Cartouche v0.1.3)

Copy Markdown View Source

Conversions between Ethereum denominations and wei.

## Summary

### Functions

to_wei(amount)

Converts a number to wei, possibly from gwei, etc.

## Functions

# to_wei(amount)

    @spec to_wei(non_neg_integer() | {non_neg_integer(), :wei | :gwei}) ::
      non_neg_integer()

Converts a number to wei, possibly from gwei, etc.

## Examples

    iex> Cartouche.Wei.to_wei(100)
    100

    iex> Cartouche.Wei.to_wei({100, :gwei})
    100000000000