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

Support PNA and multi hops transfer #2

Merged
merged 33 commits into from
Jan 16, 2025
Merged

Conversation

yrong
Copy link
Collaborator

@yrong yrong commented Dec 22, 2024

Details

Index the transfer for PNA asset

Index the transfer from/to 3rd Parachain with multiple-hops, add three new fields:

  • forwardedBlockNumber is the block that forwards the transfer on AH
  • bridgedBlockNumber is the block that bridges the transfer on BH
  • destinationBlockNumber is the block on the destination chain,
    • For the ToPolkadot direction, the 3rd Parachain.
    • For the ToEthereum direction, Ethereum.
type TransferStatusToPolkadot @entity {
  id: ID!
  ...
  status: String! @index
  forwardedBlockNumber: Int
  bridgedBlockNumber: Int
  destinationBlockNumber: Int
}
type TransferStatusToEthereum @entity {
  id: ID!
  ...
  status: String! @index
  forwardedBlockNumber: Int
  bridgedBlockNumber: Int
  destinationBlockNumber: Int
}
export enum TransferStatusEnum {
  // Sent on source chain
  Sent = "Sent",
  // Bridged on BH
  Bridged = "Bridged",
  // Forwarded on AH
  Forwarded = "Forwarded",
  // Processed | ProcessFailed on destination
  Processed = "Processed",
  ProcessFailed = "ProcessFailed",
}

Copy link
Collaborator

@alistair-singh alistair-singh left a comment

Choose a reason for hiding this comment

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

Hydration would be a higher priority than moonbeam initially.

"transfer_assets",
"reserve_transfer_assets",
"limited_reserve_transfer_assets",
"transfer_assets_using_type_and_then"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we only need this one I think. The others cannot accept XCM so cannot trigger a direct transfer to ethereum.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,80 @@
import {sts, Result, Option, Bytes, BitSequence} from './support'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not think we need any runtimes before 3100.

Copy link
Collaborator Author

@yrong yrong Dec 23, 2024

Choose a reason for hiding this comment

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

It's auto-generated, and some types are reused in multiple versions.

@yrong
Copy link
Collaborator Author

yrong commented Dec 23, 2024

Hydration would be a higher priority than moonbeam initially.

Yeah, understood. Just did not find a demo transfer message from Hydration which I can use to test. @alistair-singh , have we tested the multi-hops transfer for Hydration?

Btw: The process logic for Moonbeam should most probably apply to Hydration.

@yrong yrong marked this pull request as ready for review December 29, 2024 17:02
@yrong yrong changed the title Parachain multi hops transfer Support PNA and multi hops transfer Jan 11, 2025
@yrong yrong force-pushed the parachain-multi-hops-transfer branch from b3bf31c to 3e40c37 Compare January 16, 2025 07:17
@yrong yrong merged commit d25e455 into main Jan 16, 2025
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