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(contracts): New contract templates #249

Merged
merged 21 commits into from
Jul 13, 2024

Conversation

al3mart
Copy link
Contributor

@al3mart al3mart commented Jul 9, 2024

Adds new templates with PSPs implementations

  • PSP22
  • PSP34

Also includes new templates with examples for ink! smart contracts implementing:

  • Cross contract calls
  • DNS
  • Multisig

Changes ContractType for ContractProvider.
Sets Provider as PROPERTY in the TEMPLATE implementation for Contract .
Maintains Type as it could be useful in the future.

Directories within the templates are now copied along with their content. frontend folders included in templates are excluded.

Due to the different repository structure between the available templates, introduces a small patch to properly extract the files of the cloned repo.

@al3mart al3mart requested a review from AlexD10S July 9, 2024 00:32
@al3mart al3mart changed the title feat(contracts): New contract tempaltes feat(contracts): New contract templates Jul 9, 2024
@evilrobot-01
Copy link
Contributor

Could you merge/rebase please? There were some recent improvements to the new contract command experience which are missing. Tried to do it quickly locally but it showed conflicts which dont seem to show up here.

@al3mart al3mart changed the base branch from alex/integration-tests to main July 10, 2024 17:11
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 72.52747% with 25 lines in your changes missing coverage. Please review.

Project coverage is 70.85%. Comparing base (c776588) to head (ed3d61c).

@@            Coverage Diff             @@
##             main     #249      +/-   ##
==========================================
+ Coverage   70.81%   70.85%   +0.04%     
==========================================
  Files          47       47              
  Lines        7664     7744      +80     
  Branches     7664     7744      +80     
==========================================
+ Hits         5427     5487      +60     
- Misses       1315     1317       +2     
- Partials      922      940      +18     
Files Coverage Δ
crates/pop-contracts/src/templates.rs 98.24% <100.00%> (+0.57%) ⬆️
crates/pop-cli/src/commands/new/contract.rs 48.34% <0.00%> (ø)
crates/pop-contracts/src/utils/helpers.rs 76.92% <50.00%> (-4.90%) ⬇️
crates/pop-contracts/src/new.rs 76.12% <60.86%> (-2.45%) ⬇️

... and 1 file with indirect coverage changes

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.

Great job!

@AlexD10S AlexD10S merged commit 2caa6db into main Jul 13, 2024
18 checks passed
@AlexD10S AlexD10S deleted the al3mart/feat-new-contract-examples branch July 13, 2024 11:22
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.

3 participants