Skip to content

Need 'template' support similar to PyTeal #52

Description

@pbennett

My infra works with raw teal, so I use beaker, pyteal, etc. to generate TEAL that's checked-in and built directly into binaries or part of a bootstrapping process.
That raw teal includes 'template' substitutions that are replaced with values specific to each environment (testnet / mainnet contract IDs, or parameter values for eg).

In PyTeal, a reference to a templated int (same w/ Bytes) might be like:
xxx.store( Itob(Tmpl.Int("TMPL_XXX")) )
which might become:

int TMPL_XXXX
itob
store 50

in TEAL. My code converts that prior to compilation, replacing the templates in descending length order.

This is one of the showstoppers for me in using Tealish.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequest a new feature or change to an existing one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions