-
Enable feature
Windows Subsystem for Linux
(WSL).dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
-
Set WSL version 2 as default.
wsl --set-default-version 2
-
Install ubuntu linux
wsl --install
-
If you encountered an error
WslRegisterDistribution failed with error: Ox80370114
Enable theHyper-V
feature. If no error occured do not execute this command.dism.exe /online /enable-feature /featurename:Microsoft-Hyper-V /norestart
If no errors occured you should see the welcome message of ubuntu linux
-
Add
NodeJS
to package repositorysudo sh -ci "$(curl -fsSL https://deb.nodesource.com/setup_18.x)"
-
Install
NodeJS
sudo apt install nodejs
-
Install
dfx
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
-
Update path to easily execute
dfx
commandPATH="$PATH:$HOME/bin"
-
Verify that
dfx
is properly installeddfx --version
- It is not recommended to use the default identity as this will hold your funds in ICP token. To create your new identity:
Input a password to secure and encrypt your identity
dfx identity new yourname
- Add funds to your identity. Creating wallet canister requires atleast 0.03 ICP. You can get ICP from exchange or send me a direct message at discord
chan#8942
with your account-id.dfx ledger account-id
- Create your wallet canister. This will hold Cycles.
If you have enough funds and no error occured this will return a canister id.
dfx ledger create-canister $(dfx identity get-principal) --amount 0.029 --network ic
Copy the canister id as it will be needed in the next command. - Deploy your wallet canister. Make sure to paste the correct canister id and remove the square brackets.
dfx identity deploy-wallet [your-canisterid] --network ic
- Add cycles to your wallet.
- You can get 20 Trillion Cycles by accomplishing the tasks in DFINITY Faucet.
- Or send me a dm at discord
chan#8942
.
- Start IC network on your machine
dfx start --clean --background
- Create a new project.
dfx new mydapp
Replace
mydapp
to your project name.
This will create a new directory and files for a sample project. - Go inside the directory. Make sure to replace the
mydapp
to your project name.cd mydapp
- Compile and deploy to local network
dfx deploy
It will return a link where you can access and test your canister.
- Deploy to main network
dfx deploy --network ic --with-cycles 300000000000