diff --git a/docs/blockchain-development-tutorials/cadence/account-management/account-linking-with-dapper.md b/docs/blockchain-development-tutorials/cadence/account-management/account-linking-with-dapper.md index a47b116f95..51b509f704 100644 --- a/docs/blockchain-development-tutorials/cadence/account-management/account-linking-with-dapper.md +++ b/docs/blockchain-development-tutorials/cadence/account-management/account-linking-with-dapper.md @@ -90,7 +90,7 @@ Once it's installed, you'll need to initialize Flow in your Next.js project. Fro flow init --config-only ``` -The `--config-only` flag [initializes a project] with the just the config file. This allows the Flow CLI to interact with your project without adding any unnecessary files. +The `--config-only` flag [initializes a project] with the just the config file. This allows the Flow CLI to interact with your project without adding adding the other files you want for most projects. Next, you'll need to do a little bit of config work so that your project knows how to read Cadence files. Install the Flow Cadence Plugin: diff --git a/docs/blockchain-development-tutorials/cadence/cadence-advantages/compose-with-cadence-transactions.md b/docs/blockchain-development-tutorials/cadence/cadence-advantages/compose-with-cadence-transactions.md index aaa23ca7ae..1ad5665825 100644 --- a/docs/blockchain-development-tutorials/cadence/cadence-advantages/compose-with-cadence-transactions.md +++ b/docs/blockchain-development-tutorials/cadence/cadence-advantages/compose-with-cadence-transactions.md @@ -50,7 +50,7 @@ Create a [new project] with the [Flow CLI]: flow init ``` -Follow the prompts and create your project. You do **not** need to install any dependencies. +Follow the prompts and create a `Basic Cadence project (no dependencies)`. ### Install dependencies diff --git a/docs/blockchain-development-tutorials/cadence/getting-started/cadence-environment-setup.md b/docs/blockchain-development-tutorials/cadence/getting-started/cadence-environment-setup.md index 5790cf6176..ff577d513f 100644 --- a/docs/blockchain-development-tutorials/cadence/getting-started/cadence-environment-setup.md +++ b/docs/blockchain-development-tutorials/cadence/getting-started/cadence-environment-setup.md @@ -46,7 +46,8 @@ You'll work with a `Counter` contractβ€”a simple but comprehensive example that **Time Commitment:** Approximately 30-45 minutes -**Prerequisites:** +**Prerequisites:** + - Basic command line familiarity - Code editor (VSCode recommended) - Node.js installed (for future frontend development) @@ -91,8 +92,9 @@ flow init ``` When prompted: + 1. **Project name:** Enter your preferred project name -2. **Install core contracts:** Select `No` for this tutorial +2. Select `Basic Cadence project (no dependencies)`. The `flow init` command creates: @@ -182,7 +184,6 @@ access(all) contract Counter { - **Events**: `CounterIncremented` and `CounterDecremented` notify listeners when changes occur - **Initializer**: `init()` sets the initial count to 0 when the contract is deployed - **Public Functions**: - - `increment()`: Increases count by 1 and emits an event - `decrement()`: Decreases count by 1 and emits an event - `getCount()`: Returns the current count (read-only, marked with `view`) @@ -219,18 +220,18 @@ This shows which networks your configured accounts are accessible on: 🌐 Network 🟒 Local (running) πŸ”΄ Local (stopped) βœ“ Found βœ— Error ───────────────────────────────────────────────────── -🟒 emulator +🟒 emulator βœ“ default (f3fcd2c1a78f5eee): 0.00100000 FLOW βœ“ emulator-account (f8d6e0586b0a20c7): 999999999.99300000 FLOW βœ“ test-account (e03daebed8ca0615): 0.00100000 FLOW -🌐 mainnet +🌐 mainnet No accounts found -🌐 testnet +🌐 testnet No accounts found -🟒 testing +🟒 testing βœ“ default (f3fcd2c1a78f5eee): 0.00100000 FLOW βœ“ emulator-account (f8d6e0586b0a20c7): 999999999.99300000 FLOW βœ“ test-account (e03daebed8ca0615): 0.00100000 FLOW @@ -239,7 +240,7 @@ This shows which networks your configured accounts are accessible on: πŸ’‘ Tip: To fund testnet accounts, run: flow accounts fund ``` -This is a great tool to visualize your different accounts and balances when you are developing. +This is a great tool to visualize your different accounts and balances when you are developing. ### Configure Contract Deployment @@ -250,6 +251,7 @@ flow config add deployment ``` Follow the prompts: + 1. **Network:** Select `emulator` 2. **Account:** Select `test-account` 3. **Contract:** Select `Counter` @@ -390,15 +392,18 @@ If you want to learn more about writing transactions, please read the docs for [ You've successfully established a solid foundation for building on Flow. Let's recap what you've accomplished and learned. Through this hands-on tutorial, you've successfully built a complete Flow development foundation: βœ… **Complete Flow Development Environment** + - Flow CLI installed and configured for project management - Local Flow emulator running and ready for development - Project creation and management workflow with `flow init` βœ… **Smart Contract Deployment Skills** + - Counter contract successfully deployed to your local emulator - Account creation and contract deployment configuration mastered βœ… **Blockchain Interactions** + - Scripts to query contract state (reading blockchain data) - Transactions to modify contract state (writing to blockchain) - Real-time interaction with blockchain data through CLI commands @@ -429,4 +434,4 @@ Welcome to the Flow developer communityβ€”you're ready to build the future of di [configuration docs]: ../../../build/tools/flow-cli/flow.json/configuration.md [Flow Discord Community]: https://discord.com/invite/flow [Cadence Language Reference]: https://cadence-lang.org -[Flow GitHub]: https://github.com/onflow \ No newline at end of file +[Flow GitHub]: https://github.com/onflow diff --git a/docs/blockchain-development-tutorials/forte/scheduled-transactions/scheduled-transactions-introduction.md b/docs/blockchain-development-tutorials/forte/scheduled-transactions/scheduled-transactions-introduction.md index 61049de747..2b9025efa4 100644 --- a/docs/blockchain-development-tutorials/forte/scheduled-transactions/scheduled-transactions-introduction.md +++ b/docs/blockchain-development-tutorials/forte/scheduled-transactions/scheduled-transactions-introduction.md @@ -38,7 +38,7 @@ Flow fixes this problem with **scheduled transactions**. Scheduled Transactions After completing this tutorial, you will be able to: - Understand the concept of scheduled transactions and how they solve blockchain limitations -- Explain the key components of the FlowTransactionScheduler system +- Explain the key components of the `FlowTransactionScheduler` system - Implement a basic scheduled transaction using the provided scaffold - Analyze the structure and flow of scheduled transaction transactions - Create custom scheduled transaction contracts and handlers @@ -52,9 +52,9 @@ This tutorial assumes you have a modest knowledge of [Cadence]. If you don't, yo ## Getting Started -Begin by creating a new repo using the [Scheduled Transactions Scaffold] as a template. +Begin by running `flow init` and select `Scheduled Transactions project`. Open the project. -This repository has a robust quickstart in the readme. Complete that first. It doesn't seem like much at first. The counter was at `0`, you ran a transaction, now it's at `1`. What's the big deal? +The readme has a robust getting started guide. Complete that to set up and run the demo scheduled transaction. It doesn't seem like much at first. The counter was at `0`, you ran a transaction, now it's at `1`. What's the big deal? Let's try again to make it clearer what's happening. Open `cadence/transactions/ScheduleIncrementIn.cdc` and look at the arguments for the transaction: @@ -339,7 +339,7 @@ transaction() { // Create and save the Manager resource let manager <- FlowTransactionSchedulerUtils.createManager() signer.storage.save(<-manager, to: FlowTransactionSchedulerUtils.managerStoragePath) - + // Create a capability for the Manager let managerCap = signer.capabilities.storage.issue<&FlowTransactionSchedulerUtils.Manager>(FlowTransactionSchedulerUtils.managerStoragePath) @@ -364,6 +364,7 @@ manager.schedule( ``` The Manager also provides utility methods for: + - Scheduling another transaction with a previously used handler - Getting scheduled transaction information in many different ways - Canceling scheduled transactions @@ -503,7 +504,7 @@ assert( if RickRollTransactionHandler.account.storage.borrow<&AnyResource>(from: /storage/RickRollTransactionHandler) == nil { let handler <- RickRollTransactionHandler.createHandler() RickRollTransactionHandler.account.storage.save(<-handler, to: /storage/RickRollTransactionHandler) - + // Issue a non-entitled public capability for the handler that is publicly accessible let publicCap = RickRollTransactionHandler.account.capabilities.storage .issue<&{FlowTransactionScheduler.TransactionHandler}>(/storage/RickRollTransactionHandler) diff --git a/docs/blockchain-development-tutorials/tokens/fungible-token-cadence.md b/docs/blockchain-development-tutorials/tokens/fungible-token-cadence.md index 4b387c2c30..5052b1861a 100644 --- a/docs/blockchain-development-tutorials/tokens/fungible-token-cadence.md +++ b/docs/blockchain-development-tutorials/tokens/fungible-token-cadence.md @@ -102,7 +102,7 @@ Once you have the Flow CLI installed, you can set up a new project using the `fl flow init FooToken ``` -> Note: Select "No" when it asks you to install core contracts for the purposes of this tutorial. +Select `Basic Cadence project (no dependencies)`. Upon execution, the command will generate the following directory structure: diff --git a/docs/blockchain-development-tutorials/tokens/nft-cadence.md b/docs/blockchain-development-tutorials/tokens/nft-cadence.md index 4d5d940005..d90319f466 100644 --- a/docs/blockchain-development-tutorials/tokens/nft-cadence.md +++ b/docs/blockchain-development-tutorials/tokens/nft-cadence.md @@ -61,7 +61,7 @@ Once you have the Flow CLI installed, you can set up a new project using the `fl flow init foobar-nft ``` -> Note: Select "No" when it asks you to install core contracts for the purposes of this tutorial. +Select `Basic Cadence project (no dependencies)`. Upon execution, the command will generate the following directory structure: diff --git a/docs/build/tools/flow-cli/flow.json/initialize-configuration.md b/docs/build/tools/flow-cli/flow.json/initialize-configuration.md index 3f8ecf0030..5f0e2bbb90 100644 --- a/docs/build/tools/flow-cli/flow.json/initialize-configuration.md +++ b/docs/build/tools/flow-cli/flow.json/initialize-configuration.md @@ -13,22 +13,12 @@ flow init ``` This command will: + - Create a new `flow.json` configuration file - Set up default networks (emulator, testnet, mainnet) - Create an emulator service account - Generate a basic project structure with `cadence/` directories - -## Example Output - -```shell -> flow init - -Configuration initialized -Service account: 0xf8d6e0586b0a20c7 - -Start emulator by running: 'flow emulator' -Reset configuration using: 'flow init --reset' -``` +- Give you options for project scaffolding ## Project Structure @@ -54,6 +44,7 @@ flow init --config-only ``` This is useful when: + - You already have a project structure - You want to add Flow configuration to an existing project - You're setting up configuration for a specific environment @@ -67,10 +58,12 @@ flow init --global ``` **Global configuration locations:** + - **macOS/Linux:** `~/flow.json` - **Windows:** `C:\Users\$USER\flow.json` **Priority order:** + 1. Local `flow.json` (highest priority) 2. Global `flow.json` (lowest priority) @@ -85,6 +78,7 @@ If a `flow.json` file already exists, you'll see this error: ``` **Solutions:** + - Delete the existing `flow.json` file first - Initialize in a different directory - Use `--config-only` to create a new config in a different location @@ -99,8 +93,6 @@ flow init --config-only Creates only the `flow.json` file without project structure. - - ### Global Flags The following global flags are also available: @@ -133,9 +125,3 @@ After initializing your configuration: - [`flow config add`](./manage-configuration.md) - Add configuration items - [`flow accounts create`](../accounts/create-accounts.md) - Create new accounts - [`flow project deploy`](../deployment/deploy-project-contracts.md) - Deploy contracts - - - - - -