Network Configuration
Switch Network on Testnet
On Testnet, you can switch between Rinkeby, Ropsten, and Kovan. Default is Rinkeby.
import Fortmatic from 'fortmatic';
import Web3 from 'web3';
// Default is Rinkeby
const fm = new Fortmatic('YOUR_TEST_API_KEY');
window.web3 = new Web3(fm.getProvider());
// Setting testnet network to Ropsten
const fm = new Fortmatic('YOUR_TEST_API_KEY', 'ropsten');
window.web3 = new Web3(fm.getProvider());
// Setting testnet network to Kovan
const fm = new Fortmatic('YOUR_TEST_API_KEY', 'kovan');
window.web3 = new Web3(fm.getProvider());Switch Network to Custom Node
You can choose to use your own node, like a development test node or a sidechain. We currently support:
- Matic : node url under - matic.comdomain- Testnet URL: https://testnet2.matic.network 
- Mainnet URL: https://alpha.ethereum.matic.network 
 
- Skale: node url under - skalenode.comdomain- Get started with requesting a Skale node: https://skale.network/docs/developers/getting-started/beginner 
 
- Localhost: node url with - localhostor- 127.0.0.1
Please contact us at our support channel if you want to use other nodes.
import Fortmatic from 'fortmatic';
import Web3 from 'web3';
const customNodeOptions = {
    rpcUrl: 'http://127.0.0.1:7545', // your own node url
    chainId: 1011 // chainId of your own node
}
// Setting network to localhost blockchain
const fm = new Fortmatic('YOUR_TEST_API_KEY', customNodeOptions);
window.web3 = new Web3(fm.getProvider());Last updated
Was this helpful?
