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

chore: deduplicate Pausable docs and examples #53

Merged
merged 3 commits into from
Dec 22, 2022

Conversation

mooori
Copy link
Contributor

@mooori mooori commented Dec 22, 2022

This PR deduplicates Pausable docs and examples as proposed in #48. Now there’s only one Pausable contract in /near-plugins/tests/contracts/pausable/src/lib.rs. Via cargo test it is compiled, deployed on chain and transactions are sent to it. These actions happen in /near-plugins/tests/pausable.rs.

Summary of what was removed and motivation behind it:

Pausable contract in ./README.md

  • Easy to introduce errors into a contract that’s never compiled.
  • Less large contracts in the root README make it easier to get an overview of all plugins. The learn more about a specific plugin, readers can click a link to get to the example contract.

examples/pausable-examples/README.md

  • Docs regarding Pausable trait methods have been moved into the doc comments of the corresponding methods.
  • The example contract here was a duplicate of the one from the root README - removed.
  • Descriptions of using near-cli and interacting with contracts - removed.
    • It’s a significant maintenance burden and the plugins are targeted at more advanced smart contract developers.
    • Therefore I propose to leave these explanations to NEAR docs.

examples/pausable-examples/pausable-base

  • The tests that were here (and many more) now live in the integration test near-plugins/tests/pausable.rs.

@mooori mooori marked this pull request as ready for review December 22, 2022 12:45
@mooori mooori requested a review from birchmd December 22, 2022 12:45
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