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

feat: allow users to transfer money to a .stark name #185

Open
irisdv opened this issue Dec 8, 2023 · 9 comments
Open

feat: allow users to transfer money to a .stark name #185

irisdv opened this issue Dec 8, 2023 · 9 comments

Comments

@irisdv
Copy link
Contributor

irisdv commented Dec 8, 2023

This feature will add support to sending money to a .stark domain within the app. Here is what it could look like:

Capture d’écran 2023-11-30 à 15 25 16

Implementation proposal

To retrieve the address from the user stark name, we can call the function domain_to_address from the starknet ID naming contract. This function takes in argument an encoded domain as a felt array and returns the a Starknet address. You can find more information on our encoding and decoding algorithm here.

This feature will follow a similar implementation than #184.

In starknet-snap :

In wallet-ui :

  • add a call to starkNet_getAddrFromStarkName and use it SendModal component
  • update the AddressInput component and the handleChange function to also accept a Stark name

If a significant number of contributors agree with our approach I'll start working on Pull Request.

Please feel free to answer on this issue and tell me what you think !

@cpp-phoenix
Copy link

Hey @irisdv, I can work on it

@stanleyyconsensys
Copy link
Collaborator

if the name not found, we should block it from the UI (the snap should already implemented a logic to block the txn)

@irisdv
Copy link
Contributor Author

irisdv commented Mar 25, 2024

if the name not found, we should block it from the UI (the snap should already implemented a logic to block the txn)

Ok will do ! I'd like to finish this issue, but I would need version of starknet.js above 6.3.0 so the getAddressFromStarkname function works with the latest version of our contracts. I saw you have a draft PR ongoing to update starknet.js, can I base mine on this PR, or is it subject to change ?

@stanleyyconsensys
Copy link
Collaborator

The PR that upgrading the starknet.js to latest version, which is because of supporting TXN v3, however, we discover some bugs in starknet.js, and we resolved by local patching

the PR is there #185

Yes, you can base on this PR, but we may not merge that soon, we have to merge the cairo contract upgrade first, i would suggest you to wait until the cairo contract upgrade merged, as it has some breaking change on UI too

@irisdv
Copy link
Contributor Author

irisdv commented May 20, 2024

I saw that #219 upgrading starknet.js was merged. Was the cairo contract upgrade PR also merged ?

@stanleyyconsensys
Copy link
Collaborator

No, the cairo contract PR has to re do some work due to library update

@khanti42
Copy link
Collaborator

khanti42 commented Jul 1, 2024

Hi @irisdv , the Cairo contract PR has been merged to main. What is the status with this ?

@irisdv
Copy link
Contributor Author

irisdv commented Jul 1, 2024

Ah great, then I'll update the PR I prepared and I'll make a PR this week on the repo if that's ok with you ?

@khanti42
Copy link
Collaborator

khanti42 commented Jul 2, 2024

Sounds great!

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

No branches or pull requests

5 participants
@irisdv @cpp-phoenix @stanleyyconsensys @khanti42 and others