Generate FLIX using Cadence comment header block
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 0
- Forks
- 7
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 2
Description
Given a cadence file generate flix json, generate version 1.1.0
Cadence comment block and language support
- Support Cadence doc FLIP
- Support "@..." properties -
Inside a Cadence transaction or scriptin comment - Support additional language json description file -
As a separate JSON file, optional file - Error handling, @message title is required to generate template from Cadence
- If only @message title is available, generate template.
- Only one tx or script in one .cdc file
- Support "@..." properties -
1.1.0 considerations
- Support FLIX 1.1.0 data structure
- Support hashing algorithm -
Data Structure Serialization & Identifier Generation
- Support hashing algorithm -
Generation considerations
- Support passing in destination folder to generate method in flix-kit, default destination is
templatedirectory from exe dir. - Support user passing in flow.json for contract addresses for tx and scripts dependences.
- Support emulator network for local development
Template naming
- Name template file based on @message title property using all lower case and
_for spaces. If title is not given then use hash of cadence. (not a hard requirement, a place to start)
Note: The two FLIPS identified in this task are still in development, they can change based on development.
Future Plans:
watch process to auto generate templates as cadence developer changes their cadence files them templates would get auto-generated
flixkit folder structure for binding generation
├── main.go
├── binding/
│ ├── generator.go
│ └── javascript/
│ └── generator.go
│ └── templates/
│ └── js_template.tpl
└── ...
typescript would get it's own folder as well.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with main.go and the generators under binding/, including binding/generator.go and binding/javascript/generator.go. Read the linked Cadence and FLIX FLIPs first, then trace how flixkit currently generates bindings and templates. Done would require agreeing on the changing FLIX 1.1.0 and Cadence comment requirements, generation options, naming, and error handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100