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: Adding README #12

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 10 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Ensure changelog updates"
on:
pull_request:
branches: [main]

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add newline at end of file.

Add a newline character at the end of the file to comply with POSIX standards.

       - uses: dangoslen/changelog-enforcer@v3
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: dangoslen/changelog-enforcer@v3
- uses: dangoslen/changelog-enforcer@v3
🧰 Tools
🪛 yamllint

[error] 10-10: no new line character at the end of file

(new-line-at-end-of-file)

36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Changelog

All notable changes to this project will be documented in this file.

<!--
### Added

Contains the new features.

### Changed

Contains API breaking changes to existing functionality.

### Deprecated

Contains the candidates for removal in a future release.

### Removed

Contains API breaking changes of removed APIs.

### Fixed

Contains bug fixes.

### Improvements

Contains all the PRs that improved the code without changing the behaviors.
-->

## Unreleased

### Added

- Initial implementation of AutoCCTP middleware
- [#5](https://github.com/noble-assets/autocctp/pull/5) - Bumping to latest ibc-go v8
83 changes: 83 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# AutoCCTP

AutoCCTP is an IBC Middleware which allows a user to send funds from an IBC connected chain using the ICS20 protocol, to a non-Cosmos CCTP domain, via the Noble chain.

The middleware has a strong dependency on CCTP module and expects a specific format of the ICS20 memo field populated with CCTP Deposit parameters to be filled.

## How to use?

ICS20 transfer destination address needs to be the module address of the `autocctp` module. For any other address, autocctp is not possible. This value can be obtained by running

```sh
nobled q auth module-account autocctp
# or
curl {rest-api-url}/cosmos/auth/v1beta1/module_accounts/autocctp
```

The current module addresses are:
| Network | Chain ID | Address |
| ------- | -------- | ------- |
| Mainnet | noble-1 | //todo |
| Testnet | grand-1 | //todo |

ICS20 transfer incoming from counterparty chain needs to populate the ICS20 memo field with following information:

1. **Destination Domain** - Circle issued identifier for different blockchains. Values for this field can be found [here](https://developers.circle.com/stablecoins/supported-domains).
2. **Mint Recipient** - Address of the recipient on the Destination Domain
3. **Fee Recipient** (optional) - A bech32 encoded address on Noble which will receive the transfer fees. If this value is specified, Amount also needs to be specified.
4. **Amount** (optional) - Number denoting the amount which should be forwarded to the Destination Domain. Should be less than ICS20 transfer amount. The difference will be sent to Fee Recipient.
5. **Destination Caller** (optional) - Caller on destination domain

The response acknowledgement includes the Deposit Nonce in case of success, and error message in case of failure. If the autocctp forwarding fails, the entire ICS20 transfer fails and the funds are avaliable back on the counterparty chain.

### Examples

1. Forward entire ICS20 transfer amount to the destination domain

```jsonc
{
"deposit_for_burn": {
"destination_domain": 5,
"mint_recipient": "MLqOfAGMXKGrGr0LNjV8xjpJALM3zZB/GDVgGqlEjcU="
}
}
```

2. Forward only the specified amount to the destination domain

```jsonc
{
"deposit_for_burn": {
"destination_domain": 5,
"mint_recipient": "MLqOfAGMXKGrGr0LNjV8xjpJALM3zZB/GDVgGqlEjcU=",
"amount": "99",
"fee_recipient": "noble1qe8uuf5x69c526h4nzxwv4ltftr73v7qgk33qz"
}
}
```

3. Forward entire ICS20 transfer amount to the destination domain with destination caller

```jsonc
{
"deposit_for_burn_with_caller": {
"destination_domain": 5,
"mint_recipient": "MLqOfAGMXKGrGr0LNjV8xjpJALM3zZB/GDVgGqlEjcU=",
"destination_caller": "T6iiTX0dDAj20/FvjjtLKCjtLcy5XQ4dTO6NFHPaG1U="
}
}
```

4. Forward only the specified amount to the destination domain with destination caller

```jsonc
{
"deposit_for_burn_with_caller": {
"destination_domain": 5,
"mint_recipient": "MLqOfAGMXKGrGr0LNjV8xjpJALM3zZB/GDVgGqlEjcU=",
"amount": "100",
"fee_recipient": "noble1qe8uuf5x69c526h4nzxwv4ltftr73v7qgk33qz",
"destination_caller": "T6iiTX0dDAj20/FvjjtLKCjtLcy5XQ4dTO6NFHPaG1U="
}
}
```
Loading