diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000..fd49c9e --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -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 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..790bab3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,36 @@ +# Changelog + +All notable changes to this project will be documented in this file. + + + +## Unreleased + +### Added + +- Initial implementation of AutoCCTP middleware +- [#5](https://github.com/noble-assets/autocctp/pull/5) - Bumping to latest ibc-go v8 \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f9fc7c0 --- /dev/null +++ b/README.md @@ -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=" + } +} +``` \ No newline at end of file