Contract

scalus.cardano.blueprint.Contract
trait Contract

A single-contract blueprint provider.

Extend this in an object that defines one compiled contract with its blueprint. The compiler plugin discovers implementations and the blueprint sbt task prints the JSON.

object MyContract extends Contract {
   private given Options = Options.release
   lazy val compiled = PlutusV3.compile(MyValidator.validate)
   lazy val blueprint = Blueprint.plutusV3[Datum, Redeemer](
       title = "My Contract",
       description = "...",
       version = "1.0.0",
       license = None,
       compiled = compiled
   )
}

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Concrete methods

final def blueprintJson: String

Returns the blueprint as a 2-space-indented JSON string.

Returns the blueprint as a 2-space-indented JSON string.

Attributes