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

Added upload_with_access #485

Conversation

Kayanski
Copy link
Contributor

@Kayanski Kayanski commented Sep 9, 2024

This PR aims at allowing users to upload cosmwasm contracts with instantiate permission settings.

Checklist

  • Changelog updated.
  • Docs updated.

Copy link

cloudflare-workers-and-pages bot commented Sep 9, 2024

Deploying cw-orchestrator with  Cloudflare Pages  Cloudflare Pages

Latest commit: 93f00d5
Status: ✅  Deploy successful!
Preview URL: https://ba61a75e.cw-orchestrator.pages.dev
Branch Preview URL: https://nicolas-orc-165-add-possibil.cw-orchestrator.pages.dev

View logs

@Kayanski Kayanski marked this pull request as ready for review September 9, 2024 09:23
@Kayanski Kayanski requested a review from Buckram123 September 9, 2024 09:24
Copy link
Contributor

@Buckram123 Buckram123 left a comment

Choose a reason for hiding this comment

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

I guess it would be rarely used, so LGTM. But if we want it to have nice API, don't think it makes sense for AccessType::Unspecified AcessType::Nobody and AcessType::Everybody to accept addresses: Vec<String>

packages/cw-orch-core/src/environment/mod.rs Show resolved Hide resolved
Copy link
Contributor

@Buckram123 Buckram123 left a comment

Choose a reason for hiding this comment

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

New API much more user friendly!

packages/cw-orch-core/src/environment/tx_handler.rs Outdated Show resolved Hide resolved
cw-orch/src/prelude.rs Outdated Show resolved Hide resolved
instantiate_permission: None,
instantiate_permission: access
.map(|a| {
let response = match a {
Copy link
Contributor

Choose a reason for hiding this comment

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

Move this into a try_into implementation?

Copy link
Contributor Author

@Kayanski Kayanski Sep 11, 2024

Choose a reason for hiding this comment

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

That's not possible because AccessConfig is defined in cw-orch-core and cosmrs is not a dependency of the core crate. Moved that behavior to a function for beter readability

@Kayanski Kayanski merged commit 434d31d into main Sep 11, 2024
9 of 13 checks passed
@Kayanski Kayanski deleted the nicolas/orc-165-add-possibility-to-configure-the-instantiate-permissions-on branch September 11, 2024 14:16
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