Follow this process if your chain uses another path than 44/60.
Warning
If your chain does not use the `44/60` path, you won't be able to use Metamask with your embedded app.
Start here
Instead of building your application in a separate repository, you will make changes to the Ethereum app.
- Fork the Ethereum app
- Before committing your changes remember to sign your commits.
- Please make your changes to the
develop
branch
The following page uses the Tomo Chain as an example, please replace every TOMO
or TOMOCHAIN
occurence with the name of your coin and chain.
Important
For security reasons, the repository is set up to accept only pull requests with signed commits. To sign your commits, use the -S flag : $ git commit -S -m your commit message
1. Create a file in app-ethereum/makefile_conf/chain
Following the next example, add a .mk
file in app-ethereum/makefile_conf/chain
APP_LOAD_PARAMS += --path "44'/889'"
DEFINES += CHAINID_UPCASE=\"TOMOCHAIN\" CHAINID_COINNAME=\"TOMO\"CHAIN_KIND=CHAIN_KIND_TOMOCHAIN CHAIN_ID=88
APPNAME = "TomoChain"
Important
It is necessary to choose a Derivation Path and a Chain ID specific to your network to prevent the risk of replay attack (Introduced by EIP155) that can happen when using the same Derivation Path ( m/44'/60'/0') and Chain ID as Ethereum. This could expose your users to loss of funds.
You can either use the same Derivation Path but define a new chain ID (make sure this is not used by another network) or use slip44/BIP44 standard to reserve a dedicated coin type that will allow you to define a new derivation path.
2. Modify src/chainConfig.h
Inside scr/chainConfig.h
, add your chain in chain_kind_e
:
typedef enum chain_kind_e {
CHAIN_KIND_ETHEREUM,
CHAIN_KIND_REOSC,
(...)
CHAIN_KIND_HPB,
CHAIN_KIND_TOMOCHAIN
} chain_kind_t;
3. Upload your app’s icons
Once you have created your App’s icons following the Design requirements, upload them in the /icons
folder.
4. Modify src/main.c
Add:
case CHAIN_KIND_TOMOCHAIN:
numTokens = NUM_TOKENS_TOMOCHAIN;
break;
and:
case CHAIN_KIND_TOMOCHAIN:
currentToken = (tokenDefinition_t *)PIC(&TOKENS_TOMOCHAIN[i]);
break;
5. Build the application
To build the clone application, follow these guidelines.
- First run the
make
command for the Ethereum App and run make load
- Run
make clean
- Load the Embedded App clone with the name of your chain. E.g:
make load CHAIN=tomochain
6. Add your Network to Chainlist.org and SLIP-0044
7. Open a pull request
When your application is ready, open a pull request on the Ethereum application repository.
Please get in touch with our team on the Ledger’s Discord server to get your PR reviewed.
Publishing the application
If you want to publish a clone application, follow the process in Publishing an application.