Fortmatic
WebsiteDashboardSupport
v1.x
v1.x
  • 🚀Get Started
  • 📦Install with NPM
  • 🧩Examples
  • 💬FAQ
  • Web3 Integration
    • Web3 Provider
    • Network Configuration
    • Get User Account
    • Send Ether Transaction
    • Smart Contract Functions
    • User Signing
    • SDK Error Handling
    • Batch Request
  • Smart Contract
    • ERC20 Transfer
    • ERC20 Approve
    • ERC20 TransferFrom
    • Generic Contract Call
  • Fortmatic Native
    • Log In
    • Log Out
    • Is User Logged In
    • Compose Transaction
    • Deposit Address
    • Configuration
  • Security
    • Domain Verification
Powered by GitBook
On this page
  • Switch Network on Testnet
  • Switch Network to Custom Node

Was this helpful?

  1. Web3 Integration

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:

  • Localhost: node url with localhost or 127.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());

PreviousWeb3 ProviderNextGet User Account

Last updated 5 years ago

Was this helpful?

: node url under matic.com domain

Testnet URL:

Mainnet URL:

: node url under skalenode.com domain

Get started with requesting a Skale node:

Please contact us at if you want to use other nodes.

Matic
https://testnet2.matic.network
https://alpha.ethereum.matic.network
Skale
https://skale.network/docs/developers/getting-started/beginner
our support channel