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

Automatize contracts configuring  #133

@Martoon-00

Description

@Martoon-00

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.

Metadata

Metadata

Assignees

Labels

p2Medium priority

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions