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.
This PR deduplicates
Pausable
docs and examples as proposed in #48. Now there’s only onePausable
contract in/near-plugins/tests/contracts/pausable/src/lib.rs
. Viacargo 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
examples/pausable-examples/README.md
Pausable
trait methods have been moved into the doc comments of the corresponding methods.near-cli
and interacting with contracts - removed.examples/pausable-examples/pausable-base
near-plugins/tests/pausable.rs
.