Skip to content

Commit

Permalink
Merge pull request #329 from onflow/nialexsan/move-about
Browse files Browse the repository at this point in the history
move about
  • Loading branch information
nialexsan authored Sep 19, 2023
2 parents 915b059 + 6490117 commit c5103d4
Show file tree
Hide file tree
Showing 28 changed files with 259 additions and 56 deletions.
2 changes: 1 addition & 1 deletion docs/build/building-vs-other-chains.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_custom_props:
icon: ↔️
---

This document summarizes the differences you might encounter between building on Flow vs. other blockchains, especially Ethereum. This will be most useful to developers who are already familiar with building on a blockchain system. Check out [Introduction to Flow](../overview/about/flow.md) for a more beginner-friendly overview of the Flow blockchain.
This document summarizes the differences you might encounter between building on Flow vs. other blockchains, especially Ethereum. This will be most useful to developers who are already familiar with building on a blockchain system. Check out [Introduction to Flow](../build/flow.md) for a more beginner-friendly overview of the Flow blockchain.

Summary of key differences covered:

Expand Down
10 changes: 5 additions & 5 deletions docs/overview/about/cadence.md → docs/build/cadence.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Introduction to Cadence
sidebar_position: 1
sidebar_label: Introduction
sidebar_position: 2
---

# Introduction to Cadence

