Network Configuration
On Testnet, you will set the network to Goerli.
import Fortmatic from 'fortmatic';
import Web3 from 'web3';
// Setting test network to Goerli
const fm = new Fortmatic('YOUR_TEST_API_KEY', 'goerli');
window.web3 = new Web3(fm.getProvider());
You can choose to use your own node, like a development test node or a sidechain. We currently support:
- Get started with requesting a Skale node: https://skale.network/docs/developers/getting-started/beginner
- Localhost: node url with
localhost
or127.0.0.1
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 modified 3mo ago