Skip to content

Commit

Permalink
Merge pull request #1232 from Agoric/ms/adding-orca-dapp-docs
Browse files Browse the repository at this point in the history
Add/Update `dapp-orca-basics` Docs
  • Loading branch information
amessbee authored Oct 9, 2024
2 parents 43d8ef0 + 21bdf09 commit 54b346b
Show file tree
Hide file tree
Showing 15 changed files with 333 additions and 306 deletions.
12 changes: 11 additions & 1 deletion _redirects
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,18 @@
/guides/js-programming/ses/ses-guide.html https://github.com/endojs/endo/blob/HEAD/packages/ses/docs/guide.md
/guides/js-programming/ses/ses-reference https://github.com/endojs/endo/blob/HEAD/packages/ses/docs/reference.md
/guides/js-programming/ses/ses-reference.html https://github.com/endojs/endo/blob/HEAD/packages/ses/docs/reference.md
/guides/orchestration/getting-started/contract-walkthroughs /guides/orchestration/contract-walkthroughs
/guides/orchestration/getting-started/contract-walkthroughs.html /guides/orchestration/contract-walkthroughs
/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond /guides/orchestration/contract-walkthroughs/cross-chain-unbond
/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond.html /guides/orchestration/contract-walkthroughs/cross-chain-unbond
/guides/orchestration/getting-started/contract-walkthrough/orchestration-basics /guides/orchestration/orchestration-basics
/guides/orchestration/getting-started/contract-walkthrough/orchestration-basics.html /guides/orchestration/orchestration-basics
/guides/orchestration/getting-started/contract-walkthrough/send-anywhere /guides/orchestration/contract-walkthroughs/send-anywhere
/guides/orchestration/getting-started/contract-walkthrough/send-anywhere.html /guides/orchestration/contract-walkthroughs/send-anywhere
/guides/orchestration/getting-started/key-concepts /guides/orchestration/key-concepts
/guides/orchestration/getting-started/key-concepts.html /guides/orchestration/key-concepts
/guides/wallet/api /reference/wallet-api/
/guides/wallet/api.html /reference/wallet-api.html
/guides/wallet/api.html /reference/wallet-api.html
/guides/wallet/api/* /reference/wallet-api/:splat
/platform /guides/platform/
/platform /guides/platform/
Expand Down
28 changes: 21 additions & 7 deletions main/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,37 @@ export default defineConfig({
items: [
{
text: 'Key Concepts and APIs',
link: '/guides/orchestration/getting-started/key-concepts',
link: '/guides/orchestration/key-concepts',
},
{
text: 'Contract Walkthroughs',
link: '/guides/orchestration/getting-started/contract-walkthroughs',
link: '/guides/orchestration/contract-walkthroughs/',
items: [
{
text: 'Send Anywhere Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/send-anywhere',
link: '/guides/orchestration/contract-walkthroughs/send-anywhere',
},
{
text: 'Cross-Chain Swap Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/cross-chain-swap',
text: 'Cross-Chain Unbond Example',
link: '/guides/orchestration/contract-walkthroughs/cross-chain-unbond',
}
]
},
{
text: 'Example Orchestration DApp',
link: '/guides/orchestration/orchestration-basics/',
items: [
{
text: 'Installation and Deployment',
link: '/guides/orchestration/orchestration-basics/installation',
},
{
text: 'Cross-Chain Unbond Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond',
text: 'Orca Contract walkthrough',
link: '/guides/orchestration/orchestration-basics/contract',
},
{
text: 'UI Walkthrough',
link: '/guides/orchestration/orchestration-basics/ui',
}
]
},
Expand Down
25 changes: 19 additions & 6 deletions main/.vitepress/themeConfig/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,35 @@ export const nav = [
},
{
text: 'Key Concepts and APIs',
link: '/guides/orchestration/getting-started/key-concepts',
link: '/guides/orchestration/key-concepts',
},
{
text: 'Contract Walkthroughs',
items: [
{
text: 'Send Anywhere Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/send-anywhere',
link: '/guides/orchestration/contract-walkthroughs/send-anywhere',
},
{
text: 'Cross-Chain Swap Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/cross-chain-swap',
text: 'Cross-Chain Unbond Example',
link: '/guides/orchestration/contract-walkthroughs/cross-chain-unbond',
}
]
},
{
text: 'Example Orchestration DApp',
items: [
{
text: 'Installation and Deployment',
link: '/guides/orchestration/orchestration-basics/installation',
},
{
text: 'Cross-Chain Unbond Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond',
text: 'Orca Contract walkthrough',
link: '/guides/orchestration/orchestration-basics/contract',
},
{
text: 'UI Walkthrough',
link: '/guides/orchestration/orchestration-basics/ui',
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Contract Walkthroughs

This section is designed to provide detailed explanations and insights into example orchestration smart contracts.
This section is designed to provide detailed explanations and insights into example Orchestration smart contracts.

In this section, we will cover three primary contracts:
In this section, we will cover two primary contracts:

1. **Assets Transfer Contract**: A guide to `send-anywhere` contract that demonstrates a simple yet robust and secure way for cross-chain assets transfer.
2. **Swap Contract**: A comprehensive guide to the process of swapping assets between different chains using the Agoric orchestration library.
3. **Unbond Contract**: A detailed walkthrough of the unbonding and liquid staking process, highlighting the steps involved in managing cross-chain operations.
2. **Unbond Contract**: A detailed walkthrough of the unbonding and liquid staking process, highlighting the steps involved in managing cross-chain operations.

Each walkthrough will include detailed explanations of the contract code, providing insights into the mechanics and best practices of smart contract development on the Agoric platform. By the end of these walkthroughs, you should have a solid understanding of how to utilize Agoric’s tools and libraries to create robust and efficient cross-chain smart contracts.

Expand All @@ -17,20 +16,9 @@ The "Send Anywhere" contract is a robust and secure solution for transferring as
- Assets are securely held in a local account before being transferred.
- Detailed logs are kept for transparency and error tracing.
- The contract is resilient to failure, with built-in rollback mechanisms.
- By using Agoric’s orchestration tools, this contract provides a secure way to facilitate cross-chain asset transfers.
- By using Agoric’s Orchestration tools, this contract provides a secure way to facilitate cross-chain asset transfers.

[See Contract Overview](/guides/orchestration/getting-started/contract-walkthrough/send-anywhere)

## Swap Contract

The Swap Contract demonstrates how to swap assets between the Agoric chain and another blockchain. This example covers:

- Initializing and setting up the contract.
- Creating and managing accounts on different chains.
- Executing cross-chain asset transfers.
- Handling errors and ensuring secure transactions.

[See Contract Overview](/guides/orchestration/getting-started/contract-walkthrough/cross-chain-swap)
[See Contract Overview](/guides/orchestration/contract-walkthroughs/send-anywhere)

## Unbond Contract

Expand All @@ -40,4 +28,4 @@ The Unbond Contract focuses on the process of unbonding staked assets and perfor
- Implementing delegation and undelegation logic.
- Managing asynchronous operations and ensuring the completion of long-running processes.

[See Contract Overview](/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond)
[See Contract Overview](/guides/orchestration/contract-walkthroughs/cross-chain-unbond)
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ The contract begins by importing various modules and utilities necessary for its

- **State management**: `makeSharedStateRecord` is imported to create and manage the state across contract incarnations.
- **Type validation**: `AmountShape` and `InvitationShape` ensure that the contract works with correct data types, such as amounts and invitations.
- **Orchestration utilities**: `withOrchestration` is imported to facilitate interactions with orchestration functions.
- **Flows**: The orchestration flows for handling transfers are imported from `send-anywhere.flows.js` to be made available to Zoe.
- **Orchestration utilities**: `withOrchestration` is imported to facilitate interactions with Orchestration functions.
- **Flows**: The Orchestration flows for handling transfers are imported from `send-anywhere.flows.js` to be made available to Zoe.

These imports set up the contract for the validation, orchestration, and execution of transfers through Zoe API.

Expand Down Expand Up @@ -204,4 +204,4 @@ The "Send Anywhere" contract is a robust and flexible solution for transferring
- Assets are securely held in a local account before being transferred.
- Detailed logs are kept for transparency and error tracing.
- The contract is resilient to failure, with built-in rollback mechanisms.
- By using Agoric’s orchestration tools, this contract provides a secure way to facilitate cross-chain asset transfers.
- By using Agoric’s Orchestration tools, this contract provides a secure way to facilitate cross-chain asset transfers.
Loading

0 comments on commit 54b346b

Please sign in to comment.