This PR enables the tok scaling factor to be configured at build time via a new checker.yaml config file. Instead of simply doing a sed on tok.ml, this PR uses a template engine (jinja2) to generate tok.ml. While this is a bit overkill for this specific issue, it provides the scaffolding for more complex code generation logic which will be required as we continue to work on #213 along with providing the tools needed to make system constants configurable. For example, using this approach we can easily generate modules for the various collateral and cfmm tokens for the different Checker variants outlined here. It also provides the Python scaffolding for porting over other build scripts (e.g generate-entrypoints.rb) in the future.
This PR enables the
tok
scaling factor to be configured at build time via a newchecker.yaml
config file. Instead of simply doing ased
ontok.ml
, this PR uses a template engine (jinja2) to generatetok.ml
. While this is a bit overkill for this specific issue, it provides the scaffolding for more complex code generation logic which will be required as we continue to work on #213 along with providing the tools needed to make system constants configurable. For example, using this approach we can easily generate modules for the various collateral and cfmm tokens for the different Checker variants outlined here. It also provides the Python scaffolding for porting over other build scripts (e.ggenerate-entrypoints.rb
) in the future.Closes #251