Skip to content

Elm implementation of the Ethereum ABI Encoding/Decoding procedures

Notifications You must be signed in to change notification settings

ResiliaDev/EthABI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EthAbi

This is an Elm implementation of the Ethereum ABI Encoding/Decoding procedures.

It strives to be:

  • Correct, adhering to the Solidity ABI Encoding/Decoding Specification
  • Feature complete.
  • Intuitive to use.
  • Type-safe.
  • Not care about anything else of Ethereum, or how we might talk with a Blockchain. This library handles the ABI-part only, and could be integrated in any library that needs this

Progress

  • Types (for types that do not map 1:1 to Elm types)

    • int256
    • runtime-selectable int size encoder.
    • wrappers for all available int types.
    • uint256
    • runtime-selectable uint size encoder.
    • wrappers for all available uint types.
    • bytes32
    • static_bytes where you pass in the length.
    • wrappers for all available static bytes types.
    • bytes
    • Hexstring, the type of encoded hexadecimal strings that represent bytes (which are the output of the Encoder and input of the Decoder)
  • Encoding

    • Main encoding function encode.
    • int256
    • uint256
    • bool
    • bytes32
    • bytes
    • string
    • Tuples
    • Arrays of static size (that properly switch between static and dynamic locations based on element type!)
    • Arrays with dynamic size
  • Decoding

    • Main decoding function decodeHexstring
    • map
    • map2
    • apply
    • andThen
    • succeed
    • fail
    • int256
    • uint256
    • bool
    • bytes32
    • static_bytes where you pass in the length.
    • Arrays of static size (that properly switch between static and dynamic body locations based on element type!) -- WIP!!
    • Arrays of dynamic size
    • Tuples, by using map, map2 and apply.
  • Other

    • Possibility to create function signature from given encoder types and function name.
  • Tests

About

Elm implementation of the Ethereum ABI Encoding/Decoding procedures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages