[Solved] here are the steps to take:
Go into the Frontier repo
Fix the Substrate version to what you need: like polkadot-v0.9.24
Open this file repo/template/runtime/src/lib.rs
Change your default chainId from 42 to something else, for example 1942. Because 42 is also the Kovan's chainId. I have no idea why the chainId was set to 42.
Then build it and run it:
cargo build --release
./target/release/frontier-template-node --dev
That runs a chain based on Substrate Node Template. The
The hidden port is actually 9933, so here is the correct URL to connect your Ethereum toolsMetaMask, Hardhat, Remix to the running chain:.
url: "http://127.0.0.1:9933",
chainId: 42,
I have no idea why the chainId was set to 42, which is the same chainId of the Ethereum Kovan network.Setup your Polkadot UI
So you can changeOpen Polkadot UI in your browser at https://polkadot.js.org/apps/#?rpc=ws://127.0.0.1:9944
Copy the chainId here:polkadot UI setting at template/runtime/src/lib.rs
https://github.com/paritytech/frontier/tree/master/template
To clarify whenGo to use the Frontier's template folderPolkadot UI > Settings > Developer tab: Paste the copied setting
To clarify when to use the Frontier's template folder:
- If you have another repo that uses Frontier as a dependency, then use Option 1 above with Josh's video.
- If you want to run Ethereum smart contracts inside a substrate based chain with minimum effort, use Option 2 above and my steps above.