Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate audited transactions to FLIX #59

Open
bartolomej opened this issue Nov 14, 2023 · 0 comments · May be fixed by #60
Open

Migrate audited transactions to FLIX #59

bartolomej opened this issue Nov 14, 2023 · 0 comments · May be fixed by #60

Comments

@bartolomej
Copy link

bartolomej commented Nov 14, 2023

Description

There is now an official standard for recording audited transaction templates called FLIX: https://github.com/onflow/flips/blob/main/application/20220503-interaction-templates.md

I believe this repo has a larger collection of audited transactions than the official FLIX one (https://github.com/onflow/flow-interaction-template-service), so I think it would be beneficial to migrate transactions stored in this repo to FLIX standard.

Solution

I think we could write an automated script that would do most of the migration work, such as:

  • build a basic FLIX data structure with f_type, f_version, data.cadence, data.type, data.interface fields
  • compute the template ID as described in FLIP-934
  • transform blocto i18n message to data.messages.description field
    • data.messages.title would either need to be manually added or we could try to generate a summarized version of the description (e.g. without the replacement params, as this example demonstrates)
  • use blocto config.json to generate partial dependency info
    • we could retrieve dependency contract name by parsing the transaction source code (import ContractName from 0xAddress)
    • we won't be able to determine the pin info automatically
  • parse transaction source code to generate arguments info (without messages.title, since that requires human input)

Impact

This would expand the existing FLIX collection and make it more useful for Flow developers.

It would also improve the DX for developers using Flowser, as we are working on integrating FLIX: onflowser/flowser#207. After integration is completed, developers would be able to easily search and discover a large collection of FLIX templates and interact with them directly from the Flowser app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant