flow-nft
                                
                                 flow-nft copied to clipboard
                                
                                    flow-nft copied to clipboard
                            
                            
                            
                        Add new transaction and script templates
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:
- 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.
- Write the template as a .cdcfile and save it in thetransactionsdirectory.
- Save the non fungible token address as 0xNFTADDRESS.
- Save the example token address as 0xNFTCONTRACTADDRESS.
- Use ExampleNFTas the token name andNFTCollection, etc. as the token and storage name.
- Use transaction parameters instead of hard-coded values.
- Write a go template getter in lib/go/templates/and runmake generatein that directory.
- Write a test for your transaction in lib/go/test/and make sure the test passes.
- 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.
- Send tokens to multiple addresses. The addresses and ids to send can be configurable parameters to the transaction.
- Remove the public receiver capability from an account.
- Create a provider capability and store it in another account's /private/domain.
- Use an account's provider capability in your /private/domain to withdraw tokens from their account and deposit it in your account.
Anyone else have any suggestions for transactions or scripts you'd like to see? Leave a comment with your suggestions! 😄
This is a good issue! I'll work on some :)
Thanks @alxocity! Let me know if you have any questions or need any help! :)