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

docs: update transfer docs with support for path forwarding #6813

Conversation

crodriguezvega
Copy link
Contributor

Description

The docs as they were pre-ICS20v2 have been moved to the ICS20 v1 folder.

closes: #6608


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

| ibc_transfer | receiver | \{receiver\} |
| ibc_transfer | tokens | \{jsonTokens\} |
| ibc_transfer | memo | \{memo\} |
| ibc_transfer | forwarding_hops | `nil` |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Set value to nil since forwarding is not supported in v1, but the attribute will still be emitted.

Comment on lines +8 to +10
:::warning
This document is relevant only for fungible token transfers over channels on v1 of the ICS-20 protocol.
:::
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding a warning here on the top of each document in the ICS20 v1 folder.

Comment on lines +34 to +49
#### `transfer`

The `transfer` command allows users to execute cross-chain token transfers from the source port ID and channel ID on the sending chain.

```shell
simd tx ibc-transfer transfer [src-port] [src-channel] [receiver] [coins] [flags]
```

The `coins` parameter accepts the amount and denomination (e.g. `100uatom`) of the tokens to be transferred.

The additional flags that can be used with the command are:

- `--packet-timeout-height` to specify the timeout block height in the format `{revision}-{height}`. The default value is `0-0`, which effectively disables the timeout. Timeout height can only be absolute, therefore this option must be used in combination with `--absolute-timeouts` set to true.
- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (fromthe current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0.
- `--absolute-timeouts` to interpret the timeout timestamp as an aboslute value (when set to true). The default value is false (and thus the timeout timeout is considered relative to current UTC time).
- `--memo` to specify the memo string to be sent along with the transfer packet. If forwarding is used, then the memo string will be carried through the intermediary chains to the final destination.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was not present before, I added it now.

@crodriguezvega crodriguezvega added the priority PRs that need prompt reviews label Jul 12, 2024
Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

this looks pretty comprehensive to me! wonderful stuff once again, thanks!

docs/docs/02-apps/01-transfer/01-overview.md Outdated Show resolved Hide resolved
docs/docs/02-apps/01-transfer/08-authorizations.md Outdated Show resolved Hide resolved
Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM! Looks great and really in depth, thank you @crodriguezvega 🥇

final destination. For example, given the topology below, with 3 chains and a transfer channel between
chains A and B and between chains B and C:

![Light Mode Forwarding](./images/forwarding-3-chains-light.png#gh-light-mode-only)![Dark Mode Forwarding](./images/forwarding-3-chains-dark.png#gh-dark-mode-only)
Copy link
Contributor

Choose a reason for hiding this comment

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

was not expected to have multiple options based on light/dark mode :D

pairs of destination port ID, channel ID that are added on every chain where the tokens are received.

Please note that unwinding of vouchers is only allowed when vouchers of a single IBC denomination are
transferred (i.e. it is not possible to unwind vouchers of two different IBC denominations, since they
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] technically they could have the same path if you were to have multiple native denoms on a chain.

@crodriguezvega
Copy link
Contributor Author

I will merge this one now, and open a PR to update when #6841 is merged (or I can update the docs there as well).

@crodriguezvega crodriguezvega merged commit 69b4cba into main Jul 16, 2024
26 checks passed
@crodriguezvega crodriguezvega deleted the carlos/6608-update-transfer-docs-with-support-for-path-forwarding branch July 16, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update transfer docs with support for path forwarding
3 participants