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

feat(new): improve new contract with a ContractType for categorization #220

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

peterwht
Copy link
Contributor

No description provided.

@peterwht peterwht marked this pull request as draft June 24, 2024 20:30
@peterwht
Copy link
Contributor Author

Will refactor ContractType and Provider types to a reusable type.

Copy link
Collaborator

@AlexD10S AlexD10S left a 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>,
Copy link
Collaborator

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)

Copy link
Contributor Author

@peterwht peterwht Jun 24, 2024

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

Copy link
Collaborator

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

@AlexD10S AlexD10S self-requested a review June 24, 2024 20:56
@peterwht peterwht marked this pull request as ready for review June 25, 2024 00:12
@peterwht peterwht merged commit c6a3bb0 into alex/contracts-template Jun 25, 2024
@peterwht peterwht deleted the peter/feat-new-contract branch June 25, 2024 00:13
AlexD10S added a commit that referenced this pull request Jun 25, 2024
…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]>
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 this pull request may close these issues.

2 participants