From 2d2c8e271f75370fb95c184251ede1c9a5a5839e Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 3 Jun 2024 19:44:47 +0500 Subject: [PATCH 01/11] fix: borken links to cosmos-delegators-cli --- main/guides/agoric-cli/agd-query-tx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/guides/agoric-cli/agd-query-tx.md b/main/guides/agoric-cli/agd-query-tx.md index 4df677523..a08479c71 100644 --- a/main/guides/agoric-cli/agd-query-tx.md +++ b/main/guides/agoric-cli/agd-query-tx.md @@ -9,7 +9,7 @@ This section focusses on commands relevant to developing and deploying smart con - [Validators topics \- Agoric Community Forum](https://community.agoric.com/c/validators/9) - [Governance topics \- Agoric Community Forum](https://community.agoric.com/c/governance/6) -- [Delegator Guide \(CLI\) \| Cosmos Hub](https://hub.cosmos.network/main/delegators/delegator-guide-cli.html) +- [Delegator Guide \(CLI\) \| Cosmos Hub](https://hub.cosmos.network/delegators/delegator-guide-cli.html) ::: From 96f5bf27063a6cc40381ced98c41602e013483fb Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 3 Jun 2024 20:05:07 +0500 Subject: [PATCH 02/11] fix: removed parts in chain-integration with outdated links. --- main/guides/integration/chain-integration.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/main/guides/integration/chain-integration.md b/main/guides/integration/chain-integration.md index 0a76f93f2..f91c93bad 100644 --- a/main/guides/integration/chain-integration.md +++ b/main/guides/integration/chain-integration.md @@ -9,13 +9,8 @@ This section points at relevant reference documentation for the underlying `cosm The Agoric Network currently uses `cosmos-sdk` v0.45. The general Cosmos documentation for this version can be [found here](https://docs.cosmos.network/v0.45/), including structure and`golang` documentation, and REST API documentation. -Use the [v0.45.1 version of the REST API](https://v1.cosmos.network/rpc/v0.45.1) for accessing the chain. To use the "Try it out" functionality, change the Base URL to `agoric-api.polkachu.com`: - -| ![Alt name of image](./assets/cosmos-api.png) | -|-| - -The chain can also be accessed via JavaScript using the [`cosmjs` library](/~https://github.com/cosmos/cosmjs) (and [associated tutorials](https://tutorials.cosmos.network/tutorials/7-cosmjs/1-cosmjs-intro.html)), or using [CosmosKit](https://cosmoskit.com/). +The chain can also be accessed via JavaScript using the [`cosmjs` library](/~https://github.com/cosmos/cosmjs) (and [associated tutorials](https://tutorials.cosmos.network/tutorials/7-cosmjs/1-cosmjs-intro.html)), or using [CosmosKit](https://cosmology.zone/products/cosmos-kit). ## Chain resources @@ -25,14 +20,6 @@ The chain can also be accessed via JavaScript using the [`cosmjs` library](https - The base unit for staking is `ubld` (corresponding to `uatom` for Cosmos Hub) - The command utility of the agoric chain is `agd` (corresponding to [`simd` for the Cosmos Hub](https://docs.cosmos.network/v0.45/run-node/interact-node.html)). --- -# Tools -## Building `agd` - -The `agd` command line tool can be built as described in the Agoric [getting-started documentation](https://docs.agoric.com/guides/getting-started#build-the-cosmic-swingset-package). The linked step builds `agd`. To confirm that `agd` is in your `$PATH`, execute -``` -agd version --long -``` - # FAQ - How are transactions encoded? From 0c726345f1686ded6b0c2742b20674f6bb3c1062 Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 3 Jun 2024 20:12:46 +0500 Subject: [PATCH 03/11] fix: broken link in proposal.md --- main/guides/coreeval/proposal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/guides/coreeval/proposal.md b/main/guides/coreeval/proposal.md index 8059a5063..ef94ea7bf 100644 --- a/main/guides/coreeval/proposal.md +++ b/main/guides/coreeval/proposal.md @@ -122,7 +122,7 @@ There are also several more promise spaces one level down, including: - `powers.issuer` - `powers.brand` -The `installContract` helper calls `E(zoe).installBundleID(bundleID)` to create an `Installation`, much like our earlier discussion of [Contract installation](http://localhost:8080/guides/zoe/#contract-installation). +The `installContract` helper calls `E(zoe).installBundleID(bundleID)` to create an `Installation`, much like our earlier discussion of [Contract installation](../zoe/#contract-installation). It also calls `powers.installation[name].resolve(installation)`. ```js From d2684a8e4a1a918e67a89c7eb7e1538e4ae74f76 Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 3 Jun 2024 20:14:48 +0500 Subject: [PATCH 04/11] fix: typo link in zoe.md --- main/reference/zoe-api/zoe.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/main/reference/zoe-api/zoe.md b/main/reference/zoe-api/zoe.md index d2252fcd2..f0bf30a63 100644 --- a/main/reference/zoe-api/zoe.md +++ b/main/reference/zoe-api/zoe.md @@ -364,8 +364,6 @@ Every **Keyword** in **give** must have a corresponding **payment**. const paymentKeywordRecord = harden({ Asset: quatloosPayment }); ``` - - ### Offer Arguments **offerArgs** is an optional CopyRecord that can be used to pass additional arguments to the From 5beb84a297dd788f52ed89f78ba30abaf4eba768 Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 3 Jun 2024 20:22:24 +0500 Subject: [PATCH 05/11] fix: link to ui-component changed to ui-kit repo --- main/reference/ertp-api/ertp-data-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/reference/ertp-api/ertp-data-types.md b/main/reference/ertp-api/ertp-data-types.md index 31ed34fd4..76e8bb972 100644 --- a/main/reference/ertp-api/ertp-data-types.md +++ b/main/reference/ertp-api/ertp-data-types.md @@ -71,7 +71,7 @@ A **DisplayInfo** data type is associated with a **[Brand](./brand)** and gives to display that **Brand**'s **[Amounts](#amount)**. **DisplayInfo** has one optional property, **decimalPlaces**, which takes a non-negative integer value. -The **decimalPlaces** property tells the [display software](/~https://github.com/Agoric/agoric-sdk/tree/master/packages/ui-components) +The **decimalPlaces** property tells the [display software](/~https://github.com/Agoric/ui-kit) how many places to move the decimal point over to the left so as to display the value in the commonly used denomination (e.g., display "10.00 dollars" rather than "1000 cents"). From 89e3c5a3820686d2ff8965ff681ac77a2d5bad81 Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 3 Jun 2024 20:25:40 +0500 Subject: [PATCH 06/11] fix: workshop link to cosmos is broken. --- main/guides/zoe/contracts/otc-desk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/guides/zoe/contracts/otc-desk.md b/main/guides/zoe/contracts/otc-desk.md index f4dd4a4dc..bd95a3818 100644 --- a/main/guides/zoe/contracts/otc-desk.md +++ b/main/guides/zoe/contracts/otc-desk.md @@ -7,9 +7,9 @@ ![Building a Composable DeFi Contract](./assets/title.jpg) -This is the OTC Desk contract from the ["Building a +This is the OTC Desk contract from the "Building a Composable DeFi Contract" episode of Cosmos Code With -Us](https://cosmos.network/series/code-with-us/building-a-composable-defi-contract). +Us workshop. [Watch the replay of the workshop](https://www.youtube.com/watch?v=faxrecQgEio): From 8579805dc8303f61e9ef7d7817dd45be1f4508fe Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Mon, 3 Jun 2024 23:43:43 +0500 Subject: [PATCH 07/11] fix: broken delegators link --- main/guides/coreeval/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/guides/coreeval/index.md b/main/guides/coreeval/index.md index 0efab059a..0e8a69e4d 100644 --- a/main/guides/coreeval/index.md +++ b/main/guides/coreeval/index.md @@ -4,7 +4,7 @@ Until mainnet enters the Mainnet-3 phase of the [multi-phase mainnet rollout](ht permissionless [contract installation with Zoe](/guides/zoe/#contract-installation) is limited to development environments. -Until then, permission to deploy contracts can be granted using an Agoric extension to [Cosmos SDK Governance](https://hub.cosmos.network/main/delegators/delegator-guide-cli.html#participating-in-governance) called `swingset.CoreEval`. As discussed in [governance using Hardened JavaScript: swingset\.CoreEval](https://community.agoric.com/t/bld-staker-governance-using-hardened-javascript-swingset-coreeval/99), +Until then, permission to deploy contracts can be granted using an Agoric extension to [Cosmos SDK Governance](https://hub.cosmos.network/delegators/delegator-guide-cli.html#participating-in-governance) called `swingset.CoreEval`. As discussed in [governance using Hardened JavaScript: swingset\.CoreEval](https://community.agoric.com/t/bld-staker-governance-using-hardened-javascript-swingset-coreeval/99), if such a proposal passes, its JavaScript code is run with ocaps extracted using the proposal's permitted capabilities, which the code can combine to perform privileged tasks. To make a proposal to deploy a contract: From bdfaecf64b6b6866bb31a3634937727a98d003eb Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Thu, 6 Jun 2024 08:43:05 +0500 Subject: [PATCH 08/11] fix: link cosmos code with us to yt video --- main/guides/zoe/contracts/otc-desk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/guides/zoe/contracts/otc-desk.md b/main/guides/zoe/contracts/otc-desk.md index bd95a3818..626d607ae 100644 --- a/main/guides/zoe/contracts/otc-desk.md +++ b/main/guides/zoe/contracts/otc-desk.md @@ -8,8 +8,8 @@ ![Building a Composable DeFi Contract](./assets/title.jpg) This is the OTC Desk contract from the "Building a -Composable DeFi Contract" episode of Cosmos Code With -Us workshop. +Composable DeFi Contract" episode of [Cosmos Code With +Us workshop](https://www.youtube.com/watch?v=e9dMkC2oFh8). [Watch the replay of the workshop](https://www.youtube.com/watch?v=faxrecQgEio): From 3641f960b5651235e0f13f0cfefe076270982a82 Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Thu, 20 Jun 2024 09:27:52 +0500 Subject: [PATCH 09/11] fix: adding reference to offerArgs in zoe.md --- main/reference/zoe-api/zoe.md | 1 + 1 file changed, 1 insertion(+) diff --git a/main/reference/zoe-api/zoe.md b/main/reference/zoe-api/zoe.md index f0bf30a63..5dcc8fd28 100644 --- a/main/reference/zoe-api/zoe.md +++ b/main/reference/zoe-api/zoe.md @@ -364,6 +364,7 @@ Every **Keyword** in **give** must have a corresponding **payment**. const paymentKeywordRecord = harden({ Asset: quatloosPayment }); ``` + ### Offer Arguments **offerArgs** is an optional CopyRecord that can be used to pass additional arguments to the From a2109f491cd6570b2f75ded8036e2f83740dc3bc Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Thu, 20 Jun 2024 09:34:05 +0500 Subject: [PATCH 10/11] docs: reverting proposed changes from chain-integration.md --- main/guides/integration/chain-integration.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/main/guides/integration/chain-integration.md b/main/guides/integration/chain-integration.md index f91c93bad..6a64ce0bb 100644 --- a/main/guides/integration/chain-integration.md +++ b/main/guides/integration/chain-integration.md @@ -9,8 +9,13 @@ This section points at relevant reference documentation for the underlying `cosm The Agoric Network currently uses `cosmos-sdk` v0.45. The general Cosmos documentation for this version can be [found here](https://docs.cosmos.network/v0.45/), including structure and`golang` documentation, and REST API documentation. +Use the [v0.45.1 version of the REST API](https://v1.cosmos.network/rpc/v0.45.1) for accessing the chain. To use the "Try it out" functionality, change the Base URL to `agoric-api.polkachu.com`: -The chain can also be accessed via JavaScript using the [`cosmjs` library](/~https://github.com/cosmos/cosmjs) (and [associated tutorials](https://tutorials.cosmos.network/tutorials/7-cosmjs/1-cosmjs-intro.html)), or using [CosmosKit](https://cosmology.zone/products/cosmos-kit). + +| ![Alt name of image](./assets/cosmos-api.png) | +|-| + +The chain can also be accessed via JavaScript using the [`cosmjs` library](/~https://github.com/cosmos/cosmjs) (and [associated tutorials](https://tutorials.cosmos.network/tutorials/7-cosmjs/1-cosmjs-intro.html)), or using [CosmosKit](https://cosmoskit.com/). ## Chain resources @@ -20,6 +25,14 @@ The chain can also be accessed via JavaScript using the [`cosmjs` library](https - The base unit for staking is `ubld` (corresponding to `uatom` for Cosmos Hub) - The command utility of the agoric chain is `agd` (corresponding to [`simd` for the Cosmos Hub](https://docs.cosmos.network/v0.45/run-node/interact-node.html)). --- +# Tools +## Building `agd` + +The `agd` command line tool can be built as described in the Agoric [getting-started documentation](https://docs.agoric.com/guides/getting-started#build-the-cosmic-swingset-package). The linked step builds `agd`. To confirm that `agd` is in your `$PATH`, execute +``` +agd version --long +``` + # FAQ - How are transactions encoded? @@ -34,4 +47,4 @@ However they do have a sequence number and may be invalidated if another transac - How are addresses generated? [Cosmos SDK v0.45 Docs - Accounts](https://docs.cosmos.network/v0.45/basics/accounts.html) - How is the blockchain queried? -JSON-RPC, gRPC, REST [Cosmos SDK v0.45 Docs - Interact with Node](https://docs.cosmos.network/v0.45/run-node/interact-node.html) +JSON-RPC, gRPC, REST [Cosmos SDK v0.45 Docs - Interact with Node](https://docs.cosmos.network/v0.45/run-node/interact-node.html) \ No newline at end of file From 2088920b72fba2260f4c5068e8eb8904f74fe3dc Mon Sep 17 00:00:00 2001 From: Mudassir Shabbir Date: Fri, 21 Jun 2024 19:54:04 +0500 Subject: [PATCH 11/11] docs: create orchestration overview --- main/guides/orchestration/index.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 main/guides/orchestration/index.md diff --git a/main/guides/orchestration/index.md b/main/guides/orchestration/index.md new file mode 100644 index 000000000..113945f8c --- /dev/null +++ b/main/guides/orchestration/index.md @@ -0,0 +1,19 @@ +# Orchestration Overview + + +Orchestration is a core concept within the Agoric platform designed to empower entrepreneurs. It enables the creation of smart contracts that seamlessly interact with applications deployed on various blockchains. This composability allows for the development of user-centric applications that leverage the unique strengths of different blockchain ecosystems. +The Agoric Orchestration API simplifies interactions between multiple networks, particularly those using the Inter-Blockchain Communication (IBC) protocol within Cosmos. The API acts as an abstraction layer, streamlining multi-step processes while maintaining requestor authority. Smart contracts involved gain no additional privileges. +Orchestration integrates with existing Agoric components (SwingSet, Cosmos modules) and introduces the vat-orchestration vat. This vat manages Inter-Chain Account (ICA) identities and connections to host chains, ensuring proper transaction authorization. +The orchestration client handles asynchronous tasks and complex workflows, including those spanning multiple chains. This empowers smart contracts for actions like inter-chain staking and multi-hop transfers, facilitated by notifications from the transfer vat and IBC middleware updates. Orchestration simplifies complex cross-chain interactions within a secure and user-controlled environment on the Agoric platform. + + +## Example API Usage + +```javascript +const amount = coins(100, 'utia'); +const celestiaChain = E(orchestration).getChain('celestia'); +const icaCelestia = await E(celestiaChain).createAccount(); +await E(icaOsmosis).send(icaCelestia.receiver, amount); +await E(timerService).delay(6000n); +return E(icaCelestia).delegate(amount, celestiaValidator); +```