LedgerHQ / app-ethereum

Ethereum wallet application for Ledger devices
Apache License 2.0
192 stars 209 forks source link

Question: How to provide a token list for eth clone apps #303

Open Thegaram opened 2 years ago

Thegaram commented 2 years ago

Description

app-ethereum supports ERC20, ERC721, ERC1155 decoding. Tokens can be registered in 2 ways:

  1. During runtime, using the PROVIDE ERC 20 TOKEN INFORMATION command.
  2. During build time in src/tokens.c.

We recently released a new eth clone app #282. Please advise how we can provide the token list here: https://github.com/LedgerHQ/app-ethereum/blob/376fbe9f44c0360af68a7b77d7def1622eceeb63/src/tokens.c#L205

Your environment

N/A

Steps to reproduce

N/A

Expected behaviour

The eth clone app should be able to decode common token operations. We believe that having an app that only offers blind signing does not provide sufficient security to our users.

Actual behaviour

Currently, the Conflux eSpace app requires blind signing for all contract transactions.

Logs

N/A

Proposed solution

Please advise on the process of providing a token list. Please also extend the documentation with the information: https://developers.ledger.com/docs/nano-app/clone-specifics.

Thegaram commented 2 years ago

For Conflux eSpace, the tokens are listed here: https://evm.confluxscan.net/tokens.

Of these, we hope that Ledger can at least decode the following: BNB, ETH, MULTI, PPI, USDC, USDT, WBTC, WCFX.

Swappi LP tokens (similar to Uniswap LPs) are also often transferred, what do you recommend for these? Not sure how the eth app deals with such tokens.

As I recall, app-ethereum used to be able to have a fallback decoder for ERC20 operations. E.g. it could detect that it's a transfer(0x123..., 3 * 10^8) operation, but for the token name it would display ???. Is this still possible?