Skip to content

Commit

Permalink
Fix casing
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Oct 18, 2024
1 parent fae96cd commit 8f9efc4
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 21 deletions.
15 changes: 8 additions & 7 deletions internal/super/generator/fixtures/README_no_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Welcome to your new Flow project. This project is a starting point for you to develop smart contracts on the Flow Blockchain. It comes with example contracts, scripts, transactions, and tests to help you get started.

## 🔨 Getting started
## 🔨 Getting Started

Here are some essential resources to help you hit the ground running:

Expand All @@ -13,6 +13,7 @@ Here are some essential resources to help you hit the ground running:
- **[Block Explorers](https://developers.flow.com/ecosystem/block-explorers)** - Block explorers are tools that allow you to explore on-chain data. You can use them to view transactions, accounts, events, and other information. [Flowser](https://flowser.dev/) is a powerful block explorer for local development on the Flow Emulator.

## 📦 Project Structure

Your project has been set up with the following structure:

- `flow.json` - This is the configuration file for your project (analogous to a `package.json` file for NPM). It has been initialized with a basic configuration to get started.
Expand All @@ -30,7 +31,7 @@ Inside the `cadence` folder you will find:

## 👨‍💻 Start Developing

### Creating a new contract
### Creating a New Contract

To add a new contract to your project, run the following command:

Expand All @@ -40,7 +41,7 @@ flow generate contract

This command will create a new contract file and add it to the `flow.json` configuration file.

### Creating a new script
### Creating a New Script

To add a new script to your project, run the following command:

Expand All @@ -56,7 +57,7 @@ You can import any of your own contracts or installed dependencies in your scrip
import "Counter"
```

### Creating a new transaction
### Creating a New Transaction

To add a new transaction to your project you can use the following command:

Expand All @@ -68,7 +69,7 @@ This command will create a new transaction file. Transactions are used to modif

You can import any dependencies as you would in a script file.

### Creating a new test
### Creating a New Test

To add a new test to your project you can use the following command:

Expand All @@ -78,7 +79,7 @@ flow generate test

This command will create a new test file. Tests are used to verify that your contracts, scripts, and transactions are working as expected.

### Installing external dependencies
### Installing External Dependencies

If you want to use external contract dependencies (such as NonFungibleToken, FlowToken, FungibleToken, etc.) you can install them using [Flow CLI Dependency Manager](https://developers.flow.com/tools/flow-cli/dependency-manager).

Expand All @@ -102,7 +103,7 @@ This command will run all tests with the `_test.cdc` suffix (these can be found

To learn more about testing in Cadence, check out the [Cadence Test Framework Documentation](https://cadence-lang.org/docs/testing-framework).

## 🚀 Deploying your project
## 🚀 Deploying Your Project

To deploy your project to the Flow network, you must first have a Flow account and have configured your deployment targets in the `flow.json` configuration file.

Expand Down
15 changes: 8 additions & 7 deletions internal/super/generator/fixtures/README_with_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Welcome to your new Flow project. This project is a starting point for you to develop smart contracts on the Flow Blockchain. It comes with example contracts, scripts, transactions, and tests to help you get started.

## 🔨 Getting started
## 🔨 Getting Started

Here are some essential resources to help you hit the ground running:

Expand All @@ -13,6 +13,7 @@ Here are some essential resources to help you hit the ground running:
- **[Block Explorers](https://developers.flow.com/ecosystem/block-explorers)** - Block explorers are tools that allow you to explore on-chain data. You can use them to view transactions, accounts, events, and other information. [Flowser](https://flowser.dev/) is a powerful block explorer for local development on the Flow Emulator.

## 📦 Project Structure

Your project has been set up with the following structure:

- `flow.json` - This is the configuration file for your project (analogous to a `package.json` file for NPM). It has been initialized with a basic configuration and your selected Core Contract dependencies to get started.
Expand All @@ -35,7 +36,7 @@ Inside the `cadence` folder you will find:

## 👨‍💻 Start Developing

### Creating a new contract
### Creating a New Contract

To add a new contract to your project, run the following command:

Expand All @@ -45,7 +46,7 @@ flow generate contract

This command will create a new contract file and add it to the `flow.json` configuration file.

### Creating a new script
### Creating a New Script

To add a new script to your project, run the following command:

Expand All @@ -61,7 +62,7 @@ You can import any of your own contracts or installed dependencies in your scrip
import "Counter"
```

### Creating a new transaction
### Creating a New Transaction

To add a new transaction to your project you can use the following command:

Expand All @@ -73,7 +74,7 @@ This command will create a new transaction file. Transactions are used to modif

You can import any dependencies as you would in a script file.

### Creating a new test
### Creating a New Test

To add a new test to your project you can use the following command:

Expand All @@ -83,7 +84,7 @@ flow generate test

This command will create a new test file. Tests are used to verify that your contracts, scripts, and transactions are working as expected.

### Installing external dependencies
### Installing External Dependencies

If you want to use external contract dependencies (such as NonFungibleToken, FlowToken, FungibleToken, etc.) you can install them using [Flow CLI Dependency Manager](https://developers.flow.com/tools/flow-cli/dependency-manager).

Expand All @@ -107,7 +108,7 @@ This command will run all tests with the `_test.cdc` suffix (these can be found

To learn more about testing in Cadence, check out the [Cadence Test Framework Documentation](https://cadence-lang.org/docs/testing-framework).

## 🚀 Deploying your project
## 🚀 Deploying Your Project

To deploy your project to the Flow network, you must first have a Flow account and have configured your deployment targets in the `flow.json` configuration file.

Expand Down
15 changes: 8 additions & 7 deletions internal/super/generator/templates/README.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Welcome to your new Flow project. This project is a starting point for you to develop smart contracts on the Flow Blockchain. It comes with example contracts, scripts, transactions, and tests to help you get started.

## 🔨 Getting started
## 🔨 Getting Started

Here are some essential resources to help you hit the ground running:

Expand All @@ -13,6 +13,7 @@ Here are some essential resources to help you hit the ground running:
- **[Block Explorers](https://developers.flow.com/ecosystem/block-explorers)** - Block explorers are tools that allow you to explore on-chain data. You can use them to view transactions, accounts, events, and other information. [Flowser](https://flowser.dev/) is a powerful block explorer for local development on the Flow Emulator.

## 📦 Project Structure

Your project has been set up with the following structure:

- `flow.json` - This is the configuration file for your project (analogous to a `package.json` file for NPM). It has been initialized with a basic configuration{{ if len .Dependencies }} and your selected Core Contract dependencies{{ end }} to get started.{{ if len .Dependencies }}
Expand All @@ -34,7 +35,7 @@ Inside the `cadence` folder you will find:

## 👨‍💻 Start Developing

### Creating a new contract
### Creating a New Contract

To add a new contract to your project, run the following command:

Expand All @@ -44,7 +45,7 @@ flow generate contract

This command will create a new contract file and add it to the `flow.json` configuration file.

### Creating a new script
### Creating a New Script

To add a new script to your project, run the following command:

Expand All @@ -60,7 +61,7 @@ You can import any of your own contracts or installed dependencies in your scrip
import "Counter"
```

### Creating a new transaction
### Creating a New Transaction

To add a new transaction to your project you can use the following command:

Expand All @@ -72,7 +73,7 @@ This command will create a new transaction file. Transactions are used to modif

You can import any dependencies as you would in a script file.

### Creating a new test
### Creating a New Test

To add a new test to your project you can use the following command:

Expand All @@ -82,7 +83,7 @@ flow generate test

This command will create a new test file. Tests are used to verify that your contracts, scripts, and transactions are working as expected.

### Installing external dependencies
### Installing External Dependencies

If you want to use external contract dependencies (such as NonFungibleToken, FlowToken, FungibleToken, etc.) you can install them using [Flow CLI Dependency Manager](https://developers.flow.com/tools/flow-cli/dependency-manager).

Expand All @@ -106,7 +107,7 @@ This command will run all tests with the `_test.cdc` suffix (these can be found

To learn more about testing in Cadence, check out the [Cadence Test Framework Documentation](https://cadence-lang.org/docs/testing-framework).

## 🚀 Deploying your project
## 🚀 Deploying Your Project

To deploy your project to the Flow network, you must first have a Flow account and have configured your deployment targets in the `flow.json` configuration file.

Expand Down
172 changes: 172 additions & 0 deletions testing/better/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
## 👋 Welcome Flow Developer!

Welcome to your new Flow project. This project is a starting point for you to develop smart contracts on the Flow Blockchain. It comes with example contracts, scripts, transactions, and tests to help you get started.

## 🔨 Getting started

Here are some essential resources to help you hit the ground running:

- **[Flow Documentation](https://docs.onflow.org/)** - The official Flow Documentation is a great starting point to begin learn about [building](https://developers.flow.com/build/flow) on Flow.
- **[Cadence Documentation](https://cadence-lang.org/docs/language)** - Cadence is the native language for the Flow Blockchain, it is a resource-oriented programming language that is designed for developing smart contracts. The documentation is a great place to start learning about the language.
- **[Visual Studio Code](https://code.visualstudio.com/)** and the **[Cadence Extension](https://marketplace.visualstudio.com/items?itemName=onflow.cadence)** - It is recommended to use the Visual Studio Code IDE with the Cadence extension installed. This will include syntax highlighting, code completion, and other features to support Cadence development.
- **[Flow Clients](https://developers.flow.com/tools/clients)** - There are clients available in multiple languages to interact with the Flow Blockchain. You can use these clients to interact with your smart contracts, run transactions, and query data from the network.
- **[Block Explorers](https://developers.flow.com/ecosystem/block-explorers)** - Block explorers are tools that allow you to explore on-chain data. You can use them to view transactions, accounts, events, and other information. [Flowser](https://flowser.dev/) is a powerful block explorer for local development on the Flow Emulator.

## 📦 Project Structure
Your project has been set up with the following structure:

- `flow.json` - This is the configuration file for your project (analogous to a `package.json` file for NPM). It has been initialized with a basic configuration and your selected Core Contract dependencies to get started.

Your project has also been configured with the following dependencies. You can add more dependencies using the `flow deps add` command:
- `Burner`

- `/cadence` - This is where your Cadence smart contracts code lives

Inside `cadence` folder you will find:
- `/contracts` - This folder contains your Cadence contracts (these are deployed to the network and contain the business logic for your application)

- `Counter.cdc`

- `/scripts` - This folder contains your Cadence scripts (read-only operations)

- `GetCounter.cdc`

- `/transactions` - This folder contains your Cadence transactions (state-changing operations)

- `IncrementCounter.cdc`

- `/tests` - This folder contains your Cadence tests (integration tests for your contracts, scripts, and transactions to verify they behave as expected)
- `Counter_test.cdc`

## 👨‍💻 Start Developing

### Creating a New Contract

To add a new contract to your project, run the following command:

```shell
flow generate contract
```

This command will create a new contract file and add it to the `flow.json` configuration file.

### Creating a New Script

To add a new script to your project, run the following command:

```shell
flow generate script
```

This command will create a new script file. Scripts are used to read data from the blockchain and do not modify state (i.e. get the current balance of an account, get a user's NFTs, etc).

You can import any of your own contracts or installed dependencies in your script file using the `import` keyword. For example:

```cadence
import "Counter"
```

### Creating a New Transaction

To add a new transaction to your project you can use the following command:

```shell
flow generate transaction
```

This command will create a new transaction file. Transactions are used to modify the state of the blockchain (i.e purchase an NFT, transfer tokens, etc).

You can import any dependencies as you would in a script file.

### Creating a New test

To add a new test to your project you can use the following command:

```shell
flow generate test
```

This command will create a new test file. Tests are used to verify that your contracts, scripts, and transactions are working as expected.

### Installing external dependencies

If you want to use external contract dependencies (such as NonFungibleToken, FlowToken, FungibleToken, etc.) you can install them using [Flow CLI Dependency Manager](https://developers.flow.com/tools/flow-cli/dependency-manager).

For example, to install the NonFungibleToken contract you can use the following command:

```shell
flow deps add mainnet://1d7e57aa55817448.NonFungibleToken
```

Contracts can be found using [ContractBrowser](https://contractbrowser.com/), but be sure to verify the authenticity before using third-party contracts in your project.

## 🧪 Testing

To verify that your project is working as expected you can run the tests using the following command:

```shell
flow test
```

This command will run all tests with the `_test.cdc` suffix (these can be found in the `cadence/tests` folder). You can add more tests here using the `flow generate test` command (or by creating them manually).

To learn more about testing in Cadence, check out the [Cadence Test Framework Documentation](https://cadence-lang.org/docs/testing-framework).

## 🚀 Deploying your project

To deploy your project to the Flow network, you must first have a Flow account and have configured your deployment targets in the `flow.json` configuration file.

You can create a new Flow account using the following command:

```shell
flow accounts create
```

Learn more about setting up deployment targets in the [Flow CLI documentation](https://developers.flow.com/tools/flow-cli/deployment/project-contracts).

### Deploying to the Flow Emulator

To deploy your project to the Flow Emulator, start the emulator using the following command:

```shell
flow emulator --start
```

To deploy your project, run the following command:

```shell
flow project deploy --network=emulator
```

This command will start the Flow Emulator and deploy your project to it. You can now interact with your smart contracts using the Flow CLI or any other Flow client.

### Deploying to Flow Testnet

To deploy your project to Flow Testnet you can use the following command:

```shell
flow project deploy --network=testnet
```

This command will deploy your project to Flow Testnet. You can now interact with your project using the Flow Testnet.

### Deploying to Flow Mainnet

To deploy your project to Flow Mainnet you can use the following command:

```shell
flow project deploy --network=mainnet
```

This command will deploy your project to Flow Mainnet. You now then interact with your project using the Flow Mainnet.

## 📚 Other Resources

- [Cadence Design Patterns](https://cadence-lang.org/docs/design-patterns)
- [Cadence Anti-Patterns](https://cadence-lang.org/docs/anti-patterns)
- [Flow Core Contracts](https://developers.flow.com/build/core-contracts)

## 🤝 Community
- [Flow Community Forum](https://forum.onflow.org/)
- [Flow Discord](https://discord.gg/flow)
- [Flow Twitter](https://x.com/flow_blockchain)

0 comments on commit 8f9efc4

Please sign in to comment.