ligolang / contract-catalogue

FA2 LIGO Smart Contracts.
MIT License
13 stars 11 forks source link

Make deploy scripts more useful #40

Open aguillon opened 8 months ago

aguillon commented 8 months ago

Right now the script in deploy/ are only useful to quickly test that the contracts (actually, only one) can indeed be deployed on a Tezos network. However, the initial ledger, the metadata, the token metadata, etc. are all pre-set and so is the account originating the contract (although that does not matter much as there is no admin to this contract).

It could be useful to spend some time improving this contract so that users can effortlessly use it to deploy new tokens. This would require setting all the aforementioned data and reading the required information (secret key, etc.) from e.g. an environment variable.

I suggest to follow the example from the permit-cameligo repository. It would probably be more intuitive to configure every information (private key, RPC, and initial storage) in an ad-hoc JSON file.

Moreover, in the same spirit of building an extensible library than for the last PRs, it would be nice if such as script could be extended by projects using the library.

Doing this in TypeScript seems to make the most sense.