-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat(new): improve new contract with a ContractType for categorization #220
Conversation
Will refactor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! just left a comment
default_value = ContractType::Examples.as_ref(), | ||
value_parser = crate::enum_variants!(ContractType) | ||
)] | ||
pub(crate) contract_type: Option<ContractType>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I received feedback on a pending PR suggesting that we should make the flags shorter. I like it, do you think makes sense to call it only type? #209 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, type is a reserved keyword in Rust. Could maybe do category
instead? Could also be c_type
, but that's not super clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it contract_type then, c_type is a bit confusing
…201) * feat: ux user guide for contract creation and list contract templates * refactor: add template structure when creating parachain and flipper by default * chore: add git functions to clone repository in pop-contracts * feat: clone repository and extract only template files * feat: rename smart contract * chore: check contract naming * refactor: consistent messaging with parachain generation * docs: add contract templates info in README * fix: fixes ans small refactors * test: add unit tests * test: few more unit test for templates and git * fix: build issue * fix: placeholder for contract and enum_variants error * docs: fix feedback * refactor: pop_common crate * refactor: remove newline and add after license * test: test and docs for replace_in_file and canonicalized_path function * docs: fix links and comments * fix: link * refactor: remove unused dependencies * refactor: remove unused errors in pop_parachain * refactor: include replace_in_file in common crate * feat(new): improve new contract with a ContractType for categorization (#220) * feat(new): update templates in new contract with ContractType * fix(new): shorter name and test fix * refactor: rename flag to contract_type * docs: apply feedback --------- Co-authored-by: Peter White <[email protected]>
No description provided.