Skip to content

Commit

Permalink
Docs/improvements 2 (#59)
Browse files Browse the repository at this point in the history
* docs: improve version control page

* docs: move propose modules diagram flow into version control

* docs: add information on the abstract app template

* docs: add page for abstract js

* docs: add abstract testing page

* docs:  fix abstractjs link

* docs: add cw-orchestrator page

* docs: add glossary page

---------

Co-authored-by: adair <32375605+adairrr@users.noreply.github.com>
  • Loading branch information
jvr0x and adairrr committed Sep 3, 2023
1 parent 8015282 commit ee85a9f
Show file tree
Hide file tree
Showing 8 changed files with 341 additions and 199 deletions.
24 changes: 22 additions & 2 deletions framework/docs/src/1_products/abstract_app_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Abstract App Template

!todo
The Abstract App Module Template is a starting point for developing apps that enable features or transform Abstract
Accounts into standalone products. An app is instantiated for each Account individually and it's migratable. Apps are
allowed to perform actions on the Account and may also integrate with other apps and Adapters installed on the Account.
For a deeper understanding of Abstract Accounts, please refer to
the [abstract accounts](../3_framework/4_architecture.md)
documentation. If you're interested in learning about apps, consult
the [app module documentation](../3_framework/7_module_types.md).

https://github.com/AbstractSDK/app-template
The primary focus of the Abstract App Template as of now is to provide a template for building a new Abstract App, as
well
as support for generating TypeScript client code for the contract, which can then be imported into a frontend
application.

In the future, the Abstract App Template will also provide a basic template for the frontend application.

## Getting Started

To get started, please go to the <a href="https://github.com/AbstractSDK/app-template" target="_blank">Abstract App
Template Github Repo</a>
and follow the instructions in the README.

In there you can find instructions on how to generate a new Abstract App, how to test it, deploy it, and generate
TypeScript client code.
34 changes: 32 additions & 2 deletions framework/docs/src/1_products/abstract_js.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Abstract JS

!todo
Abstract.js is a comprehensive JavaScript library designed to facilitate seamless interactions with the on-chain
Abstract framework. Whether you're a developer looking to integrate blockchain functionalities into your application or
a blockchain enthusiast aiming to explore the Abstract framework, Abstract.js provides the essential tools to make the
process straightforward.

Abstract.js is the Javascript package for interacting with the on-chain Abstract framework. More documentation will be added soon.
## Features

- **Easy Integration** 🛠️ : Designed with developers in mind, Abstract.js ensures a hassle-free integration process with
existing JavaScript applications.
- **Type Declarations** 🔍: For TypeScript enthusiasts, Abstract.js comes with type declarations, ensuring type safety
and enhancing the development experience.
- **Comprehensive Methods** 🌐: From querying blockchain data to sending transactions, Abstract.js covers a wide range of
functionalities required for on-chain operations.
- **React Support** ⚛︎️: With the @abstract-money/abstract.js-react package, you can easily integrate and manage the
Abstract framework in their React applications.

## Installation

To install the main library:

```bash
npm i @abstract-money/abstract.js
```

For React-specific functionalities:

```bash
npm i @abstract-money/abstract.js-react
```

To read more about the available types and methods, please refer to
the <a href="https://abstractjs.abstract.money/" target="_blank">Abstract.js Documentation</a>.

52 changes: 50 additions & 2 deletions framework/docs/src/1_products/abstract_testing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# Abstract-Testing

!todo
The `abstract-testing` package is Abstract framework's testing utility, focusing on mocking and querying
functionalities. These utilities are essential for simulating various scenarios, ensuring the correctness of the
framework's functionalities, and facilitating robust unit testing.

https://github.com/AbstractSDK/contracts/tree/main/packages/abstract-testing
## Features

-**Mock Data Creation** 🛠: Easily create mock data with predefined data for assets, contracts, accounts and more.
- **Abstract Naming Service Integration** 🌐: Add mock assets into the Abstract Naming Service (ANS) for testing
purposes.
- **Flexible Configuration** 🔧: Adjust version control addresses, set up mock ANS hosts, and more.
- **Assertion Tools** ✅: Assert the existence of accounts, assets, map entries and more.
- **Predefined Test Scenarios** 📝: Run through common test scenarios with ease.
- **Build & Execute** 🔄: Construct mock queries and execute them to test various functionalities.

## Usage

Add the `abstract-testnet` dependency to your Cargo.toml file:

```toml
[dependencies]
abstract-testing = "0.18.0"
```

For more information about the available types and methods, please refer to
the <a href="https://docs.rs/abstract-testing/0.18.0/abstract_testing/" target="_blank">Abstract-Testing
Documentation</a>.

You can find the latest version of the package on [crates.io](https://crates.io/crates/abstract-testing).

## Example

```rust,no_run
use abstract_testing::MockQuerierBuilder;
use abstract_testing::prelude::*;
#[test]
fn returns_account_owner() -> VersionControlTestResult {
let mut deps = mock_dependencies();
// Set up mock querier with the account
deps.querier = AbstractMockQuerierBuilder::default()
.account(TEST_MANAGER, TEST_PROXY, 0)
.build();
mock_init_with_account(deps.as_mut(), true)?;
let account_owner =
query_account_owner(&deps.as_ref().querier, &Addr::unchecked(TEST_MANAGER), 0)?;
assert_that!(account_owner).is_equal_to(Addr::unchecked(TEST_OWNER));
Ok(())
}
```
22 changes: 17 additions & 5 deletions framework/docs/src/1_products/cw_orchestrator.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# CW-Orchestrator

!todo
The <a href="https://github.com/AbstractSDK/cw-orchestrator" target="_blank">cw-orchestrator</a> package is a scripting
tool designed to simplify interactions with CosmWasm smart contracts. By providing a set of macros that generate
type-safe interfaces for your contracts, it not only enhances the code's readability and maintainability but also
reduces testing and deployment overhead. These interfaces can be seamlessly combined into a single object, fostering
easier integration and collaboration.

Using cw-orchestrator for your smart-contract interactions reduces your testing/deployment overhead and improves both the code's readability and maintainability.
Furthermore, cw-orchestrator allows for code reusability between testing and deployments, establishing itself as our
primary tool in making Abstract's infrastructure highly available.

[cw-orchestrator](https://github.com/AbstractSDK/cw-orchestrator) is a smart-contract scripting library that simplifies smart-contract interactions. It allows you to re-use code between testing and deployments and acts as our primary tool in making Abstract's infrastructure highly available.
## Usage

Here's a snippet that sets up the **complete Abstract SDK framework** on a cw-multi-test environment, and deploys the previously shown App contract to the framework.
Here's a snippet that sets up the **complete Abstract SDK framework** on a cw-multi-test environment, and deploys the
Counter App to the framework.

```rust,no_run
// Create a sender and instantiate the mock environment
Expand Down Expand Up @@ -34,4 +40,10 @@ abstr_deployment
// Deploy the app!
contract.deploy(APP_VERSION.parse()?)?;
```
```

For more details on how to use cw-orchestrator, please refer to
the <a href="https://orchestrator.abstract.money/" target="_blank">cw-orchestrator Documentation</a>, where you can find
a quick start and a detailed guide on how to use the tool with your smart contracts, supported chains and more. Also,
check out the <a href="https://github.com/AbstractSDK/cw-orchestrator" target="_blank">cw-orchestrator Github Repo</a>
for more details about the tool's code.
143 changes: 0 additions & 143 deletions framework/docs/src/1_sdk_intro_bak.md

This file was deleted.

47 changes: 45 additions & 2 deletions framework/docs/src/5_platform/version_control.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
# Version Control

The Version Control contract acts as the registry for all modules and accounts within the Abstract platform. Each module
can be queried by its namespace, name, and version, returning its reference which may be a code id or address.
The Version Control contract acts as the registry for all modules and accounts within the Abstract platform. Abstract
Accounts can use it to claim namespaces and register their modules. The Version Control contract allows modules to be
queried by its namespace, name, and version, returning its reference which may be a code id or address.

# Propose Modules

Developers that wish to publish modules to the Abstract platform need to call `ProposeModules` on the Version Control
contract. The modules will subsequently be reviewed by the Abstract platform for registration.

> For documentation on how to register modules, see [Module Deployment](../4_get_started/7_module_deployment.md)
Modules cannot be registered without their namespaces being claimed by an Account. This is to prevent malicious actors
from registering modules under trusted namespaces.

Below details the assertion process.

```mermaid
sequenceDiagram
autonumber
actor U as User
participant VC as Version Control
participant Man as Manager of Namespace
participant M as Adapter Instance
U ->> VC: ProposeModules
loop
VC --> VC: Load Account ID for namespace
VC --> VC: Load Account Manager address
VC -->>+ Man: Query Account owner
Man -->>- VC: Address
opt adapter
VC -->> M: Assert no sudo admin
activate M
VC -->> M: Assert same cw2 data
deactivate M
end
end
VC ->> VC: Save modules
```
38 changes: 0 additions & 38 deletions framework/docs/src/6_flows/vc/propose_modules.md

This file was deleted.

0 comments on commit ee85a9f

Please sign in to comment.