# Deploying Fuel smart contract

By [Vitamine](https://paragraph.com/@vitamine777) · 2023-01-25

---

First, let's prepare the working environment. We will use [**Gitpod**](https://www.gitpod.io/). You can read about getting started with it [here](https://mirror.xyz/vitamine777.eth/r7fF2ddlSlULpXyWJ8j_wmWSw4BrjbFagqprKcXl0WU).

![](https://storage.googleapis.com/papyrus_images/b8a1ade6c9502f7d788499c091b00f9cedd38b4c7031ce626e14ff636792e6f3.jpg)

Let's start setting up the server. Run each command separately

> sudo apt update && sudo apt upgrade -y
> 
> sudo apt install curl git -y
> 
> curl — proto ‘=https’ — tlsv1.2 -sSf [https://sh.rustup.rs](https://sh.rustup.rs) | sh

Type **1** and press **Enter**

> source "$HOME/.cargo/env"
> 
> curl — proto ‘=https’ — tlsv1.2 -sSf [https://fuellabs.github.io/fuelup/fuelup-init.sh](https://fuellabs.github.io/fuelup/fuelup-init.sh) | sh
> 
> export PATH="${HOME}/.fuelup/bin:${PATH}"
> 
> mkdir fuel-project
> 
> cd fuel-project
> 
> forc new counter-contract

Then go [here](https://github.com/Salvatorenodes/Hello-Fuel/blob/main/example.sw) and copy the code. Open file **main.sw** and replace code.

![](https://storage.googleapis.com/papyrus_images/a8345e56b47b7286f49d64bd7af9029c3e8cc3a70cd8719db7f9e23ee3803036.jpg)

Continue.

> fuelup toolchain new test\_toolchain
> 
> fuelup component add [forc@0.26.0](mailto:forc@0.26.0)
> 
> fuelup component add forc-wallet
> 
> cd counter-contract
> 
> forc build
> 
> forc-wallet init

Create a password, save the seed phrase and press **Enter.**

> forc-wallet new

Enter our password and press **Enter**. We get the wallet address. Request test tokens [**here**](https://faucet-beta-1.fuel.network/) (the faucet is very laggy, try it until you can request tokens).

> forc deploy --url [https://node-beta-1.fuel.network/graphql](https://node-beta-1.fuel.network/graphql) --gas-price 1

Copy our wallet adress (ctrl+shift+c) and paste (right-click), click **Enter.**

Now is a very important step. Click on the button indicated in the picture

![](https://storage.googleapis.com/papyrus_images/882dccdce9ad51093c809b3d0233bedcf7126b9bd511b6437a8a6ed71a6b600b.jpg)

A new terminal has been opened, we continue our work there

![](https://storage.googleapis.com/papyrus_images/0904bdf5bd10a35ab5f6e7acef23fccd002955f8e6266fdb0b712ed77c340bcf.jpg)

> cd fuel-project
> 
> cd counter-contract
> 
> export PATH="${HOME}/.fuelup/bin:${PATH}"
> 
> forc wallet sign "**Tx id to sign** from first window" 0

![](https://storage.googleapis.com/papyrus_images/fb4b2e0f5ed75086dc8de5124dda4cc7200d5f75308061a24e505188df6e6793.jpg)

Ctrl+Shift+C for copy. Paste command in second window.

![](https://storage.googleapis.com/papyrus_images/54f36cfbd5eb27745665ce740360e64f04bfbc1ed0333b055b2c78961ea12f1b.jpg)

Copy the signature and paste it into the first window

![](https://storage.googleapis.com/papyrus_images/517dd8b507531ebcea08dd83824b838869280ca1f60126dbea0eed6740948271.jpg)

Congratulations! You deployed the **smart contract**. Copy our Tx id, add 0x to the beginning and look at the contract [here](https://fuellabs.github.io/block-explorer-v2/).

---

*Originally published on [Vitamine](https://paragraph.com/@vitamine777/deploying-fuel-smart-contract)*
