Skip to content

Commit 7752ee3

Browse files
committed
fuel update 1
1 parent 4f103b0 commit 7752ee3

File tree

18 files changed

+16
-16
lines changed

18 files changed

+16
-16
lines changed

Build a Petition Filing dApp on the Fuel Network/1. Getting Started/1. What Are We Building Today.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ As a developer, you will be getting the following outcomes when you complete thi
3232

3333
If you complete this course with me, you will be getting XPs and a special NFT which will unlock many more opportunities for you on the Metaschool platform. Here is what the NFT looks like.
3434

35-
![ezgif.com-optimize (3).gif](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/course%20NFT.gif?raw=true)
35+
![ezgif.com-optimize (3).gif](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/1.%20What%20Are%20We%20Building%20Today/ezgif.com-optimize_(3).webp)
3636

3737
Now before we move forward, let’s set some house rules first.
3838
1. Kindly do your quick assignments properly.

Build a Petition Filing dApp on the Fuel Network/4. Writing Your Smart Contract/1. Set Up the Sway Project.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Report Bugs:
4949

5050
Now, open the project folder, `petition-app` in the VS code. Here’s what the project structure will look like.
5151

52-
![fuel-project-strcuture.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Set%20Up%20the%20Sway%20Project/fuel-project-strcuture.png?raw=true)
52+
![fuel-project-strcuture.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/5.%20Set%20Up%20the%20Sway%20Project/fuel-project-strcuture.webp)
5353

5454
### `Forc.toml` file
5555

@@ -100,7 +100,7 @@ mkdir data_structures
100100

101101
The updated project structure will look like this.
102102

103-
![fuel-project-strcuture-1.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Set%20Up%20the%20Sway%20Project/fuel-project-strcuture-1.png?raw=true)
103+
![fuel-project-strcuture-1.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/5.%20Set%20Up%20the%20Sway%20Project/fuel-project-strcuture-1.webp)
104104

105105
We will use the `data_structures` folder to create different components of our `petition-contract` such as creating a campaign, tracking the campaign, and representing the current state of the campaign to the user and keeping track of the number of signs on one campaign.
106106

Build a Petition Filing dApp on the Fuel Network/4. Writing Your Smart Contract/2. Let’s Add the States and Interfaces.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ I’m so proud of you for coming this far in the course. In this lesson, we will
66

77
The contract in Sway is callable and stateful. It is deployed to the blockchain via transaction. Think of a smart contract as a deployed API that comes with a database state. In Sway, each file is defined by a program type, followed by the import of an ABI. So, before moving on to writing our contract, `main.sw`. We will write four different ABIs that we will eventually use in our smart contract. These ABIs are like libraries that will perform different tasks and help us keep records of the different information.
88

9-
![fuel-note.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-note.png?raw=true)
9+
![fuel-note.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/6.%20Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-note.webp)
1010

1111
We will start by adding the interfaces (ABI) to the `data_structures` folder. Let’s look at what they will be.
1212

@@ -23,7 +23,7 @@ First of all, we will begin with implementing the state library. We need a state
2323

2424
Create a `campaign_state.sw` file inside of the `src/data_structures` folder. Here’s what the new project structure will look like.
2525

26-
![fuel-structure-3.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-3.png?raw=true)
26+
![fuel-structure-3.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/6.%20Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-3.webp)
2727

2828
Let’s start coding. We will write and explain the code line by line for you to understand everything in detail.
2929

@@ -89,7 +89,7 @@ We need a campaign library for our petition dApp because it will help us keep a
8989

9090
Create a `campaign_info.sw` file inside of the `src/data_structures` folder. Here’s what the new project structure will look like.
9191

92-
![fuel-structure-4.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-4.png?raw=true)
92+
![fuel-structure-4.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/6.%20Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-4.webp)
9393

9494
Let’s start coding. We will write and explain the code line by line for you to understand everything in detail.
9595

@@ -200,7 +200,7 @@ We need a library that will store the information of what campaigns a user is cr
200200

201201
Create a `campaign.sw` file inside of the `src/data_structures` folder. Here’s what the new project structure will look like.
202202

203-
![fuel-structure-5.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-5.png?raw=true)
203+
![fuel-structure-5.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/6.%20Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-5.webp)
204204

205205
Let’s start coding. We will write and explain the code line by line for you to understand everything in detail.
206206

