Skip to main content

Developer Quickstart

With Conflux eSpace, your favorite tools for building and testing smart contracts just work.

Since eSpace is EVM-Compatible, you’ll just need to point your favorite builder tools at a Conflux eSpace RPC Provider.

If you are not familiar with Ethereum development, you can start by learning the basics and understanding its stack through Ethereum's official documentation

Acquiring CFX

eSpace also uses CFX as its native currency, which will be needed to pay transaction fees for deploying and interacting with the network.

To start building on eSpace, we suggest you begin with using eSpace testnet. You'll first need to acquire some testnet CFX through faucet.

Once you're ready to deploy on eSpace's mainnet, if you only have Core CFX, you can bridge over CFX from Core Space using our space bridge.

Network Configuration

eSpace Mainnet

Use the table below to configure your Ethereum tools to the eSpace mainnet.

Network NameConflux eSpace
Chain ID1030
Currency SymbolCFX
Block Explorer URL

eSpace Testnet

Use the table below to configure your Ethereum tools to the eSpace Testnet.

Network NameConflux eSpace Testnet
Chain ID71
Currency SymbolCFX
Block Explorer URL

Configure your tooling

For setting up tooling to verify a smart contract deployment, see Verifying Smart Contracts.


Modify your Hardhat config file hardhat.config.ts to point at the eSpace Testnet public RPC.


const config: HardhatUserConfig = {
networks: {
eSpaceTestnet: {
url: "" || "",
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],


A complete workflow for using Hardhat deploy contract is shown here


To deploy using the eSpace Testnet Public RPC, run:

forge create ... --rpc-url= --legacy

A complete workflow for using foundry deploy contract is shown here

Remix Web IDE

After compiling your contracts, the easiest way to deploy using Remix is by setting up Metamask, then selecting the Conflux eSpace Testnet network.

Now, in the “Deploy and Run Transactions” tab, use the “Environment” drop-down and select “Injected Provider - MetaMask.”

Connect your wallet and select the Conflux eSpace Testnet. Your account should be selected automatically in Remix, and you can click “Deploy.” A complete workflow for Remix usage is shown here


It is recommended to create virtual environments before using to avoid dependency conflicts, for example, by using venv or conda. is one of the most widely used Python interfaces for interacting with the Ethereum blockchain and ecosystem. It can be installed using the command:

pip install web3 # or pip3 install web3 can also be used to interact with Conflux eSpace. The example code below shows how to connect to the Conflux eSpace testnet endpoint and check the connection:

>>> from web3 import Web3
>>> w3 = Web3(Web3.HTTPProvider(""))
>>> w3.is_connected()
True # should return True

It should be noted that the latest version of populates maxFeePerGas and maxPriorityFeePerGas for transactions by default, while Conflux eSpace only supports the legacy transaction type prior to EIP-1559. Therefore, developers need to specify the gas_price field in transactions or use the gas price API.

from web3 import Web3
from web3.middleware.signing import construct_sign_and_send_raw_middleware
from web3.gas_strategies.rpc import rpc_gas_price_strategy

w3 = Web3(Web3.HTTPProvider(""))
assert w3.is_connected()
acct = w3.eth.account.from_key("xxxxxx") # your secret key

w3.eth.default_account = acct.address

# Set gas price strategy

w3.eth.send_transaction({"from": acct.address, "value": 0, "to": acct.address})


Brownie is a Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine. To add the Conflux eSpace networks to Brownie, run the following command:

brownie networks add "Conflux eSpace" conflux-espace-main name=Mainnet host= explorer= chainid=1030
brownie networks add "Conflux eSpace" conflux-espace-test name=Testnet host= explorer= chainid=71

To deploy on eSpace, specify the Conflux network by using the --network option.

brownie run scripts/ --network conflux-espace-test

The scripts/ is the Brownie script you want to run on Conflux eSpace. In our Brownie tutorial, we show the complete workflow of how to configure a template Brownie project and how to run Brownie scripts on Conflux eSpace.


Setting up a eSpace Testnet provider in an ethers script:

import { ethers } from "ethers"

const provider = new ethers.providers.JsonRpcProvider("")


To deploy using Scaffold-eth, you’ll need to point both your Hardhat and React settings at the eSpace Testnet.

Configure Hardhat

In the packages/hardhat/hardhat.config.js file, you’ll add the network and select it as the default network.

// Select the network you want to deploy to here:
const defaultNetwork = "eSpaceTestnet";
module.exports = {
networks: {
eSpaceTestnet: {
url: "",
accounts: {
mnemonic: mnemonic(),

Be sure to fund the deployment wallet as well! Run yarn generate to create the wallet and yarn account to check its funds. Once funded, run yarn deploy --network eSpaceTestnet to deploy on the eSpace testnet.


On some project forks, you'll want to disable the contract verification, which relies on Etherscan. This can be commented out in packages/hardhat/deploy/00_deploy_your_contract.js

Configure the Frontend

To configure your frontend, you need to add the eSpace Testnet as a network option, then select it as default.

To add the network, modify packages/react-app/src/constants.js.

export const NETWORKS = {
eSpaceTestnet: {
name: "eSpaceTestnet",
color: "#e9d0b8",
chainId: 71,
rpcUrl: "",
blockExplorer: "",

Next, in packages/react-app/src/App.jsx modify

/// 📡 What chain are your contracts deployed to?
const initialNetwork = NETWORKS.eSpaceTestnet;