Skip to content

feat: Ethereum accounts#493

Merged
statictype merged 4 commits into
use-ink:masterfrom
JoshOrndorff:joshy-ethereum-accounts
Jul 3, 2023
Merged

feat: Ethereum accounts#493
statictype merged 4 commits into
use-ink:masterfrom
JoshOrndorff:joshy-ethereum-accounts

Conversation

@JoshOrndorff
Copy link
Copy Markdown
Contributor

@JoshOrndorff JoshOrndorff commented Jun 26, 2023

This PR demonstrates how to enable Etheruem-style accounts in the contracts-ui.

Eventually this could solve #492 . But I would request some help from a project maintainer in finishing this up.

This is only a demonstration because this PR, as it is currently written, switches the UI to use ethereum accounts always. Rather we need to provide a setting for the user. Ideally we could add a param to the url so I could link to something like contracts-ui.substrate.io/?account-type=ethereum or similar.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 26, 2023

Deploy Preview for contracts-ui ready!

Name Link
🔨 Latest commit f309a11
🔍 Latest deploy log https://app.netlify.com/sites/contracts-ui/deploys/64a30a08e9d73700081558d1
😎 Deploy Preview https://deploy-preview-493--contracts-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@JoshOrndorff JoshOrndorff mentioned this pull request Jun 26, 2023
@JoshOrndorff JoshOrndorff changed the title Ethereum accounts feat: Ethereum accounts Jun 26, 2023
@statictype
Copy link
Copy Markdown
Contributor

@JoshOrndorff does the latest commit solve your problem?

@JoshOrndorff
Copy link
Copy Markdown
Contributor Author

JoshOrndorff commented Jun 29, 2023

Wonderful! Yes! This makes the contracts ui detect whether it is dealing with an ethereum chain based on the spec name just like Polkadot JS Apps does.

I'm testing it locally and all is well. I would love it if we could get this change into the hosted contracts UI in time for the PBA on July 10th. Do you think it is possible?

@statictype
Copy link
Copy Markdown
Contributor

@JoshOrndorff what else is needed? can we merge as is?
do we need to support the full list of ethereum chains?

@JoshOrndorff
Copy link
Copy Markdown
Contributor Author

For me, there is nothing else needed. This solves the exact problem I had and I'm very grateful for your help 🙏 .

do we need to support the full list of ethereum chains?

Some of these chains don't have pallet contracts installed (for example moonbeam does not, and probably many others), so you may prefer to remove those chains. OTOH, it is only a few bytes of source code, and it may make more sense to just keep the list updated with Polkadot JS upstream rather than have your own process. IMO I would just keep the whole list, but if you want to make it smaller, I think that is fine.

For me the only spec name you must keep is frontier-template because that's the one I'm starting from.

@statictype statictype merged commit 88cf6ce into use-ink:master Jul 3, 2023
@JoshOrndorff
Copy link
Copy Markdown
Contributor Author

Hooray! Thank you for your help @statictype . Very much appreciated. The students at PBA will have a fun time working on contracts with this UI feature.

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