-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
95 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
main/guides/orchestration/orchestration-basics/installation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Installation and Deployment | ||
|
||
The dApp implements a smart contract that can be installed and deployed on any Agoric testnet. Since, the contract interacts with remote chains, we need to a multichain environment - see [Agoric Multichain-Testing]() for details. Follow in the instructions in [dApp Readme]() to install, deploy and interact with the dApp on your local machine. | ||
The dApp implements a smart contract that can be installed and deployed on any Agoric testnet. Since, the contract | ||
interacts with the remote chains, we need a multichain environment for testing it on local network. [Agoric Multichain-Testing](https://github.com/Agoric/agoric-sdk/tree/master/multichain-testing) provides such an environment to test orchestration based contracts. | ||
Follow the instructions in [dApp Readme](https://github.com/Agoric/dapp-orchestration-basics/blob/main/README.md) to install, deploy and interact with the dApp on your local machine. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# DApp User Interface | ||
|
||
Here, we will walkthrough the components making up the user interface for the dApp orchestration. | ||
|
||
## Orchestration.tsx | ||
|
||
The `Orchestration.tsx` component serves as the main controller for the orchestration dApp's user interface. It manages | ||
the state and interactions required for users to create accounts, manage their balances, and perform various blockchain | ||
transactions such as deposits, withdrawals, staking, and unstaking. | ||
|
||
## AccountList.tsx | ||
|
||
The `AccountList.tsx` component is responsible for displaying the list of user accounts and their associated balances in | ||
various native denoms. It presents account information in a structured and user-friendly format, allowing users to view | ||
and interact with their Orchestration Accounts directly. | ||
|
||
## FetchBalances.tsx | ||
|
||
The `FetchBalances.tsx` component is responsible for retrieving the balances of user accounts from different | ||
blockchains. It interacts with the local RPC endpoints to fetch balance data for addresses on supported chains (for | ||
Osmosis and Agoric). | ||
|
||
## RpcEndpoints.tsx | ||
|
||
The `RpcEndpoints.tsx` component provides a convenient place to manage RPC endpoints for different chains, including | ||
your local agoric instance, to be used by different components. This component is used by other components, like | ||
`FetchBalances.tsx`, to interact with the correct blockchain network. | ||
|
||
## ChainSelector.tsx | ||
|
||
The `ChainSelector.tsx` component provides a basic UI element for users to select the Cosmos chain they want to interact | ||
with. The selected chain is passed back to the parent component, `Orchestration.tsx`, and used in further interactions. | ||
|
||
## `MakeAccount.tsx` | ||
|
||
The `MakeAccount.tsx` component provides a user interface for managing interchain accounts on the Agoric blockchain. It | ||
allows users to create new accounts on selected chains (like Osmosis or Agoric), fetch and display balances of these | ||
accounts, and perform actions such as deposit. The component interacts with the Agoric wallet to make offers and uses | ||
RPC endpoints to retrieve account balances, incorporating loading states and notifications to enhance the user | ||
experience. | ||
|
||
## `MakeOffer.tsx` | ||
|
||
The `MakeOffer.tsx` component defines an asynchronous function `makeOffer` that facilitates making an offer through the | ||
Agoric wallet. It first checks if a `selectedChain` is provided and retrieves the necessary contract instance | ||
(specifically 'orca') and the `BLD` brand from the contract store. The function then constructs an offer where it gives | ||
a deposit of `1000` units of `BLD`. It initiates the offer using the wallet's `makeOffer` method, providing callbacks to | ||
handle various offer statuses such as 'error', 'accepted', 'refunded', and 'done'. Throughout the process, it updates | ||
the loading state, toggles modals, sets status texts, and adds notifications to keep the user informed about the offer's | ||
progress and outcome. |