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

Add remove command #837

Merged
merged 38 commits into from
Feb 15, 2023
Merged

Add remove command #837

merged 38 commits into from
Feb 15, 2023

Conversation

lean-apple
Copy link
Contributor

@lean-apple lean-apple commented Nov 22, 2022

In the wake of this issue, #671

ToDo :

  • Improve how to get code_hash
  • Add Tests with arg and with the manifest path only
  • Update documentation

Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can see it's still a WIP but looks reasonable so far. The main thing to check is about that dry-run endpoint on pallet-contracts. We may want to consider that it is not necessary in this case to do the dry-run since we don't need the gas limit estimate like we do with other commands. The only thing to think about is how to elegantly handle the case where the code_has to be removed does not exist on chain.

crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
@ascjones
Copy link
Collaborator

Once #893 is merged we could use that too for determining the code hash

@lean-apple lean-apple changed the title Add remove command Add remove command Jan 16, 2023
@lean-apple lean-apple marked this pull request as ready for review January 25, 2023 17:07
Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I think we need the optional --code-hash arg back though.

crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
docs/extrinsics.md Outdated Show resolved Hide resolved
@lean-apple lean-apple requested a review from SkymanOne as a code owner February 3, 2023 19:28
Copy link
Contributor

@SkymanOne SkymanOne 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 a few nitpicks :)
Also, should we have a confirmation just in case?

crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few suggestions but we are nearly there!

crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
docs/extrinsics.md Show resolved Hide resolved
docs/extrinsics.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the final couple of comments then we can merge 👍

crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/remove.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@lean-apple
Copy link
Contributor Author

Thanks for the final touches

@ascjones ascjones merged commit 901d805 into master Feb 15, 2023
@ascjones ascjones deleted the ln-add-remove-command branch February 15, 2023 11:47
This was referenced Feb 15, 2023
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