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

docs: add intro to abstract documentation - first tranche #38

Merged
merged 20 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions framework/docs/src/0_abstract_documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Abstract Documentation

Hi and welcome to Abstract, the interchain CosmWasm development platform! Abstract's CosmWasm framework is your gateway
to taking amazing ideas from concept to reality. Whether you're a coding genius or just getting started, Abstract has got your back! By building composable modules you'll be crafting scalable masterpieces in no time.

## Getting Started

You can read the documentation in the order it is presented, or you can jump to the section that interests you the most! We
also have a section with code tutorials that will help you get started with the Abstract SDK if you are more of a hands-on.

- [Abstract Overview](./1_abstract_platform_overview.md)
- [Tutorials](./10_tutorials.md)

## Explore the Abstract SDK

CyberHoward marked this conversation as resolved.
Show resolved Hide resolved
- [Abstract Overview](./1_abstract_platform_overview.md)
- [Core Features](./1_abstract_platform_overview.md)
- [Platform Essentials](./1_abstract_platform_overview.md)
- [Build with Abstract](./4_get_started/)
- [Glossary](./9_glossary.md)

## Use Cases

How can you use Abstract? The limit is your imagination, we can't wait to see what you build! Here are some ideas to get
you started:

- Yield farming platforms
- Decentralized exchanges
- Lending protocols
- Prediction markets
- NFT marketplaces
- Cross-chain bridges
- Supply chain managements
- Insurance and underwriting
- DAOs
- Interchain protocols
- And more!
adairrr marked this conversation as resolved.
Show resolved Hide resolved

See how others are using Abstract in the [Use Cases](./7_use_cases/index.md) section.

## Help and Support

If you feel lost or have any doubts along the way, please reach out to us! We are here to help you!

