Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Automatize contracts configuring #133

Open
Martoon-00 opened this issue Apr 26, 2021 · 0 comments
Open

Automatize contracts configuring #133

Martoon-00 opened this issue Apr 26, 2021 · 0 comments
Assignees
Labels
p2 Medium priority

Comments

@Martoon-00
Copy link
Collaborator

The number of contract variations is growing rapidly, and with the current approach maintaining them becomes too problematic. For instance, for english_auction contract we have

Currently, to get a version of the contract with tez and simple allowlisting, I create a contract called english_auction_tez_allowlisted.mligo that sole purpose is to glue basic contract components and then add it to the TS compilation scripts. And so for every single contract configuration.

Apparently, we have to come up with a scheme where it will be possible to ask TS script to e.g. enable whitelisting in a specific mode, and the script will automatically glue the necessary contract components. This scheme must be transparent for developers, to avoid situations when a compilation error is raised for an obscure reason.

I have little experience of working with LIGO and preprocessor pragmas, but my preliminary suggestion would be to assume that to enable a certain component in a complex contract one always adds a corresponding #include statement. E.g. english_auction_tez_allowlisted.mligo consists solely of includes, and english_auction_tez_fixed_fee.mligo can be rewritten to consist of those.

@Martoon-00 Martoon-00 added the p2 Medium priority label Apr 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2 Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants