Testnets

Etherspot supports EVM Testnets.

Etherspot supports many testnets as a means for developers to test their applications before they move to mainnet. Currently, we support:

  • Etherspot (our own POA network with a built-in Faucet)

  • Ropsten

  • Kovan

  • Rinkeby

  • Görli

  • Sokol (xDai Testnet)

  • Binance (Binance Testnet)

  • Fantom (Fantom Testnet)

  • Mumbai (Polygon, formerly known as Matic, Testnet)

Instantiating on all available test chains

Use the same private key or authentication method when instantiating an instance of the Etherspot SDK to generate the same Ethereum address across all chains 💪

Here we show you a basic example of how you could go about instantiating all the test networks we support and make them available via a class. Feel free to copy and paste this code, and modify it how you wish.

import {
Sdk as EtherspotSdk,
NetworkNames,
} from 'etherspot';
class EtherspotService {
instances: { [network: string]: EtherspotSdk } = {};
init(privateKey: string): void {
/**
* You can use this space to do anything else
* you're application may require to run.
*/
// Etherspot POA Network with built-in Faucet
// https://try.etherspot.dev/#TopUpAccount
this.instances[NetworkNames.Etherspot] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Etherspot });
// Ropsten
this.instances[NetworkNames.Ropsten] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Ropsten });
// Kovan
this.instances[NetworkNames.Kovan] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Kovan });
// Görli
this.instances[NetworkNames.Goerli] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Goerli });
// Sokol (xDai Testnet)
this.instances[NetworkNames.Sokol] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Sokol });
// Binance (Binance Testnet)
this.instances[NetworkNames.BscTest] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.bscTest });
// Fantom (Fantom Testnet)
this.instances[NetworkNames.FantomTest] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.fantomTest });
// Mumbai (Polygon, formerly known as Matic, Testnet)
this.instances[NetworkNames.Mumbai] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Mumbai });
}
}

Instantiating on a single chain

Below is a basic example of how you would instantiate an instance on the Etherspot SDK on a single test chain.

Kovan
Kovan
import { Sdk, NetworkNames, randomPrivateKey } from 'etherspot';
const privateKey = randomPrivateKey();
let sdk: Sdk
/**
* Replace `privateKey` with your own private key
* or Etherspot Authentication method.
*/
sdk = new Sdk({
privateKey,
}, {
networkName: 'kovan' as NetworkNames, //
});
console.info('SDK created on Kovan testnet.');