In a blockchain environment like Flow, programs that are stored on-chain in accounts are commonly referred to as smart contracts.
A smart contract is a program that verifies and executes the performance of a contract without the need for a trusted third party.
Programs that run on blockchains are commonly referred to as smart contracts because they mediate important functionality (such as currency)
Expand Down Expand Up @@ -133,7 +133,7 @@ Developers using custom-made approaches such as the 'data separation' approach t
may run into problems with the complexity of data structures,
while developers using ‘delegatecall-based proxies` may run into problems with the consistency of memory layouts.
Either way, these challenges compromise approachability and overall extensibility.
Cadence has [contract upgradability built in by default](../../cadence/language/contract-updatability.md),
Cadence has [contract upgradability built in by default](../cadence/language/contract-updatability.md),
and contracts can be made immutable by removing all keys from an account.

Cadence improves the clarity and extensibility of programs by utilizing interfaces to allow extensibility, code reuse, and interoperability between contracts.
Expand Down Expand Up @@ -187,7 +187,7 @@ but using an interpreter for the first version allows us to refine the language
---

Now that you've learned about the goals and design of Cadence and Flow, you're ready to get started with the Flow emulator and tools!
Go to the [Getting Started](../../cadence/tutorial/01-first-steps.md) page to work through language fundamentals and tutorials.
Go to the [Getting Started](../cadence/tutorial/01-first-steps.md) page to work through language fundamentals and tutorials.

# why.md

Expand Down
2 changes: 1 addition & 1 deletion docs/build/core-contracts/flow-ft/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Flow is a new blockchain for open worlds. Read more about it [here](https://flow

Cadence is a new Resource-oriented programming language
for developing smart contracts for the Flow Blockchain.
Read more about it [here](../../../overview/about/cadence.md) and see its implementation [here](https://github.com/onflow/cadence)
Read more about it [here](../../../build/cadence.md) and see its implementation [here](https://github.com/onflow/cadence)

We recommend that anyone who is reading this should have already
completed the [Cadence Tutorials](../../../cadence/tutorial/01-first-steps.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/build/core-contracts/flow-nft/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contract on the [Flow blockchain](https://www.onflow.org/).

## What is Cadence?

[Cadence is the resource-oriented programming language](../../../overview/about/cadence.md)
[Cadence is the resource-oriented programming language](../../../build/cadence.md)
for developing smart contracts on Flow.

Before reading this standard,
Expand Down
11 changes: 5 additions & 6 deletions docs/overview/about/flow.md → docs/build/flow.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: About Flow
sidebar_position: 0
sidebar_position: 1
---

# Introduction to Flow
Expand All @@ -18,7 +17,7 @@ The following chapters summarize the content in this section. Read on more for d

## App Development

The [development guide](../../tutorials/intro.md) covers the Flow core concepts, including:
The [development guide](../tutorials/intro.md) covers the Flow core concepts, including:

- **App Client:** The app client is the interface through which users interact with your app. Web and mobile applications are typical examples of app clients.
- **Smart Contract:** A smart contract is a collection of code deployed to a permanent location on the blockchain that defines the core logic for a dApp.
Expand All @@ -30,7 +29,7 @@ The [development guide](../../tutorials/intro.md) covers the Flow core concepts,

## Core Contracts

The Flow blockchain implements core functionality using its own smart contract language, Cadence. The core functionality is split into a set of contracts, so-called [core contracts](../../build/core-contracts/index.md):
The Flow blockchain implements core functionality using its own smart contract language, Cadence. The core functionality is split into a set of contracts, so-called [core contracts](../build/core-contracts/index.md):

- **Fungible Token:** The FungibleToken contract implements the Fungible Token Standard. It is the second contract ever deployed on Flow.
- **Flow Token:** The FlowToken contract defines the FLOW network token.
Expand All @@ -41,7 +40,7 @@ The Flow blockchain implements core functionality using its own smart contract l

## FLOW Token

The [FLOW](../../build/core-contracts/03-flow-token.md) token is the native currency for the Flow network. Developers and users can use FLOW to transact on the network. Developers can integrate FLOW directly into their apps for peer-to-peer payments, service charges, or consumer rewards. FLOW can be held, transferred, or transacted peer-to-peer.
The [FLOW](../build/core-contracts/03-flow-token.md) token is the native currency for the Flow network. Developers and users can use FLOW to transact on the network. Developers can integrate FLOW directly into their apps for peer-to-peer payments, service charges, or consumer rewards. FLOW can be held, transferred, or transacted peer-to-peer.


## Technical Background
Expand All @@ -52,7 +51,7 @@ The [FLOW](../../build/core-contracts/03-flow-token.md) token is the native curr
## Tokenomics

- To understand more about Flow's Token Economics, and the **FLOW token**, you can read the [Flow Token Economics](https://www.onflow.org/flow-token-economics) guide.
- FLOW tokens are Flow's native Fungible Token. To learn more about how to work with them in your applications, go [here](../../build/core-contracts/03-flow-token.md)
- FLOW tokens are Flow's native Fungible Token. To learn more about how to work with them in your applications, go [here](../build/core-contracts/03-flow-token.md)

## More Concepts

Expand Down
2 changes: 1 addition & 1 deletion docs/build/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 0
title: Build on Flow
description: <TODO>
---
Expand Down
6 changes: 3 additions & 3 deletions docs/build/mobile/react-native-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sidebar_position: 3

FCL-JS is the easiest way to start building decentralized applications. FCL (aka Flow Client Library) wraps much of the logic you'd have to write yourself on other blockchains. Follow this quick start and you'll have a solid overview of how to build a shippable dapp on Flow.

We're going to make an assumption that you know or understand React; however, the concepts should be easy to understand and transfer to another framework. While this tutorial will make use of Cadence (Flow's smart contract language), you do not need to know it. Instead, we recommend later diving into [learning the Cadence language](../../overview/about/cadence.md) once you've gotten the core FCL concepts down.
We're going to make an assumption that you know or understand React; however, the concepts should be easy to understand and transfer to another framework. While this tutorial will make use of Cadence (Flow's smart contract language), you do not need to know it. Instead, we recommend later diving into [learning the Cadence language](../../build/cadence.md) once you've gotten the core FCL concepts down.

In this tutorial, we are going to interact with an existing smart contract on Flow's testnet known as the [Profile Contract](https://testnet.flowscan.org/contract/A.ba1132bc08f82fe2.Profile). Using this contract, we will create a new profile and edit the profile information, both via a wallet. In order to do this, the FCL concepts we'll cover are:

Expand Down Expand Up @@ -301,9 +301,9 @@ Go ahead and click the "Send Query" button. You should see "No Profile." That's
## Initializing the Account
For the Profile contract to store a Profile in a user's account, it does so by initializing what is called a "resource." A resource is an ownable piece of data and functionality that can live in the user's account storage. This paradigm is known is as "resource-oriented-programming", a principle that is core to Cadence and differentiates its ownership model from other smart contract languages, [read more here](../../overview/about/cadence.md#intuiting-ownership-with-resources). Cadence makes it so that resources can only exist in one place at any time, they must be deliberately created, cannot be copied, and if desired, must be deliberately destroyed.
For the Profile contract to store a Profile in a user's account, it does so by initializing what is called a "resource." A resource is an ownable piece of data and functionality that can live in the user's account storage. This paradigm is known is as "resource-oriented-programming", a principle that is core to Cadence and differentiates its ownership model from other smart contract languages, [read more here](../../build/cadence.md#intuiting-ownership-with-resources). Cadence makes it so that resources can only exist in one place at any time, they must be deliberately created, cannot be copied, and if desired, must be deliberately destroyed.
> There's a lot more to resources in Cadence than we'll cover in this guide, so if you'd like to know more, check out [this Cadence intro](../../overview/about/cadence.md).
> There's a lot more to resources in Cadence than we'll cover in this guide, so if you'd like to know more, check out [this Cadence intro](../../build/cadence.md).
To do this resource initialization on an account, we're going to add another function called `initAccount`. Inside of that function, we're going to add some Cadence code which says, *"Hey, does this account have a profile? If it doesn't, let's add one."* We do that using something called a "transaction." Transactions occur when you want to change the state of the blockchain, in this case, some data in a resource, in a specific account. And there is a cost (transaction fee) in order to do that; unlike a query.
Expand Down
2 changes: 1 addition & 1 deletion docs/build/run-and-secure/nodes/faq/developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can query historical data and fetch contract code using the SDKs.

Flow allows you to actively query the state of the blockchain using scripts written in the Cadence programming language. You can find out more about Cadence here:

[cadence](../../../../overview/about/cadence.md)
[cadence](../../../../build/cadence.md)

Running scripts and parsing their output is supported by the SDKs.

Expand Down
2 changes: 1 addition & 1 deletion docs/build/run-and-secure/nodes/faq/operators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You can query historical data and fetch contract code using the SDKs.

Flow allows you to actively query the state of the blockchain using scripts written in the Cadence programming language. You can find out more about Cadence here:

[cadence](../../../../overview/about/cadence.md)
[cadence](../../../../build/cadence.md)

Running scripts and parsing their output is supported by the SDKs.

Expand Down
Loading

1 comment on commit c5103d4

@vercel
Copy link

@vercel vercel bot commented on c5103d4 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.