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.
- Form Legos: Instruct form builder to render forms.
- Field Legos: Instruct form builder to render fields inside forms.
- Transaction Legos: Provide the transaction schemas & prepare arguments for external smart contract calls.
- Contract Legos: Provide the contract addresses and Application Binary Interfaces (ABIs) required for external smart contract calls.
yarn add @daohaus/moloch-v3-legos
TODO: Link into new docs app when ready
Here is a tutorial on form and transaction building.
How to make a transaction lego
Run nx run moloch-v3-legos:build
to build the library.