-
Notifications
You must be signed in to change notification settings - Fork 44
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
(Feature) Import contract #212
Conversation
e2e improve stability
fix e2e for enhance-rpc-validation branch
e2e import contract changed behavior button Import
The ability to copy ABI encoded function call has been added 5ccda3c |
@vbaranov |
tests for the button 'Copy ABI encoded'
@vbaranov I deployed an ERC20 contract in sokol (address I went to "Import account", changed the select box to "Contract", added that address and pasted the ERC20 ABI. |
@fvictorio Could you specify, does it have a |
Thanks, actually, validation was ignored for 'Next' button. Now, I check the status of method ABI encoding. Fixed here 715668a |
My bad, that was the step I was missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the only thing that feels a bit awkward when you send
a tx
and reject it. The account that remains selected is the account used to sign the tx
and not the contract.
But I think that can be solved in a different issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some comments about UX for future improvements:
- Adding a contract is difficult. You have to copy and paste the address and the ABI. After pasting one of them, you lose focus on the app to copy the other one and it closes. So you have to start over and have the same problem again. May be an option is to allow the user to open the app on the browser tab, as Metamask does.
- When you select a contract, it looks the same as an account, here are some ideas:
- Instead of saving the contract as "Account X", save it as default name of "Contract X"
- Instead of displaying
Buy
andSend
buttons we can display something more explicit like aexecute methods
button. - An other option could be to display
Execute Method
view directly on the main page, instead ofSent
/Tokens
tabs we could replaceTokens
with this view.
@fernandomg @patitonar thank you for the valuable suggestions. I keep them in mind for 4.10+ releases. All of them are conjugated with some sort of refactoring. |
Import a new type of account: smart-contract with the ability to execute transactions on it and call the data from it.
This type of account (address and ABI) is saved in the keyrings as a usual account.
A life cycle of reading the data from the contract:
A life cycle of executing the data from the contract:
Screenshots of the feature:
Import contract:
Execute transaction:
Call contract's data:
Build on top of #209 (should merged after it)