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

Update send-anywhere.md #1261

Merged
merged 3 commits into from
Dec 27, 2024
Merged
Changes from 1 commit
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
16 changes: 8 additions & 8 deletions main/guides/orchestration/contract-walkthroughs/send-anywhere.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ This validation ensures that the proposal shape submitted by users contains exac
The contract defines a shared state record as below:

```js
const sharedLocalAccountP = zone.makeOnce('localAccount', () =>
makeLocalAccount(),
);
const sharedLocalAccountP = zone.makeOnce('localAccount', () =>
makeLocalAccount()
);
```

`sharedLocalAccountP` stores the local account that will hold the transferred assets temporarily before they
`sharedLocalAccountP` stores the local account that will hold the transferred assets temporarily before they
are sent to the destination address. Since this is initialized with a promise (`makeOnce` returns a promise, so
we add a `P` to the variable name), uses of `sharedLocalAccountP` will have to await it before making use of it.
we add a `P` to the variable name), uses of `sharedLocalAccountP` will have to await it before making use of it.

### Logging setup

Expand All @@ -81,7 +81,7 @@ these functions with the necessary context (such as the contract state, logging,
const orchFns = orchestrateAll(flows, {
log,
sharedLocalAccountP,
zoeTools,
zoeTools
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Lint insistes on no-trailing-comma, which is incorrect for our JavaScript style. Is it worth finding and fixing this?

Copy link
Member

Choose a reason for hiding this comment

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

not worth fixing imo

});
```

Expand Down Expand Up @@ -137,8 +137,8 @@ Upon receiving an offer, the `sendIt` function:
- Validates the offer arguments using [endo's pattern-matching library](https://github.com/endojs/endo/tree/master/packages/patterns) to ensure the correct structure is submitted.
- Retrieves the `proposal` from the seat, extracting (from `give`) the asset (`brand` and `amount`) being transferred.
- The contract ensures that the asset brand is registered on the local chain by querying the chain’s asset registry
(`vbank`). If not the contract throws an error and exits the transaction. It also gets the `denom` for the
destination chain from the `vbank`.
(`vbank`). If not the contract throws an error and exits the transaction. It also gets the `denom` for the
destination chain from the `vbank`.
- retrieves the `chainId` for the remote chain.

```js
Expand Down
Loading