Apache Tuweni provides support for manipulating unsigned integers and base Ethereum currencies.
To get started, install the units
library.
With Maven:
{% highlight xml %} org.apache.tuweni units {{site.data.project.latest_release}} {% endhighlight %}
Or using Gradle:
{% highlight groovy %} implementation(“org.apache.tuweni:units:{{site.data.project.latest_release}}”) {% endhighlight %}
The units library revolves mainly around the Uint256
, Uint384
and Uint64
interfaces.
This tutorial goes over the main uses of Uint256
- you can apply the same behaviors over to Uint384
, Uint64
or Uint32
.
It will also touch on Wei
and Gas
.