solidity-conv

a type conversion utility library for Solidity

Usage no npm install needed!

<script type="module">
  import solidityConv from 'https://cdn.skypack.dev/solidity-conv';
</script>

README

Solidity Type Conversion Utils

Motivation

Conversion between types in Solidity can be tricky. Sometimes explicit typecasting would do the work, while it won't in other occasions (e.g. addressToString, i.e. hexstring to UTF-8).

If you are looking for utility library for bytes and string operations, look no further than Goncalo's bytes-utils and Nick Johnson's stringutils.

This library is mainly for conversion between types, especially between uint, bytes and string, fixed or dyanmic, we would like to abstract away those details and provide clean, intuitive API for Solidity dev.

Installation

Usage

Examples

Contributing

All contributions are welcomed.

Roadmap: