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 sending messages to multiple bridges. #853

Closed
tomusdrw opened this issue Mar 31, 2021 · 1 comment · Fixed by #859
Closed

Support sending messages to multiple bridges. #853

tomusdrw opened this issue Mar 31, 2021 · 1 comment · Fixed by #859
Labels
A-feat New feature or request P-Relay

Comments

@tomusdrw
Copy link
Contributor

Follow up of #849

Currently the Call CLI enum, supports BridgeSendMessage variant. However in case there are multiple bridges on one source chain, we need to specify what Target chain we want to send the message to.
The code to generate such message will then need to be target-specific (see #854).

The problem is that target-chain possibilities are specific to the source chain (i.e. not all pairs are valid).
I see two possible solutions for now:

  1. Add a generic BridgeInstance parameter, which can either be an instance index of stringified chain name. (both are a bit clunky usage-wise)
  2. Change sub-commands that generate calls (send-message, encode-call) to select bridge instead of single network.

I like (2) the most, I think for send-message we already know the target chain, so perhaps just a matter of changing encode-call API.

@tomusdrw
Copy link
Contributor Author

tomusdrw commented Apr 1, 2021

As Slava noticed the Call enum is also used in the context of MessagePayload, where the it actually signifies a Call-on-the-target chain, not the source chain.
This might not be easy (or possible) to express in the CLI, so perhaps it's a good idea to split the enum into two to prevent a calls, that go like:

Source(MessagePayload) -> Target(Call->BridgeSendMessage) -> Source(Call->Transfer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-feat New feature or request P-Relay
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant