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:
- Görli
- Sokol (xDai Testnet)
- Binance (Binance Testnet)
- Fantom (Fantom Testnet)
- Mumbai (Polygon, formerly known as Matic, Testnet)
- Aurora Testnet
- Fuji (Avalanche Testnet)
- Arbitrum Testnet
- Arbitrum Nitro (Arbitrum Nova Testnet)
- Moonbase (Moonbeam Testnet)
- Celo Testnet
- Fuse Sparknet
- Optimism Görli
- Rinkeby (Deprecated)
- Kovan (Deprecated)
- Ropsten (Deprecated)
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,
EnvNames,
} 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, {
env: EnvNames.TestNets,
networkName: NetworkNames.Etherspot
});
// Görli
this.instances[NetworkNames.Goerli] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.Goerli
});
// Sokol (xDai Testnet)
this.instances[NetworkNames.Sokol] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.Sokol
});
// Binance (Binance Testnet)
this.instances[NetworkNames.BscTest] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.bscTest
});
// Fantom (Fantom Testnet)
this.instances[NetworkNames.FantomTest] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.fantomTest
});
// Mumbai (Polygon, formerly known as Matic, Testnet)
this.instances[NetworkNames.Mumbai] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.Mumbai
});
// Aurora Testnet
this.instances[NetworkNames.AuroraTest] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.AuroraTest
});
// Fuji (Avalanche Testnet)
this.instances[NetworkNames.Fuji] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.Fuji
});
// Moonbase (Moonbeam Testnet)
this.instances[NetworkNames.Moonbase] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.Moonbase
});
// Celo Testnet
this.instances[NetworkNames.CeloTest] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.CeloTest
});
// Fuse Sparknet (Fuse Testnet)
this.instances[NetworkNames.FuseSparknet] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.FuseSparknet
});
// Arbitrum Nova (Arbitrum Nitro testnet)
this.instances[NetworkNames.ArbitrumNitro] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.ArbitrumNitro
});
// Neon (Neon Devnet)
this.instances[NetworkNames.NeonDevnet] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.NeonDevnet
});
// Optimism Görli
this.instances[NetworkNames.OptimismGoerli] =
new EtherspotSdk(privateKey, {
env: EnvNames.TestNets,
networkName: NetworkNames.OptimismGoerli
});
}
}
Below is a basic example of how you would instantiate an instance on the Etherspot SDK on a single test chain.
Görli
import { Sdk, NetworkNames, randomPrivateKey, EnvNames } from 'etherspot';
const privateKey = randomPrivateKey();
let sdk: Sdk
/**
* Replace `privateKey` with your own private key
* or Etherspot Authentication method.
*/
sdk = new Sdk({
privateKey,
}, {
env: EnvNames.TestNets,
networkName: 'goerli' as NetworkNames, //
});
console.info('SDK created on Görli testnet.');
Last modified 1mo ago