@@ -249,7 +249,7 @@ You can find the complete code of `campaign.sw` file [here](https://github.com/0
249249

250250
Create `signs.sw` file inside of the `src/data_structures` folder. Here’s what the new project structure will look like.
251251

252-
![fuel-structure-6.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-6.png?raw=true)
252+
![fuel-structure-6.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/6.%20Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-6.webp)
253253

254254
Let’s start coding. We will write and explain the code line by line for you to understand everything in detail.
255255

@@ -308,7 +308,7 @@ We’re done with creating the interfaces. Now, we need a file outside of the `d
308308

309309
Create `data_structures.sw` file inside of the `src` folder. Here’s what the new project structure will look like.
310310

311-
![fuel-structure-7.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-7.png?raw=true)
311+
![fuel-structure-7.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/6.%20Let%E2%80%99s%20Add%20the%20States%20and%20Interfaces/fuel-structure-7.webp)
312312

313313
The following code will be added to the `data_structures.sw` file.
314314

Build a Petition Filing dApp on the Fuel Network/5. Deploy the dApp/1. Setup Fuel Wallet.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Open a new terminal in your `petition-contract` directory and complete the follo
2323
- You will be prompted to enter the password you set in the previous step. Enter it and press the Enter/return button. Make sure to save your Wallet mnemonic phrase
2424
- You will get your fuel address. Save it as you'll need it to sign transactions to deploy the contract.
2525
26-
![Frame 3560370 (10).jpg](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Setup%20Fuel%20Wallet/Frame_3560370_(10).jpg?raw=true)
26+
![Frame 3560370 (10).jpg](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/10.%20Setup%20Fuel%20Wallet/Frame_3560370_(10).webp)
2727
2828
2929
3. You can view your list of accounts using the command below:
@@ -38,21 +38,21 @@ Open a new terminal in your `petition-contract` directory and complete the follo
3838
- Go to [Fuel Wallet Chrome Extension](https://chromewebstore.google.com/detail/fuel-wallet/dldjpboieedgcmpkchcjcbijingjcgok) and click on “Add to Chrome” button.
3939
- After Installing Fuel Wallet, you will see a popup tab where you need to click on “Import seed phrase” button.
4040
41-
![wallet-1.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Setup%20Fuel%20Wallet/wallet-1.png?raw=true)
41+
![wallet-1.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/10.%20Setup%20Fuel%20Wallet/wallet-1.webp)
4242
4343
- Check the terms and condition checkbox and click on “Next: Seed Phrase” button.
4444
45-
![wallet-2.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Setup%20Fuel%20Wallet/wallet-2.png?raw=true)
45+
![wallet-2.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/10.%20Setup%20Fuel%20Wallet/wallet-2.webp)
4646
4747
4848
- Now select “I have a 24-word Seed Phrase”, paste your Wallet Mnemonic Phrase and click on the “Next: Your password” button.
4949
50-
![wallet-3.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Setup%20Fuel%20Wallet/wallet-3.png?raw=true)
50+
![wallet-3.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/10.%20Setup%20Fuel%20Wallet/wallet-3.webp)
5151
5252
5353
- Now finally set a password for your wallet, make sure it is a strong password, or else you won’t be allowed to move forward and please make a note of your password because trust me you need this whenever you are going to sign a transaction. Click on “Next: Finish set up” button to move forward.
5454
55-
![wallet-4.png](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Setup%20Fuel%20Wallet/wallet-4.png?raw=true)
55+
![wallet-4.png](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/10.%20Setup%20Fuel%20Wallet/wallet-4.webp)
5656
5757
5858
- And we are all set, let now move on to top it up with some faucet ETH because we will be needing this to pay for the gas.

Build a Petition Filing dApp on the Fuel Network/6. Working with Frontend/1. Setting up Frontend.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ npx fuels build
3434

3535
This will add the `contracts` folder to your `src`:
3636

37-
![Frame 3560370 (12).jpg](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Setting%20up%20Frontend/Frame_3560370_(12).jpg?raw=true)
37+
![Frame 3560370 (12).jpg](https://raw.githubusercontent.com/0xmetaschool/Learning-Projects/refs/heads/main/assests_for_all/assets_for_petition_fuel/11.%20Setting%20up%20Frontend/Frame_3560370_(12).webp)
3838

3939
## Set up the contract address
4040

@@ -54,7 +54,7 @@ npm start
5454

5555
You will see an output like this:
5656

57-
![Frame 3560372.jpg](https://github.com/0xmetaschool/Learning-Projects/blob/main/assests_for_all/assets_for_petition_fuel/Setting%20up%20Frontend/Frame_3560372.jpg?raw=true)
57+
![Frame 3560443]()
5858

5959
## That’s a wrap
6060

assests_for_all/Completion NFT.webp

24.3 MB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)