

Share Dialog
Share Dialog

Subscribe to Vitamine

Subscribe to Vitamine
<100 subscribers
<100 subscribers
First, let's prepare the working environment. We will use Gitpod. You can read about getting started with it here.

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 | sh
Type 1 and press Enter
source "$HOME/.cargo/env"
curl — proto ‘=https’ — tlsv1.2 -sSf 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 and copy the code. Open file main.sw and replace code.

Continue.
fuelup toolchain new test_toolchain
fuelup component add 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 (the faucet is very laggy, try it until you can request tokens).
forc deploy --url 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

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

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

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

Copy the signature and paste it into the first window

Congratulations! You deployed the smart contract. Copy our Tx id, add 0x to the beginning and look at the contract here.
First, let's prepare the working environment. We will use Gitpod. You can read about getting started with it here.

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 | sh
Type 1 and press Enter
source "$HOME/.cargo/env"
curl — proto ‘=https’ — tlsv1.2 -sSf 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 and copy the code. Open file main.sw and replace code.

Continue.
fuelup toolchain new test_toolchain
fuelup component add 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 (the faucet is very laggy, try it until you can request tokens).
forc deploy --url 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

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

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

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

Copy the signature and paste it into the first window

Congratulations! You deployed the smart contract. Copy our Tx id, add 0x to the beginning and look at the contract here.
No activity yet