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

Adding send-anywhere Orchestration Contract Walkthrough #1217

Merged
merged 8 commits into from
Oct 4, 2024

Conversation

amessbee
Copy link
Contributor

@amessbee amessbee commented Sep 30, 2024

send-anywhere Orchestration Contract Walkthrough docs are added.

Refs:

Copy link

cloudflare-workers-and-pages bot commented Sep 30, 2024

Deploying documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: 146b47b
Status: ✅  Deploy successful!
Preview URL: https://107e535c.documentation-7tp.pages.dev
Branch Preview URL: https://ms-walkthrough-sendanywhere.documentation-7tp.pages.dev

View logs

@amessbee amessbee force-pushed the ms/walkthrough-sendAnywhere branch from be6d357 to 76aaa08 Compare September 30, 2024 15:35
@amessbee amessbee self-assigned this Sep 30, 2024
@amessbee amessbee force-pushed the ms/walkthrough-sendAnywhere branch from 76aaa08 to a4f6c0f Compare September 30, 2024 15:51
@amessbee amessbee marked this pull request as ready for review October 1, 2024 09:38
@amessbee amessbee requested review from mujahidkay and Jovonni October 1, 2024 09:38
Copy link
Member

@mujahidkay mujahidkay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@@ -437,6 +437,10 @@ export default defineConfig({
text: 'Contract Walkthroughs',
link: '/guides/orchestration/getting-started/contract-walkthroughs',
items: [
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After updating branch and resolving conflicts, you will also have to add his to navbar


This validation ensures that the proposal shape submitted by users contains exactly one asset and no other extraneous properties.

### Contract State Setup (in `contract` Function)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of re-iterating in contract Function multiple times, can we just have a prefaced one-liner that sets up for these h3s?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am removing it all together for now. We may get back to it in a new PR.

expose `publicFacet` and `creatorFacet`.
2. `send-anywhere.flows.js` implements the `sendIt` function which performs the actual transfer of assets when a user makes an offer.

Let us walkthrough these files one by one.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Let us walkthrough these files one by one.
Let us walk through these files one by one.

:)

### Logging setup (in `contract` Function)

The contract initializes a logging mechanism (`logNode`) to capture the contract's internal actions and state changes. Logs are written
to a newly created `log` child in vStorage, making debugging and auditing easier.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
to a newly created `log` child in vStorage, making debugging and auditing easier.
to a newly created `log` child in VStorage, making debugging and auditing easier.

I think that's how we refer to it

@amessbee amessbee force-pushed the ms/walkthrough-sendAnywhere branch from a4f6c0f to 281713b Compare October 3, 2024 11:46
@amessbee amessbee requested a review from mujahidkay October 3, 2024 13:27
@amessbee
Copy link
Contributor Author

amessbee commented Oct 3, 2024

@mujahidkay please revisit - also confirm that links in navbar and sidebar.

@@ -0,0 +1,207 @@
# SendAnywhere Contract Walkthrough
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# SendAnywhere Contract Walkthrough
# Send Anywhere Contract Walkthrough

or maybe send-anywhere if we want to adopt the filename

The contract is implemented in two separate files:

1. `send-anywhere.contract.js` implements the `start` function of the contract to initialize the contract and
expose `publicFacet` and `creatorFacet`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's only this mention about this contract's creatorFacet and nothing else on the page. We should add a line or two about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing mention of creatorFacet altogether for now.

Comment on lines 7 to 10
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.
4. `Orchestration Basics Contract`: A dApp template serving as an introduction to the foundational concepts and implementation details of orchestration basics within an Agoric dApp.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were filenames before so code-blocking them made sense. We can probably just bolden the names now.


The Agoric Dapp Orchestration Basics walkthrough (currently under development) will provide an introduction to the core concepts and basic implementation of orchestrtion within an Agoric dApp. This guide aims to:
DApp Orchestration Basics walkthrough will provide an introduction to the implementation level details of orchestration within an Agoric dApp. This guide aims to:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it currently shows what we say here that it shows. But that's a discussion/modification for a different PR.

Copy link
Contributor Author

@amessbee amessbee Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing it from here (and from nav/config) since we are moving it from example contracts to UP a level anyway in another PR after we have something to say about it.

@amessbee amessbee force-pushed the ms/walkthrough-sendAnywhere branch from f093f9d to 146b47b Compare October 4, 2024 14:19
@amessbee amessbee merged commit 8a781e5 into main Oct 4, 2024
6 checks passed
@amessbee amessbee deleted the ms/walkthrough-sendAnywhere branch October 4, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants