Supported EVM Chains
Etherspot's supported EVM chains and how to use them.
Etherspot supports the following EVM-compatible chains: Ethereum Mainnet, Polygon (formerly Matic), xDai, Binance Smart Chain and Fantom.
Etherspot is designed to support any EVM-based blockchain. Feel free to contact us to discuss other EVM-based blockchains.
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 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.
*/
// Mainnet
this.instances[NetworkNames.Mainnet] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Mainnet });
// Gnosis Chain (xDai)
this.instances[NetworkNames.Xdai] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Xdai });
// Binance Smart Chain
this.instances[NetworkNames.Bsc] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Bsc });
// Polygon, formerly known as Matic
this.instances[NetworkNames.Matic] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Matic });
// Fantom
this.instances[NetworkNames.Fantom] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Fantom });
// Aurora
this.instances[NetworkNames.Aurora] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Aurora });
// Avalanche
this.instances[NetworkNames.Avalanche] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Avalanche });
// Arbitrum
this.instances[NetworkNames.Arbitrum] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Arbitrum });
// Moonbeam
this.instances[NetworkNames.Moonbeam] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Moonbeam });
// Celo
this.instances[NetworkNames.Celo] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Celo });
// Fuse
this.instances[NetworkNames.Fuse] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.Fuse });
// ArbitrumNova
this.instances[NetworkNames.ArbitrumNova] =
new EtherspotSdk(privateKey, { networkName: NetworkNames.ArbitrumNova });
}
}
Below is a basic example of how you would instantiate an instance on the Etherspot SDK on a single chain.
Mainnet
Polygon
xDai
Binance
Fantom
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: 'mainnet' as NetworkNames,
});
console.info('SDK created');
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: 'matic' as NetworkNames,
});
console.info('SDK created');
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: 'xdai' as NetworkNames,
});
console.info('SDK created');
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: 'bsc' as NetworkNames,
});
console.info('SDK created');
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: 'fantom' as NetworkNames,
});
console.info('SDK created');
Last modified 1mo ago