Skip to content

Commit ccb714b

Browse files
authored
Update README.md
update readme
1 parent d6d6ffb commit ccb714b

File tree

1 file changed

+19
-111
lines changed

1 file changed

+19
-111
lines changed

README.md

Lines changed: 19 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,35 @@
1-
<br />
2-
<p align="center">
3-
<a href="https://docs.onflow.org/flow-cli/install/">
4-
<img src="https://raw.githubusercontent.com/onflow/flow-cli/tmp/cli-dev/quick.svg" alt="Logo" width="470" height="auto">
5-
</a>
6-
7-
<p align="center">
8-
<i>Flow Quickstart will help you develop your first project without breaking a sweat.</i>
9-
<br />
10-
<a href="https://docs.onflow.org/flow-cli/install/"><strong>Read on docs »</strong></a>
11-
<br />
12-
<br />
13-
<a href="https://developers.flow.com/cadence/style-guide/project-development-tips">Project Guidelines</a>
14-
·
15-
<a href="https://github.com/onflow/flow-cli/blob/master/CONTRIBUTING.md">Contribute</a>
16-
</p>
17-
</p>
18-
<br />
19-
<br />
20-
211
### 👋 Welcome Flow Developer!
22-
You've come to the right place. We will help you develop your first Flow application.
2+
Welcome to your new Flow project. We've created the basic folder structure you will need to develop your project and provided some examples of contracts and transactions you can modify. We've also added some of the most common contracts, transactions and scripts but feel free to just delete what you don't need.
233

244
### 🔨 Getting started
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.
5+
Getting started can feel overwhelming, but we are here for you. Depending on how accustomed you are to Flow here's a list of resources you might find useful:
6+
- **[Cadence documentation](https://developers.flow.com/cadence/language)**: here you will find language reference for Cadence, which will be the language in which you develop your smart contracts,
7+
- **[Visual Studio Code](https://code.visualstudio.com/?wt.mc_id=DX_841432)** and **[Cadence extension](https://marketplace.visualstudio.com/items?itemName=onflow.cadence)**: we suggest using Visual Studio Code IDE for writing Cadence with the Cadence extension installed, that will give you nice syntax highlitning and additional smart features,
8+
- **[SDKs](https://developers.flow.com/tools#sdks)**: here you will find a list of SDKs you can use to ease the interaction with Flow network (sending transactions, fetching accounts etc),
9+
- **[Tools](https://developers.flow.com/tools#development-tools)**: development tools you can use to make your development easier, [Flowser](https://docs.flowser.dev/) can be super handy to see what's going on the blockchain while you develop
2910

30-
### 💿 Flow Setup
31-
Flow setup is the initial command you run to start your new Flow project.
32-
```shell
33-
> flow setup
34-
```
35-
The command will generate standard Flow proejct structure with the following resources:
3611

37-
- **/contracts** all your contract source code goes in this folder, you can read more about Cadence contracts here.
38-
- **/scripts** all your scripts goes here, you can read more about Cadence scripts here.
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-
- **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.
12+
### 📦 Project Structure
13+
Your project comes with some standard folders which have a special purpose:
4214

15+
- `/contracts` location for Cadence contracts go in this folder
16+
- `/scripts` location for Cadence scripts goes here
17+
- `/transactions` location for Cadence transactions goes in this folder
18+
- `/tests` all the integration tests for your dapp and Cadence tests go into this folder.
19+
- `flow.json` configuration file for your project, you can think of it as package.json, but you don't need to worry, flow dev command will configure it for you
4320

44-
### 📦 Flow Develop
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-
```shell
47-
> flow dev
48-
```
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.
5021

51-
You should see something similar to:
22+
### 👨‍💻 Start Developing
23+
After creating the project using the `flow setup` you should then start the emulator by running `flow emulator` and start the development command by running:
5224
```shell
53-
Development environment activated, we will keep an eye on any new contracts
54-
you crate inside the contract folders and automatically deploy them for you.
55-
If you create a folder inside the contract folder we will automatically
56-
create an account with that name and deploy the contract in that account.
57-
58-
59-
[15:53:38] Syncing all the contracts...
60-
61-
😎 bob
62-
|- Test contracts/bob/test.cdc
63-
64-
😜 charlie
65-
|- Goo contracts/charlie/Goo.cdc
66-
|- Loo contracts/charlie/Loo.cdc
67-
68-
😏 emulator-account
69-
|- Taa contracts/Taa.cdc
70-
|- Koo contracts/Koo.cdc
71-
|- Xoo contracts/Xoo.cdc
72-
|- Moo contracts/Moo.cdc
25+
> flow dev
7326
```
27+
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. Read more [about the command here](https://developers.flow.com/tools/flow-cli/super-commands)
7428

7529
**Importing Contracts**
7630
When you want to import the contracts you've just created you can simply do so by writing the import statement:
7731
```
78-
import Foo
32+
import "Foo"
7933
```
8034
We will automatically find your project contract named `Foo` and handle the importing for you.
8135

@@ -94,55 +48,9 @@ _folder structure_
9448

9549
You can then import the `Foo` contract in `Bar` contract the same way as any other contract:
9650
```
97-
import Foo
98-
```
99-
100-
101-
### 🚀 Flow Execute
102-
103-
This command can be used to send transactions or scripts easily by using the following command:
104-
```shell
105-
flow exec sendToken
51+
import "Foo"
10652
```
107-
The command will automatically search for that file in scripts and contracts and will execute it for you.
108-
109-
110-
### 🎉 Flow Migrate WIP
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.
112-
113-
You can easily migrate your just created project by running:
114-
115-
```shell
116-
> flow migrate
117-
118-
❓ Where do you want to migrate your project to?
119-
> 'TESTNET' <
120-
'MAINNET'
12153

122-
Looks like you are missing some of the accounts on the TESTNET:
123-
- 'charlie'
124-
- 'bob'
125-
126-
❓ Do you want to create those accounts automatically?
127-
> 'YES' <
128-
'NO'
129-
130-
❗ This command will perform the following:
131-
- Generate a new ECDSA P-256 public and private key pair.
132-
- Create a new account on Local Emulator paired with the public key.
133-
- Save the newly-created account to flow.json and the keys to keys.json.
134-
135-
136-
✨ Project successfully migrated to 'TESTNET'
137-
138-
😎 bob (0xf8d6e0586b0a20c7)
139-
|- Test contracts/bob/test.cdc
140-
141-
😏 charlie (0xb446e0586b0a20133)
142-
|- Goo contracts/charlie/Goo.cdc
143-
|- Loo contracts/charlie/Loo.cdc
144-
145-
```
14654

14755
### Further Reading
14856

0 commit comments

Comments
 (0)