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

Removed feature interface from docs #346

Merged

Conversation

anistark
Copy link
Contributor

@anistark anistark commented Mar 14, 2024

This PR aims at updating the cw-orch docs:

  1. Remove the need for the interface feature. Replace by the target flag when needed (only for Uploadable trait)
  2. Adapt the docs to remove the mandatory handle parameters inside the Daemon

@Kayanski
Copy link
Contributor

Kayanski commented Mar 14, 2024

We need to keep the re-export though here ! Without the feature flag macro

Copy link

cloudflare-workers-and-pages bot commented Mar 14, 2024

Deploying cw-orchestrator with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4d40257
Status:⚡️  Build in progress...

View logs

@CyberHoward
Copy link
Contributor

I'm pretty sure there are more instances where this flag is used (in the actual code which is referenced in the documentation).

Maybe something that @Kayanski could remove more efficiently

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.

LFGGGGGG

cargo add --optional cw-orch
cargo add cw-orch
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥

cw-orch = {version = "0.17.0", optional = true } # Latest version at time of writing
cw-orch = {version = "0.21.0" } # Latest version at time of writing
Copy link
Contributor

Choose a reason for hiding this comment

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

Love it from looking at every change in these docs


## Importing cw-orch

Importing `cw-orch` as a dependency in your smart contract is not a problem. We have built this library such that every feature that cw-orch imports, uses or exposes is not included when compiled for Wasm. This means that you are safe to use any cw-orch feature when developing your application, creating interfaces, exporting features, because none of it will land in your contract.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Importing `cw-orch` as a dependency in your smart contract is not a problem. We have built this library such that every feature that cw-orch imports, uses or exposes is not included when compiled for Wasm. This means that you are safe to use any cw-orch feature when developing your application, creating interfaces, exporting features, because none of it will land in your contract.
Importing `cw-orch` as a dependency in your smart contract is not a problem. We have built this library such that every feature that cw-orch imports, uses or exports not included when compiled for Wasm. This means that you are safe to use any cw-orch feature when developing your application, creating interfaces, exporting features, because none of it will land in your contract.

{{#include ../../../contracts/counter/src/interface.rs:uploadable_impl}}
```

### Entry Points
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is the only location where we call them entry points?

Copy link
Contributor

@CyberHoward CyberHoward left a comment

Choose a reason for hiding this comment

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

Some nits on the docs :)

Kayanski and others added 2 commits March 28, 2024 10:10
Co-authored-by: CyberHoward <88450409+CyberHoward@users.noreply.github.com>
@Kayanski Kayanski merged commit 73d3cf9 into main Mar 28, 2024
14 of 16 checks passed
@Kayanski Kayanski deleted the ani/orc-87-update-documentation-to-reflect-removed-requirement-of branch March 28, 2024 09:13
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.

4 participants