Current section
Files
Jump to
Current section
Files
priv/blueprint_generator/redeemer_simple.eex
defmodule <%= @module_name %> do
@moduledoc """
Redeemer functions for <%= @purpose %> validator.
Redeemer type: <%= @title %>
"""
alias Sutra.Cardano.Blueprint
# Schema for this redeemer (resolved from blueprint)
@schema <%= inspect(@schema, limit: :infinity, printable_limit: :infinity) %>
@doc """
Create <%= @title %> redeemer.
Encodes the value according to the schema and returns Plutus data.
"""
def <%= @func_name %>(value) do
Blueprint.encode(value, @schema)
end
end