onflow / cadence-libraries

Libraries for common programming utilities in the Cadence smart contract programming language
The Unlicense
9 stars 5 forks source link

Cadence Library Ideas #1

Open joshuahannan opened 3 years ago

joshuahannan commented 3 years ago

Issue To Be Solved

There are many different programming libraries that could be useful in Cadence and this issue will be a place to discuss and catalog them.

Suggest A Solution

Please leave comments in this issue if you think of a library that would be useful add. This issue will also be updated with ideas as they are added. If you want to build one, you can choose one from the list and build it yourself! 😃

When adding a new template:

  1. Create an issue for the library you are adding and assign it to yourself. Leave a comment on this post that you are working on it. Include any relevant questions or discussion about your template in the issue that you create.
  2. Write the library as a .cdc file and save it in the contracts directory.
  3. Write example transactions for using your library and save them in the transactions/ directory.
  4. Use transaction parameters instead of hard-coded values.
  5. Write a go template getter in lib/go/templates/ and run make generate in that directory.
  6. Write tests for your library functions and transactions in lib/go/test/ and make sure the test passes.
  7. Ensure that your libraries, templates, and tests are well commented.

Template Suggestions

Feel free to choose a library idea from this list to work on, or make a comment to add your own idea.

joshuahannan commented 3 years ago

Anybody else have any ideas for libraries that would be useful for Cadence? Feel free to add a comment here if you have a new idea. Also, any of the ideas that are in this post are up for grabs if you'd like to take a stab at writing one yourself! I'll be able to give you all the assistance you need. 😃

franklywatson commented 1 year ago

Some possible candidates for this in Austin's repo: https://github.com/green-goo-dao/flow-utils/tree/main/cadence/contracts