brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
16.97k stars 2.21k forks source link

FEVM transactions support #30400

Open cypt4 opened 1 year ago

cypt4 commented 1 year ago

This is grouping ticket. 1) Support sending f1 to typed f4 addresses 2) Translate FEVM addresses to f410 addresses and and allow to choose existing FEVM address as recipient 3) Support sending from f4 to typed f1 addresses 4) Allow selecting existing f1 address as recipient when sending FEVM tokens 5) https://github.com/brave/brave-browser/issues/32325 6) Android implementation

cypt4 commented 10 months ago

Ways we support FEVM transactions:

FEVM->FEVM (Should be working on all platforms)

1) Create new Ethereum account 2) This account can be used to receive FEVM tokens 3) You can now use FEVM tokens at the "Send" screen: image image 4) FEVM balance is also displayed as part of ETH address assets: image

FVM->FEVM (Desktop)

1) To send from FVM to FEVM select Filecoin account on the "Send screen": image 2) You can now select FEVM address as a recipient: image Both FEVM and f4 form is shown for such addresses because f4 will be used in the transaction. You can also manually type FEVM or f4 address to the input. 3) Warning message is shown in case FEVM address is selected\typed: image 4) Transaction uses f4 address as a recipient: image 5) Transaction appears at the "Account details" screen (TBD print FEVM form or match existing account here): image

FEVM->FVM (Desktop)

FilForwarder contract is used to send from FEVM to FVM. 1) Select FEVM token at the "Send" screen 2) You will be able to choose both FEVM and FVM accounts now or type them manually image 3) f1 address is displayed for the transaction: image 4) Transaction appears at the "Account details" screen: image