Skip to content

chore: deduplicate Pausable docs and examples#53

Merged
mooori merged 3 commits into
near:masterfrom
mooori:pausable-dedup-2
Dec 22, 2022
Merged

chore: deduplicate Pausable docs and examples#53
mooori merged 3 commits into
near:masterfrom
mooori:pausable-dedup-2

Conversation

@mooori
Copy link
Copy Markdown
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
This was referenced Mar 27, 2026
This was referenced Apr 7, 2026
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