How to add Fantom Testnet
Add Fantom Testnet on Metamask
- Visit Chainlist. https://chainlist.org/
- connect your metamask
- search Fantom
- Add to Metamask
Get some $FTM via faucet
paste your wallet addres, then click request. https://faucet.fantom.network/
Modify Truffle Setting
Open truffle-config.js
file, add a new fantom_test
into newwork section.
1const { mnemonic } = require('./secrets.json');
2const HDWalletProvider = require('@truffle/hdwallet-provider');
3
4...
5...
6
7module.exports = {
8 networks: {
9 ...
10 ...
11 fantom_test: {
12 provider: () => new HDWalletProvider(mnemonic, "https://rpc.testnet.fantom.network/"),
13 network_id: 4002,
14 gasPrice: 10e12,
15 skipDryRun: true,
16 }
17 }
18 ...
19 ...
20}