- [Discord](https://discord.com/invite/uch3Tq3aym)
- [X](https://x.com/AbstractSDK)

## Want to make Abstract better?

We are always looking for ways to improve Abstract and welcome everybody to contribute to the project. Look at the
[Contributing & Community](./contributing.md) section if you want to get involved.

## Links

- [Website](https://abstract.money/)
- [Github](https://github.com/AbstractSDK)
- [Medium](https://medium.com/@abstractmoney)
- [Docs](https://docs.abstract.money/)
- [Account Console](https://app.abstract.money)
adairrr marked this conversation as resolved.
Show resolved Hide resolved
- [Graphql API Explorer](https://api.abstract.money/)
37 changes: 37 additions & 0 deletions framework/docs/src/10_integrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Abstract Integrations

!todo

- Here's a list of some of the projects we're currently integrated with:
adairrr marked this conversation as resolved.
Show resolved Hide resolved

- Dexes: WyndDex, Osmosis, Astroport, White Whale, and TerraSwap
- Oracles: Ojo Network (planned)
- Wallets: Keplr, Cosmostation and Terra Station
- Automation: CronCat and Lit Protocol (planned)



match value {
crate::exchanges::junoswap::JUNOSWAP => {
Ok(Box::<crate::exchanges::junoswap::JunoSwap>::default())
}
abstract_wyndex_adapter::WYNDEX => {
Ok(Box::<abstract_wyndex_adapter::dex::WynDex>::default())
}
abstract_osmosis_adapter::OSMOSIS => {
Ok(Box::<abstract_osmosis_adapter::dex::Osmosis>::default())
}
crate::exchanges::terraswap::TERRASWAP => {
Ok(Box::<crate::exchanges::terraswap::Terraswap>::default())
}
abstract_astroport_adapter::ASTROPORT => {
Ok(Box::<abstract_astroport_adapter::dex::Astroport>::default())
}
crate::exchanges::kujira::KUJIRA => Ok(Box::<crate::exchanges::kujira::Kujira>::default()),
_ => Err(DexError::UnknownDex(value.to_owned())),
}


croncat

dca
72 changes: 72 additions & 0 deletions framework/docs/src/1_abstract_platform_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!-- # The Abstract Development Platform -->
<!-- This page is a high-level overview of the Abstract Platform, not the SDK or any of our actual products. Hence we should stick to a vocabulary that is familiar to the reader. -->
![SDK Background](https://github.com/AbstractSDK/assets/blob/mainline/twitter_cover-1.png?raw=true)
<!--
<div align="center">

### Welcome to Abstract, the interchain CosmWasm development platform. </br>We are building tools and infrastructure for composable smart-contract applications.

</div> -->
## What Is The Abstract Platform?

The Abstract platform embodies a comprehensive ecosystem with a set of products that empowers you to effortlessly construct,
deploy, and manage applications in the Cosmos ecosystem in record time.
jvr0x marked this conversation as resolved.
Show resolved Hide resolved

Our products are designed to be composable, allowing you to re-use the components you need to build your applications. While
Abstract aims to simplify the development experience, it functions as a powerful tool, enabling you to innovate with less effort.

```admonish info
In this page you are given an overview of the Abstract platform and its products. You can skip the introduction and go
straight to the [Getting Started](./4_get_started/1_index.md) guide if you're already familiar with the platform.
```

## Why Build with Abstract?

Building decentralized applications is hard! We know this because we've been there. We've spent countless hours building
applications on the Cosmos ecosystem, and we've created Abstract with all the lessons we learned along the way to make it
easier and faster to build for you.

- **Based on CosmWasm** 🌟: Abstract is built on top of the [CosmWasm][1] smart-contract framework, which has been battle-tested
jvr0x marked this conversation as resolved.
Show resolved Hide resolved
and proven to be secure and reliable. This also means that you can leverage the existing tooling and community to
accelerate your development process.


- **Chain-Agnostic** 🌐: The Abstract platform is built to support various blockchain networks within the Cosmos ecosystem, giving
you the flexibility to choose the best-suited platform for your dApp.
jvr0x marked this conversation as resolved.
Show resolved Hide resolved


- **Modular Design** 🧩: Abstract's modular architecture allows you to choose from a curated library of smart-contract or
develop your own using the Abstract SDK, enabling rapid development and customization. Think of Abstract as a lego set for
building decentralized applications, connect the pieces you need and voilà!.


- **Custom Governance** 🗳️: Abstract allows you to create custom governance structures tailored to your application's
specific requirements, including integration with multi-signature wallets and DAOs.
jvr0x marked this conversation as resolved.
Show resolved Hide resolved


- **Development Tooling** 🛠: Abstract offers a vast integration testing library, enabling you to quickly increase test coverage
and ensure the reliability of your dApps.


- **Version Management** 🔄: Abstract simplifies the process of managing smart-contract versioning, ensuring you can quickly
release and access new features and bug-fixes.
jvr0x marked this conversation as resolved.
Show resolved Hide resolved


- **Ecosystem Integrations** 🌱: Abstract is designed to work seamlessly with popular projects and services in the Cosmos
ecosystem, from DEXes to wallets, we got it all!. If you want to know more about our integrations, check out the [Integrations](10_integrations.md) section.
jvr0x marked this conversation as resolved.
Show resolved Hide resolved

## Products of the Abstract Platform

The following is the list of products that make up the Abstract platform:

- [Abstract SDK](3_framework/1_abstract_sdk.md): On-chain smart-contract infrastructure.
- [CW-Orchestrator](1_products/cw_orchestrator.md): Multi-environment CosmWasm smart-contract deployment and scripting library.
- [Abstract-Testing](1_products/abstract_testing.md): Unit testing utilities for CosmWasm contracts.
- [Abstract.js](1_products/abstract_js.md): Front-end libraries.
- [Abstract App Template](1_products/abstract_app_template.md): Starting point for building an Abstract App.
- [Graphql API Explorer](https://api.abstract.money/)

Feel free to explore them individually at your own pace or follow the documentation as it is presented to you. If you have
any questions or ideas you want to discuss, please contact us on [Discord](https://discord.com/invite/uch3Tq3aym).

[1]: https://cosmwasm.com/
5 changes: 5 additions & 0 deletions framework/docs/src/1_products/abstract_app_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Abstract App Template

!todo

https://github.com/AbstractSDK/app-template
5 changes: 5 additions & 0 deletions framework/docs/src/1_products/abstract_js.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Abstract JS

!todo

Abstract.js is the Javascript package for interacting with the on-chain Abstract framework. More documentation will be added soon.
5 changes: 5 additions & 0 deletions framework/docs/src/1_products/abstract_testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Abstract-Testing

!todo

https://github.com/AbstractSDK/contracts/tree/main/packages/abstract-testing
37 changes: 37 additions & 0 deletions framework/docs/src/1_products/cw_orchestrator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# CW-Orchestrator

!todo

Using cw-orchestrator for your smart-contract interactions reduces your testing/deployment overhead and improves both the code's readability and maintainability.

[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.

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.

```rust,no_run
// Create a sender and instantiate the mock environment
let sender = Addr::unchecked("sender");
let mock = Mock::new(&sender);

// Construct the counter interface (a wrapper around the contract's entry points)
let contract = CounterApp::new(COUNTER_ID, mock.clone());

// Deploy Abstract to the mock
let abstr_deployment = Abstract::deploy_on(mock, Empty{})?;

// Create a new account to install the app onto
let account =
abstr_deployment
.account_factory
.create_default_account(GovernanceDetails::Monarchy {
monarch: sender.to_string(),
})?;

// Claim the namespace so app can be deployed
abstr_deployment
.version_control
.claim_namespace(1, "my-namespace".to_string())?;

// Deploy the app!
contract.deploy(APP_VERSION.parse()?)?;
```
jvr0x marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
9 changes: 8 additions & 1 deletion framework/docs/src/3_framework/1_abstract_sdk.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Abstract SDK - Overview
# Abstract SDK


!todo

The Abstract SDK is a modular smart-contract framework designed to enhance the development of decentralized applications. The SDK is built on top of [CosmWasm][1]: a battle-tested WASM-based smart-contract framework, written in [Rust][2]. The Abstract SDK is comprised of two main components:



The Abstract SDK is at the core of the Abstract development platform. It's a modular smart-contract framework designed to simplify and accelerate the development of CosmWasm dApps. It does this by prioritizing re-usability and composability through an account-abstraction oriented architecture.

Expand Down
26 changes: 26 additions & 0 deletions framework/docs/src/3_framework/3_account_abstraction.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Account Abstraction

!todo

An Abstract Account is a smart-contract wallet developed by Abstract. That means that the smart-contract is capable of holding tokens and interacting with other smart-contracts. The contract's ownership structure is customizable to fit the needs of users or applications. It is designed to be highly programmable, allowing developers to build and distribute complex applications on top of it.
jvr0x marked this conversation as resolved.
Show resolved Hide resolved



Account abstraction is a new concept that is making headlines on blockchain and smart-contract platforms. It's a popular subject because it is designed to streamline how users interact with decentralized applications (dApps). The fundamental idea is to abstract away the complexities of blockchain interactions and provide a user-friendly, secure interface for using and managing applications.

In traditional blockchain interactions, a transaction is typically initiated by a users directly signing some data with their private key and transmitting that to the blockchain for validation. Account abstraction simplifies this process by making the transaction initiation and validation programmable. Essentially, it allows the transaction logic to be customized within a smart-contract, vastly extending the scope of UX possibilities.
Expand All @@ -19,3 +25,23 @@ In the following sections, we'll discuss how Abstract utilizes the concept of ac
## Account Abstraction on Abstract

Within Abstract, account abstraction manifests itself in the Abstract Accounts or smart contract wallets, which are designed to offer an easy-to-use and secure interaction model for users. You can read more about their architecture in the next section.



!todo

#### Abstract Apps

Abstract Apps are smart-contracts that add functionality to an Abstract Account. Here's a small snippet of code to give you an idea of how an App is created with the Abstract SDK:

```rust,no_run
{{#include ../../packages/abstract-app/examples/counter.rs:handlers}}
```

The code above defines an **Abstract App**. This app can be installed on any Abstract Account through the Abstract App store, allowing developers to monetize their code.

The customizable handlers that are used in the builder are functions similar to the native CosmWasm entry-point functions. They expose an additional App object which, via the `abstract-sdk`, empowers you to execute intricate multi-contract transactions with minimum code. Importantly, this simplification does not limit the contract's programmability. Instead, it provides a balance of efficient coding and comprehensive control over inter-contract interactions.

```admonish info
Already familiar with [cw-orchestrator](https://github.com/AbstractSDK/cw-orchestrator)? Skip to [the SDK's introduction page.](./3_framework/1_abstract_sdk.md)
```
Loading