You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,10 @@
22
22
You've come to the right place. We will help you develop your first Flow application.
23
23
24
24
### 🔨 Getting started
25
-
Starting your project is very simple.
26
-
27
-
1. Run flow setup command `flow setup`
28
-
2. Run flow development command `flow dev`
29
-
3. Start writing your contracts, we will take care of the rest
25
+
Start your new project simply by following these steps:
26
+
1. run flow setup command `flow setup`,
27
+
2. run flow development command `flow dev` and make sure you have emulator running (`flow emulator`),
28
+
3. start writing your contracts, the dev command will make sure everything gets deployed.
30
29
31
30
### 💿 Flow Setup
32
31
Flow setup is the initial command you run to start your new Flow project.
@@ -38,15 +37,16 @@ The command will generate standard Flow proejct structure with the following res
38
37
-**/contracts** all your contract source code goes in this folder, you can read more about Cadence contracts here.
39
38
-**/scripts** all your scripts goes here, you can read more about Cadence scripts here.
40
39
-**/transactions** all the transactions goes in this folder, you can read more about Cadence transactions here.
40
+
-**/tests** all the integration tests for your dapp and Cadence tests go into this folder.
41
41
-**flow.json** this is a configuration file for your project, but you don't need to worry about it, we will configure everything for you as you go.
42
42
43
43
44
44
### 📦 Flow Develop
45
-
Flow develop command can be run after you created the project using the above flow setup command. You can run it like so:
45
+
After creating the project using the flow setup command you should then start the emulator and run the development command in the newly created project directory like so:
46
46
```shell
47
47
> flow dev
48
48
```
49
-
Running this command will start up a local emulator, which behaves similar to the real Flow network so you can use it during testing. It will then automatically watch your project files and make sure to automatically sync all the contracts on the network.
49
+
After the command is started it will automatically watch any changes you make to Cadence files and make sure to continiously sync those changes on the emulator network. If you make any mistakes it will report the errors as well.
50
50
51
51
You should see something similar to:
52
52
```shell
@@ -72,12 +72,15 @@ create an account with that name and deploy the contract in that account.
72
72
|- Moo contracts/Moo.cdc
73
73
```
74
74
75
-
When you want to import the contract you just created you can simply do by writing the import statement:
75
+
**Importing Contracts**
76
+
When you want to import the contracts you've just created you can simply do so by writing the import statement:
76
77
```
77
78
import Foo
78
79
```
79
-
We will automatically find your contract named `Foo` and make sure it's deployed and imported ready to be used.
80
-
If you want to deploy a contract to a specific account you can just create a folder inside the contracts folder and we will create the account for you which will have the same name as the folder you created. All the contracts inside this folder will be deployed automatically to that account.
80
+
We will automatically find your project contract named `Foo` and handle the importing for you.
81
+
82
+
**Deploying to specific accounts**
83
+
By default all contracts are deployed to a default account. If you want to seperate contracts to different accounts you can easily do so by creating a folder inside the contracts folder and we will create the account for you which will have the same name as the folder you just created. All the contracts inside that folder will be deployed automatically to the newly created account.
81
84
82
85
Example deploying to charlie account:
83
86
@@ -104,7 +107,7 @@ flow exec sendToken
104
107
The command will automatically search for that file in scripts and contracts and will execute it for you.
105
108
106
109
107
-
### 🎉 Flow Migrate
110
+
### 🎉 Flow Migrate WIP
108
111
After you finish writing your project and you are ready to move on to testnet or mainnet we got you covered ther as well.
109
112
110
113
You can easily migrate your just created project by running:
0 commit comments