# Fuel Deploy Smart Contract

By [CryptoWizard (💙,🧡)](https://paragraph.com/@cashpack) · 2023-04-08

---

**.سلام رفقا آموزش دیپلوی اسمارت کانترکت روی فاز سوم تست نت فوئل رو داریم**

اول از همه بگم این آموزش توسط **سینای عزیز** آماده شده پس برای حمایت ازش از لینک زیر توییترش رو فالو داشته باشید.

خب مراحل به این صورته که ویدیو رو از لینک پایین میبینید و همزمان این دستورات رو وارد میکنید.
--------------------------------------------------------------------------------------------

### برای شروع نیاز هست که روی سیستم اوبونتو نصب داشته باشید اگر ندارید از لینک زیر ( دقیقه 11 به بعد ) آموزشش رو ببینید و راه بندازیدش تا به ادامه کار برسیم.

[![]({{DOMAIN}}/editor/youtube/play.png)](https://www.youtube.com/watch?v=Iw9eJNOPBPI)

بعد از اینکه ترمینال اوبونتو رو راه اندازی کردید از ویدیو زیر کار رو جلو ببرید و کدها رو وارد کنید.
---------------------------------------------------------------------------------------------------

از لینک زیر وارد بشید

[

GitHub - tapexyz/tape: an open media-sharing platform.
------------------------------------------------------

an open media-sharing platform. Contribute to tapexyz/tape development by creating an account on GitHub.

https://github.com

![](https://storage.googleapis.com/papyrus_images/3908395e829b85148e8f78c50c1f385f4636c857234b772328d193b66348e112.png)

](https://lenstube.xyz/watch/0x019a59-0x013d)

### Fuel Network دستورات مربوط به

> sudo apt-get install screen
> 
> sudo apt-get install git-all
> 
> curl --proto '=https' --tlsv1.3 [https://sh.rustup.rs](https://sh.rustup.rs) -sSf | sh
> 
> source "$HOME/.cargo/env"
> 
> rustup update stable
> 
> rustup default stable
> 
> curl --proto '=https' --tlsv1.2 -sSf [https://install.fuel.network/fuelup-init.sh](https://install.fuel.network/fuelup-init.sh) | sh
> 
> export PATH="$HOME/.fuelup/bin:$PATH"
> 
> source /root/.bashrc
> 
> fuelup toolchain install latest
> 
> fuelup self update
> 
> fuelup toolchain install beta-3
> 
> fuelup default beta-3
> 
> fuelup --version
> 
> fuelup default beta-3
> 
> mkdir fuel-project
> 
> cd fuel-project
> 
> forc new counter-contract
> 
> nano counter-contract/src/main.sw

Contract
--------

    contract;
    
    storage {
        counter: u64 = 0,
    }
    
    abi Counter {
        #[storage(read, write)]
        fn increment();
    
        #[storage(read)]
        fn count() -> u64;
    }
    
    impl Counter for Contract {
        #[storage(read)]
        fn count() -> u64 {
            storage.counter
        }
    
        #[storage(read, write)]
        fn increment() {
            storage.counter = storage.counter + 1;
        }
    }
    

> cd counter-contract
> 
> forc build
> 
> forc-wallet new (برای ایجاد ولت جدید)
> 
> forc-wallet import ( ایمپورت والت قدیمی خودتون)
> 
> forc-wallet account new
> 
> forc deploy --node-url beta-3.fuel.network/graphql --gas-price 1 --random-salt
> 
> forc wallet sign --account 0 tx-id 00000000000000000000000000000000000000000000000000000000000000
> 
> [https://fuellabs.github.io/block-explorer-v2/beta-3/](https://fuellabs.github.io/block-explorer-v2/beta-3/)

موفق باشید :)
-------------

---

*Originally published on [CryptoWizard (💙,🧡)](https://paragraph.com/@cashpack/fuel-deploy-smart-contract)*
