onflow / flow-nft

The non-fungible token standard on the Flow blockchain
https://onflow.org
The Unlicense
465 stars 169 forks source link

Add new transaction and script templates #21

Open joshuahannan opened 4 years ago

joshuahannan commented 4 years ago

Issue To Be Solved

There are many ways non fungible tokens can be used and we want more transaction templates to be defined for them.

Suggest A Solution

Please leave comments in this issue if you think of a transaction that you would like to be added as a template. This issue will also be updated with ideas as they are added.

When adding a new template:

  1. Create an issue for the template 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 template as a .cdc file and save it in the transactions directory.
  3. Save the non fungible token address as 0xNFTADDRESS.
  4. Save the example token address as 0xNFTCONTRACTADDRESS.
  5. Use ExampleNFT as the token name and NFTCollection, etc. as the token and storage name.
  6. Use transaction parameters instead of hard-coded values.
  7. Write a go template getter in lib/go/templates/ and run make generate in that directory.
  8. Write a test for your transaction in lib/go/test/ and make sure the test passes.
  9. Ensure that your template and test are well commented.

Template Suggestions

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

joshuahannan commented 4 years ago

Anyone else have any suggestions for transactions or scripts you'd like to see? Leave a comment with your suggestions! 😄

alxocity commented 4 years ago

This is a good issue! I'll work on some :)

joshuahannan commented 4 years ago

Thanks @alxocity! Let me know if you have any questions or need any help! :)