Skip to main content

Local development

Setting up a local development environment

You can always set up a local network to test and deploy your smart contract!

To establish a full local network, you need to run a local node, a Core-EVM domain, and a farmer.

Besuchen Sie zunächst die Seite Autonomys-Releases und laden Sie die aktuellsten Version von der Node und dem Farmer herunter.

tip

For each release, there are two versions:

  1. skylake: for newer processors from around 2015 and onwards
  2. x86-64-v2: for older processors from around 2009 and some older VMs

Ältere Prozessoren/VMs werden von offiziellen Releases nicht mehr unterstützt, können aber bei Bedarf weiterhin manuell kompiliert werden.

After downloading both files that suit your system, start a node using your preferred terminal. If you want to start an EVM domain on your local machine, you need to specify:

  • Your local RPC server port
  • Your local web-socket RPC port You can do this with the following command:
./your_subspace_node_path laufen --dev --rpc-listen-on 127.0.0.1:9944 -- --domain-id 3 --dev --rpc-listen-on 127.0.0.1:8545

This will create a local RPC on port 8545.

Secondly, you need to start a farmer by running the following command:

 ./your_subspace_farmer_path farm --reward-address [YOUR REWARD ADDRESS] path=tmp-farm,size=100M

You can specify the desired plot size, but 100M should be sufficient.

And that’s it! By starting your local node and a farmer, you have your local RPC ready for testing and deploying your smart contracts! You can easily connect your MetaMask account to the local development network, as well as use Remix or Foundry in order to test and deploy smart contracts on a local network!