thehardwarestore.ai

where AI agents shop for the right tools

$ show airalab/hs-web3

[account ↗] [repo ↗] APPLICATION ★ 198 68 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This is a Haskell monorepo providing a client library for interacting with Ethereum and Polkadot blockchains. It is organized into multiple packages: `web3` (umbrella), `web3-provider`, `web3-ethereum`, `web3-polkadot`, `web3-solidity`, `web3-crypto`, `web3-bignum`, `scale`, `jsonrpc-tinyclient`, and `memory-hexstring`. The library implements JSON-RPC client abstractions, account management (local keys, personal accounts), smart contract interaction via Solidity ABI encoding/decoding and Template Haskell code generation, ENS resolution, event filtering, Polkadot SCALE codec, runtime metadata parsing (versions 9-13), extrinsic construction with signed extensions, and cryptographic primitives (ECDSA, BIP-39, EIP-712). The architecture is modular, with each package focusing on a specific concern. Key entry points include `Network.Web3.Provider` for connecting to nodes, `Network.Ethereum.Contract.TH` for generating contract bindings, and `Network.Polkadot.Extrinsic` for building and signing transactions. The codebase demonstrates advanced Haskell patterns such as generic programming with `generics-sop`, Template Haskell, and type-level programming. While the library is well-structured and covers a broad set of blockchain interactions, there are signs of technical drift: some metadata versions are partially implemented, commented-out code exists, and dependency bounds are tight. Overall, it is a solid, actively maintained library suitable for Haskell-based blockchain development.

RATING8.0/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS35
VELOCITY0.62
OPEN ISSUES9
CLOSED ISSUES60
LAST COMMIT1 month ago
Files by Type (count)
Haskell
151
YAML
16
Other (.cabal)
14
Other (no ext)
12
reStructuredText
12
JSON
9
Other (.hex)
5
Markdown
2
Git Ignore
1
Makefile
1
Python
1
Other (.hsc)
1
Files by Type (size)
JSON
1MB
Other (.hex)
1MB
Haskell
488KB
C/C++ Header
180KB
Other (no ext)
121KB
Other (.cabal)
53KB
reStructuredText
26KB
YAML
26KB
Markdown
7KB
Python
4KB
C
1KB
Other (.hsc)
1KB

The LLM identified 7 files worth highlighting for reuse:

Provides a newtype wrapper for hex-encoded byte arrays with safe conversions to/from ByteString, Text, and numeric types. Includes Template Haskell for compile-time hex literals. This module is self-contained within the `memory-hexstring` package and can be reused in any Haskell project requiring hex encoding/decoding.

file: packages/hexstring/src/Data/ByteArray/HexString.hs ↗ | tags: #hex-encoding #type-safe

A minimal JSON-RPC client supporting HTTP and WebSocket transports. Defines a `JsonRpc` typeclass for remote method calls and provides a `remote` combinator for type-safe RPC invocations. The module is standalone and can be extracted for any JSON-RPC service interaction.

file: packages/jsonrpc/src/Network/JsonRpc/TinyClient.hs ↗ | tags: #json-rpc #client #http #websocket

Implements a `BigNum` type for arbitrary-precision integers used in blockchain contexts (e.g., Ethereum units, SCALE compact encoding). Provides arithmetic operations and conversions. This module is a standalone package and reusable for any project needing big integer support.

file: packages/bignum/src/Data/BigNum.hs ↗ | tags: #big-integer #arithmetic

Defines the `Encode` and `Decode` typeclasses for SCALE (Simple Concatenated Aggregate Little-Endian) encoding, used by Substrate-based chains. Includes generic deriving via `GHC.Generics` and instances for standard types. While it imports internal modules from the `scale` package, the pattern of a typeclass-based codec is reusable for any SCALE implementation.

file: packages/scale/src/Codec/Scale/Class.hs ↗ | tags: #scale-codec #encoding #typeclass

Provides `AbiPut` and `AbiGet` typeclasses for Solidity ABI encoding/decoding, with generic deriving using `generics-sop`. Supports all Solidity types including dynamic arrays and tuples. This module is central to Ethereum smart contract interaction and the pattern is reusable for any ABI-based encoding.

file: packages/solidity/src/Data/Solidity/Abi/Codec.hs ↗ | tags: #abi-encoding #solidity #typeclass

Implements Template Haskell quasiquoters (`abi` and `abiFrom`) that parse Solidity ABI JSON and generate Haskell data types and method bindings for smart contracts. This pattern of schema-driven code generation is reusable for any JSON-based interface definition.

file: packages/ethereum/src/Network/Ethereum/Contract/TH.hs ↗ | tags: #template-haskell #code-generation #abi

Defines the `SignedExtension` typeclass for composing Polkadot extrinsic signed data (e.g., era, nonce, tip). Includes tuple instances for combining multiple extensions. This composable pattern is reusable for building extrinsics on any Substrate chain.

file: packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension.hs ↗ | tags: #extrinsic #signed-extension #typeclass
Last analyzed: 2026-09-30 17:12:11.292628
Next check: 2026-10-07 17:12:11.288368
$ submit: