guapswap / sigma-builders   1.0.4

GNU General Public License v3.0 only GitHub

Easy to use library for creating protocol abstractions interacting with Ergo blockchain.

Scala versions: 2.12

sigma-builders sigma-builders Scala version support

Easy to use library for creating protocol abstractions interacting with Ergo blockchain.

Motivation

When developing protocols on Ergo that involve multiple contracts and transactions, there is no standard way of structuring your code base to make using your protocol abstractions easy. However, there are common patterns since most of the time projects do the same thing: build and compile ErgoScript contracts, build custom boxes, build custom transactions.

This library defines common abstractions for creating the latter in a structured way, making use of the built-in functions from the Ergo Appkit library.

Packages

The library currently defines the following packages to help you design your protocol, with the intent of adding more functionality in the future as needed:

- builders
   - box_builders
   - contract_builders
   - tx_builders
- encoders
   - minting_encoders
- decoders
   - minting_decoders
- printers
   - minting_printers

When creating your project's structure, it is useful to duplicate the builders hierarchy, since those will be three primary constructs used throughout your protocol.