Development Environment
Before You Start#
To develop smart contracts, you need to install the .NET SDK. Other tools for starting aelf nodes and publishing contracts are optional.
macOS Setup#
1/usr/sbin/softwareupdate --install-rosetta --agree-to-license
1/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"2brew --version3brew update
1brew install git2git --version
1brew install --cask dotnet-sdk2dotnet --version
1brew install protobuf2protoc --version
1brew install redis2redis-server
1brew install node2npm --version
1npm i aelf-command -g
1aelf-command create
Similar Output:
1AElf [Info]: Your wallet info is :2AElf [Info]: Mnemonic : mirror among battle muffin cattle plunge tuition buzz hip mad surround recall3AElf [Info]: Private Key : 4bf625afea60e21aa5afcab5ea682b3dfb614941245698632d72a09ae13**4AElf [Info]: Public Key : 04f9bb56a9eca921bd494e677307f0279c98f1d2ed6bdeaa6dd256878272eabd14e91ec61469d2a32ce5e63205930dabdc0b9f13fc80c1f4e31760618d182**5AElf [Info]: Address : 21qciGwcaowwBttKMjMk86AW6WajhcodSHytY1vCyZb7p*
Linux Setup#
1sudo apt-get update
1sudo apt-get install git -y2git --version
1wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb2sudo dpkg -i packages-microsoft-prod.deb3sudo apt-get update4sudo apt-get install -y dotnet-sdk-6.05dotnet --version
1curl -OL https://github.com/google/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip2unzip protoc-21.9-linux-x86_64.zip -d protoc33sudo mv protoc3/bin/* /usr/local/bin/4sudo mv protoc3/include/* /usr/local/include/5protoc --version
1sudo apt-get install redis -y2redis-server
1curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -2sudo apt-get install -y nodejs3npm --version
1npm i aelf-command -g
1aelf-command create
Windows Setup#
1Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))2choco
1choco install git -y2git --version
1choco install dotnetcore-sdk -y2dotnet --version
1choco install protoc -y2protoc --version
1choco install redis-64 -y2redis-server
1choco install nodejs -y2npm --version
1npm i aelf-command -g
1aelf-command create
Codespaces Setup#
1git --version2npm --version
1sudo apt-get update
1wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb2sudo dpkg -i packages-microsoft-prod.deb3sudo apt-get update4sudo apt-get install -y dotnet-sdk-6.05dotnet --version
1curl -OL https://github.com/google/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip2unzip protoc-21.9-linux-x86_64.zip -d protoc33sudo mv protoc3/bin/* /usr/local/bin/4sudo mv protoc3/include/* /usr/local/include/5protoc --version
1sudo apt-get install redis -y2redis-server
1npm i aelf-command -g
1aelf-command create
Edited on: 16 July 2024 05:32:33 GMT+0