
Subscribe to Vitamine

Subscribe to Vitamine
Share Dialog
Share Dialog


<100 subscribers
<100 subscribers
Let's use the tool we used before - Gitpod.
We need to upgrade Ubuntu to version 22. Here we go
sudo apt list --upgradable
sudo apt update && sudo apt upgrade -y
sudo apt-get install ufw
sudo ufw enable
sudo ufw allow 1022/tcp
sudo ufw reload
sudo apt install update-manager-core -y
sudo do-release-upgrade -d
After this command, a long installation will begin.




Now let's install the components needed to deploy a smart contract
curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash
source /home/gitpod/.bashrc
protostar -v

Continue.
protostar init

cd [YOUR FOLDER NAME]

protostar build

Now create a .env file in your folder.

We will use the ArgentX. Copy the private key and paste it into the .env file (the gear at the top right and click on the name of the account).

Important! We need to have at least 1 transaction in the network in which we will deploy the contract to continue (testnet or mainnet).
Continue. We will be deploying the contract in mainnet. If you want to do this on a test network, just replace the ends of the following 2 commands "mainnet >>> testnet".
protostar declare ./build/main.json --account-address [YOUR_WALLET_ADDRESS] --max-fee auto --private-key-path ./.env --network mainnet

Go to explorer (transaction hash) and wait for confirmation in L2.

Continue
protostar deploy [CLASS_HASH] --account-address [YOUR_WALLET_ADDRESS] --max-fee auto --private-key-path ./.env --network mainnet
Take CLASS_HASH from the previous result.

Congratulations, you have deployed a smart contract!
The last command may give an error. This is normal. This is Starknet. Enter the command until it works, you can wait 5-10 minutes.

Let's use the tool we used before - Gitpod.
We need to upgrade Ubuntu to version 22. Here we go
sudo apt list --upgradable
sudo apt update && sudo apt upgrade -y
sudo apt-get install ufw
sudo ufw enable
sudo ufw allow 1022/tcp
sudo ufw reload
sudo apt install update-manager-core -y
sudo do-release-upgrade -d
After this command, a long installation will begin.




Now let's install the components needed to deploy a smart contract
curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash
source /home/gitpod/.bashrc
protostar -v

Continue.
protostar init

cd [YOUR FOLDER NAME]

protostar build

Now create a .env file in your folder.

We will use the ArgentX. Copy the private key and paste it into the .env file (the gear at the top right and click on the name of the account).

Important! We need to have at least 1 transaction in the network in which we will deploy the contract to continue (testnet or mainnet).
Continue. We will be deploying the contract in mainnet. If you want to do this on a test network, just replace the ends of the following 2 commands "mainnet >>> testnet".
protostar declare ./build/main.json --account-address [YOUR_WALLET_ADDRESS] --max-fee auto --private-key-path ./.env --network mainnet

Go to explorer (transaction hash) and wait for confirmation in L2.

Continue
protostar deploy [CLASS_HASH] --account-address [YOUR_WALLET_ADDRESS] --max-fee auto --private-key-path ./.env --network mainnet
Take CLASS_HASH from the previous result.

Congratulations, you have deployed a smart contract!
The last command may give an error. This is normal. This is Starknet. Enter the command until it works, you can wait 5-10 minutes.

No activity yet