# @daohaus/moloch-v3-legos

> Code Legos are static javascript objects that contain metadata used by Form Builder and Tx-Builder. The metadata is used to render UI elements, create transactions and interact with external smart contracts.

Latest version **0.5.5** (published 2025-03-03) · 0 weekly downloads

## Install

```sh
npm install @daohaus/moloch-v3-legos
pnpm add @daohaus/moloch-v3-legos
yarn add @daohaus/moloch-v3-legos
bun add @daohaus/moloch-v3-legos
```

## Health

**Score 40/100 (D)** — status: stable.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.5.5 |
| Published | 2025-03-03 |
| First published | 2023-02-28 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 66 |
| Unpacked size | 103.3 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 25 |
| Maintainers | daohaus-protocol |

## Links

- npm: https://www.npmjs.com/package/@daohaus/moloch-v3-legos
- Repository: https://github.com/HausDAO/monorepo
- Homepage: https://github.com/HausDAO/monorepo#readme
- Issues: https://github.com/HausDAO/monorepo/issues
- npm.io page: https://npm.io/package/@daohaus/moloch-v3-legos

## Dependencies (66)

- [uuid](https://npm.io/package/uuid.md) 9.0.0
- [viem](https://npm.io/package/viem.md) 1.6.0
- [react](https://npm.io/package/react.md) 18.2.0
- [tslib](https://npm.io/package/tslib.md) 2.6.1
- [wagmi](https://npm.io/package/wagmi.md) 1.3.10
- [ethers](https://npm.io/package/ethers.md) 5.7.2
- [numbro](https://npm.io/package/numbro.md) 2.3.6
- [graphql](https://npm.io/package/graphql.md) 16.3.0
- [date-fns](https://npm.io/package/date-fns.md) 2.30.0
- [polished](https://npm.io/package/polished.md) 4.2.2
- [classnames](https://npm.io/package/classnames.md) 2.3.2
- [@daohaus/ui](https://npm.io/package/@daohaus/ui.md) 0.5.5
- [@wagmi/core](https://npm.io/package/@wagmi/core.md) 1.3.9
- [cross-fetch](https://npm.io/package/cross-fetch.md) 3.1.8
- [localforage](https://npm.io/package/localforage.md) 1.10.0
- [react-icons](https://npm.io/package/react-icons.md) 4.10.1
- [react-query](https://npm.io/package/react-query.md) 3.39.3
- [@daohaus/abis](https://npm.io/package/@daohaus/abis.md) 0.5.5
- [@daohaus/utils](https://npm.io/package/@daohaus/utils.md) 0.5.5
- [react-markdown](https://npm.io/package/react-markdown.md) 9.0.0
- [graphql-request](https://npm.io/package/graphql-request.md) 4.3.0
- [react-hook-form](https://npm.io/package/react-hook-form.md) 7.45.4
- [@daohaus/connect](https://npm.io/package/@daohaus/connect.md) 0.5.5
- [@radix-ui/colors](https://npm.io/package/@radix-ui/colors.md) 0.1.9
- [@shazow/whatsabi](https://npm.io/package/@shazow/whatsabi.md) 0.8.5
- [@web3modal/react](https://npm.io/package/@web3modal/react.md) 2.7.1
- [ethers-multisend](https://npm.io/package/ethers-multisend.md) 2.4.0
- [react-datepicker](https://npm.io/package/react-datepicker.md) 4.21.0
- [react-router-dom](https://npm.io/package/react-router-dom.md) 6.4.1
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) 2.7.0
- [styled-components](https://npm.io/package/styled-components.md) 6.0.7
- [@ethersproject/abi](https://npm.io/package/@ethersproject/abi.md) 5.7.0
- [@hookform/devtools](https://npm.io/package/@hookform/devtools.md) 4.3.1
- [@0xsequence/indexer](https://npm.io/package/@0xsequence/indexer.md) 2.2.14
- [@daohaus/tx-builder](https://npm.io/package/@daohaus/tx-builder.md) 0.5.5
- [@walletconnect/core](https://npm.io/package/@walletconnect/core.md) 2.10.0
- [@web3modal/ethereum](https://npm.io/package/@web3modal/ethereum.md) 2.7.1
- [@daohaus/form-builder](https://npm.io/package/@daohaus/form-builder.md) 0.5.5
- [@daohaus/profile-data](https://npm.io/package/@daohaus/profile-data.md) 0.5.5
- [@radix-ui/react-toast](https://npm.io/package/@radix-ui/react-toast.md) 1.1.4
- [@walletconnect/client](https://npm.io/package/@walletconnect/client.md) 1.8.0
- [@radix-ui/react-avatar](https://npm.io/package/@radix-ui/react-avatar.md) 1.0.3
- [@radix-ui/react-dialog](https://npm.io/package/@radix-ui/react-dialog.md) 1.0.4
- [@radix-ui/react-switch](https://npm.io/package/@radix-ui/react-switch.md) 1.0.3
- [@storybook/core-common](https://npm.io/package/@storybook/core-common.md) 6.5.16
- [@daohaus/keychain-utils](https://npm.io/package/@daohaus/keychain-utils.md) 0.5.5
- [@daohaus/moloch-v3-data](https://npm.io/package/@daohaus/moloch-v3-data.md) 0.5.5
- [@radix-ui/react-tooltip](https://npm.io/package/@radix-ui/react-tooltip.md) 1.0.6
- [@daohaus/connect-context](https://npm.io/package/@daohaus/connect-context.md) 0.5.5
- [@daohaus/moloch-v3-hooks](https://npm.io/package/@daohaus/moloch-v3-hooks.md) 0.5.5
- [@radix-ui/react-checkbox](https://npm.io/package/@radix-ui/react-checkbox.md) 1.0.4
- [ethereum-blockies-base64](https://npm.io/package/ethereum-blockies-base64.md) 1.0.2
- [rollup-plugin-sourcemaps](https://npm.io/package/rollup-plugin-sourcemaps.md) 0.6.3
- [@daohaus/data-fetch-utils](https://npm.io/package/@daohaus/data-fetch-utils.md) 0.5.5
- [@daohaus/moloch-v3-fields](https://npm.io/package/@daohaus/moloch-v3-fields.md) 0.5.5
- [@gnosis.pm/safe-contracts](https://npm.io/package/@gnosis.pm/safe-contracts.md) 1.3.0
- [@radix-ui/react-separator](https://npm.io/package/@radix-ui/react-separator.md) 1.0.3
- [@walletconnect/web3wallet](https://npm.io/package/@walletconnect/web3wallet.md) 1.9.0
- [@daohaus/form-builder-base](https://npm.io/package/@daohaus/form-builder-base.md) 0.5.5
- [@radix-ui/react-collapsible](https://npm.io/package/@radix-ui/react-collapsible.md) 1.0.3
- [@radix-ui/react-radio-group](https://npm.io/package/@radix-ui/react-radio-group.md) 1.1.3
- [@walletconnect/legacy-types](https://npm.io/package/@walletconnect/legacy-types.md) 2.0.0
- [@radix-ui/react-dropdown-menu](https://npm.io/package/@radix-ui/react-dropdown-menu.md) 2.0.5
- [@radix-ui/react-accessible-icon](https://npm.io/package/@radix-ui/react-accessible-icon.md) 1.0.3
- [@radix-ui/react-navigation-menu](https://npm.io/package/@radix-ui/react-navigation-menu.md) 1.1.3
- [@graphql-typed-document-node/core](https://npm.io/package/@graphql-typed-document-node/core.md) 3.2.0

## Recent versions

- 0.5.5 (latest) — 2025-03-03
- 0.2.0-alpha.6 (alpha) — 2023-08-18
- 0.5.4 — 2024-10-29
- 0.5.3 — 2024-09-06
- 0.5.2 — 2024-06-14
- 0.5.1 — 2024-05-09
- 0.5.0 — 2024-05-03
- 0.4.5 — 2024-05-02
- 0.4.4 — 2024-03-29
- 0.4.3 — 2024-03-21
- 0.4.2 — 2024-01-26
- 0.4.1 — 2024-01-18
- 0.4.0 — 2024-01-17
- 0.3.3 — 2023-12-19
- 0.3.2 — 2023-11-10
- … 19 more at https://npm.io/package/@daohaus/moloch-v3-legos/versions

## README

# @daohaus/moloch-v3-legos

Code Legos are static javascript objects that contain metadata used by Form Builder and Tx-Builder. The metadata is used to render UI elements, create transactions and interact with external smart contracts.

They allow you to create complex transactions and form UI.

## Types of Code Legos

- **[Form Legos](https://github.com/HausDAO/monorepo/blob/develop/libs/moloch-v3-legos/src/form.ts):** Instruct form builder to render forms.
- **[Field Legos](https://github.com/HausDAO/monorepo/blob/develop/libs/moloch-v3-legos/src/fields.ts):** Instruct form builder to render fields inside forms.
- **[Transaction Legos](https://github.com/HausDAO/monorepo/blob/develop/libs/moloch-v3-legos/src/tx.ts):** Provide the transaction schemas & prepare arguments for external smart contract calls.
- **[Contract Legos](https://github.com/HausDAO/monorepo/blob/develop/libs/moloch-v3-legos/src/contracts.ts):** Provide the contract addresses and Application Binary Interfaces (ABIs) required for external smart contract calls.

#### Related packages

- [**TX-Builder**](https://github.com/HausDAO/monorepo/tree/develop/libs/tx-builder)
- [**Form-builder**](https://github.com/HausDAO/monorepo/tree/develop/libs/form-builder)
- [**Moloch V3 Fields**](https://github.com/HausDAO/monorepo/tree/develop/libs/moloch-v3-fields)

### [View on NPM](https://www.npmjs.com/package/@daohaus/moloch-v3-legos)

## Usage

### Installation

```bash
yarn add @daohaus/moloch-v3-legos
```

### Examples

TODO: Link into new docs app when ready

**Here is a [tutorial on form and transaction building]().**

[**How to make a contract lego**]()

[**How to make a field lego**]()

[**How to make a transaction lego**]()

[**How to make a form lego**]()

## Building

Run `nx run moloch-v3-legos:build` to build the library.

---
_Source: https://npm.io/package/@daohaus/moloch-v3-legos · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
