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

Challenge in sending packets to ICS-20 contract with starkli #206

Closed
Farhad-Shabani opened this issue Jan 20, 2025 · 3 comments · Fixed by #232
Closed

Challenge in sending packets to ICS-20 contract with starkli #206

Farhad-Shabani opened this issue Jan 20, 2025 · 3 comments · Fixed by #232
Assignees
Milestone

Comments

@Farhad-Shabani
Copy link
Member

Farhad-Shabani commented Jan 20, 2025

Context

To interact with IBC Cairo contracts, users can utilize starkli for declaring, deploying, and invoking contracts. While declaring and deploying IBC contracts with starkli is relatively straightforward, invoking them presents challenges due to the need for Cairo-encoded arguments, which hampers the user experience.

This issue is particularly relevant when wanted to submit a MsgTransfer to the ICS-20 Cairo contract. It involves constructing the message and serializing it into Cairo’s format.

Proposal

To address this, there should be a mechanism that either outputs a ready-to-use encoded value for users to pass directly into starkli, or alternatively, a command within the relayer’s CLI so that it handles the underlying complexity by accepting a few arguments like transfer amount and receiving address.

cc @soareschen, if it make sense to implement this as part of the relayer?

@Farhad-Shabani Farhad-Shabani added this to the MVP Demo #2 milestone Jan 20, 2025
@soareschen
Copy link
Collaborator

I am thinking that the simplest way is to build a simple CLI separately that would encode the messages with Cairo and output them as hex strings. The user can then copy and paste the string to starkli, or use bash subshells to compose them with the main starkli command.

This is simpler than providing it via the relayer, as a Starknet user won't need to figure out how to install and configure the relayer, together with the Cosmos config. On the other hand, we can reasonably expect all Starknet users know how to use starkli already.

@rnbguy
Copy link
Member

rnbguy commented Jan 23, 2025

I wonder if it makes sense to look into some dApp frontends, such as

@rnbguy
Copy link
Member

rnbguy commented Jan 27, 2025

simplest way is to build a simple CLI separately that would encode the messages with Cairo

as a Starknet user won't need to figure out how to install and configure the relayer

I think, we should just provide the CLI via relayer and make the relayer configuration optional for that subcommand.
It should be similar to hermes tx ft-transfer ... except for the aut-relaying part (as our validation will be auto-clearing the packets).

I suggest this as it is an interm solution until the Polaris frontend supports our implementation. I don't think, we need a separate binary for this.

Also, if you feel, starknet users may be concerned about wallet handling, we can offload the send_message call to starkli by creating another component. This avoids the de/serialization part and keeps the wallet handling and transaction submission at starkli.

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 a pull request may close this issue.

4 participants