Skip to content

Commit

Permalink
Merge pull request #378 from onflow/nialexsan/remark-check-links
Browse files Browse the repository at this point in the history
check links with remark #377
  • Loading branch information
nialexsan authored Nov 7, 2023
2 parents 5ddeb4a + 12b7771 commit 071b540
Show file tree
Hide file tree
Showing 20 changed files with 749 additions and 346 deletions.
2 changes: 1 addition & 1 deletion docs/build/basics/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This decoupling is a unique advantage of Flow, allowing for multiple public keys

**Balance**

Each Flow account created on Mainnet will by default [hold a Flow vault that holds a balance and is part of the FungibleToken standard](./flow-token). This balance is used to pay for [transaction fees and storage fees](./fees.md). More on that in the fees document.
Each Flow account created on Mainnet will by default [hold a Flow vault that holds a balance and is part of the FungibleToken standard](./flow-token.md). This balance is used to pay for [transaction fees and storage fees](./fees.md). More on that in the fees document.

<Callout type="warning">
The minimum amount of FLOW an account can have is **0.001**.
Expand Down
2 changes: 1 addition & 1 deletion docs/cadence/security-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Some practices listed below might overlap with advice in the [Cadence Anti-Patte

## References

[References](./language/references) are ephemeral values and cannot be stored. If persistence is required, store a capability and borrow it when needed.
[References](./language/references.mdx) are ephemeral values and cannot be stored. If persistence is required, store a capability and borrow it when needed.

When exposing functionality, provide the least access necessary. When creating an authorized reference,
create it with only the minimal set of entitlements required to achieve the desired functionality.
Expand Down
10 changes: 5 additions & 5 deletions docs/cadence/tutorial/02-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ All state that persists permanently is stored in [accounts](../language/accounts
and all accounts have the same core functionality. (users, smart contracts, data storage)

The interfaces to this state (the ways to interact with it, otherwise known as methods or functions) are also stored in accounts.
All code execution takes place within [transactions](../language/transactions),
All code execution takes place within [transactions](../language/transactions.md),
which are blocks of code that are authorized and submitted by external users
to interact with the persistent state, which includes directly modifying account storage.

Expand Down Expand Up @@ -170,10 +170,10 @@ can be changed later on instead of remaining constant like with `let`.

You can use `access(all)` and the `access(all)` keyword interchangeably.
They are both examples of an access control specification that means an interface can be accessed in all scopes, but not written to in all scopes.
For more information about the different levels of access control permitted in Cadence, refer to the [Access Control section of the language reference](../language/access-control).
For more information about the different levels of access control permitted in Cadence, refer to the [Access Control section of the language reference](../language/access-control.md).

The `init()` section is called the initializer. It is a special function that only runs when the contract is first created.
Objects similar to contracts, such as other [composite types like structs or resources](../language/composite-types),
Objects similar to contracts, such as other [composite types like structs or resources](../language/composite-types.mdx),
require that the initializer initializes all fields that are declared in a composite type.
In the above example, the initializer sets the `greeting` field to `"Hello, World!"` when the contract is initialized.

Expand Down Expand Up @@ -246,7 +246,7 @@ button next to the contracts section in the playground.

---

A [Transaction](../language/transactions) in Flow is defined as an arbitrary-sized block of Cadence code that is authorized by one or more accounts.
A [Transaction](../language/transactions.md) in Flow is defined as an arbitrary-sized block of Cadence code that is authorized by one or more accounts.
When an account authorizes a transaction, the code in that transaction has access to the authorizers' private storage.
An account authorizes a transaction by performing a cryptographic signature on the transaction with the account's private key,
which should only be accessible to the account owner. Therefore, authorizers are also known as signers.
Expand Down Expand Up @@ -329,5 +329,5 @@ Now that you have completed the tutorial, you have the basic knowledge to write
- Sign the transaction with one or multiple signers

Feel free to modify the smart contract to implement different functions,
experiment with the available [Cadence types](../language/values-and-types),
experiment with the available [Cadence types](../language/values-and-types.mdx),
and write new transactions that execute multiple functions from your `HelloWorld` smart contract.
14 changes: 7 additions & 7 deletions docs/cadence/tutorial/03-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ This tutorial builds on the previous `Hello World` tutorial.
Before beginning this tutorial, you should understand :

- [Accounts](../language/accounts)
- [Transactions](../language/transactions)
- [Transactions](../language/transactions.md)
- Signers
- [Field types](../language/composite-types)
- [Field types](../language/composite-types.mdx)

This tutorial will build on your understanding of accounts and how to interact with them by introducing resources.
Resources are one of Cadence's defining features.
Expand Down Expand Up @@ -208,7 +208,7 @@ The `@` symbol specifies that it is a resource of the type `HelloAsset`, which w
This function uses the move operator to create a resource of type `HelloAsset` and return it.
To create a new resource object, we use the `create` keyword

Here we use the `<-` symbol. [This is the move operator](../language/resources#the-move-operator--).
Here we use the `<-` symbol. [This is the move operator](../language/resources.mdx#the-move-operator--).
The move operator `<-` replaces the assignment operator `=` in assignments that involve resources.
To make the assignment of resources explicit, the move operator `<-` must be used when:

Expand Down Expand Up @@ -468,7 +468,7 @@ let helloResource <- acct.storage.load<@HelloWorld.HelloAsset>(from: /storage/He
```

If no object of the specified type is stored under the given path, the function returns nothing, or `nil`.
(This is an [Optional](../language/values-and-types#optionals),
(This is an [Optional](../language/values-and-types.mdx#optionals),
a special type of data that we will cover later)

If the object at the given path is not of the specified type, Cadence will throw an error and the transaction will fail.
Expand All @@ -489,7 +489,7 @@ Next, we call the `hello()` function and log the output.
log(helloResource?.hello())
```

We use `?` because the values in the storage are returned as [optionals](../language/values-and-types#optionals).
We use `?` because the values in the storage are returned as [optionals](../language/values-and-types.mdx#optionals).
Optionals are values that are able to represent either the presence or the absence of a value.
Optionals have two cases: either there is a value of the specified type, or there is nothing (`nil`).
An optional type is declared using the `?` suffix.
Expand Down Expand Up @@ -522,7 +522,7 @@ and aborts the entire transaction if the object is `nil`.
It is a more risky way of dealing with optionals, but if your program is ever in a state where a value being `nil`
would defeat the purpose of the whole transaction, then the force-unwrap operator might be a good choice to deal with that.

Refer to [Optionals In Cadence](../language/values-and-types#optionals) to learn more about optionals and how they are used.
Refer to [Optionals In Cadence](../language/values-and-types.mdx#optionals) to learn more about optionals and how they are used.

<Callout type="info">

Expand Down Expand Up @@ -562,7 +562,7 @@ Now that you have completed the tutorial, you have the basic knowledge to write
Feel free to modify the smart contract to create different resources,
experiment with the available [account storage API](../language/accounts/storage.mdx),
and write new transactions and scripts that execute different functions from your smart contract.
Have a look at the [resource reference page](../language/resources)
Have a look at the [resource reference page](../language/resources.mdx)
to find out more about what you can do with resources.

You're on the right track to building more complex applications with Cadence,
Expand Down
4 changes: 2 additions & 2 deletions docs/cadence/tutorial/04-capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ stored in their accounts. (Explained more below)

In this transaction, you create a new capability,
then use the `link` function to create a public link to your `HelloAsset` resource object.
Next you use that link to borrow a [reference](../language/references)
Next you use that link to borrow a [reference](../language/references.mdx)
to the underlying object and call the `hello()` function.
A detailed explanation of what is happening in this transaction
is below the transaction code so, if you feel lost, keep reading!
Expand Down Expand Up @@ -279,7 +279,7 @@ let helloReference = capability.borrow()

This method creates the reference as the type we specified in `<>` in the `link` function.
While borrowing the reference, we use
[optional chaining](../language/composite-types#accessing-fields-and-functions-of-composite-types-using-optional-chaining)
[optional chaining](../language/composite-types.mdx#accessing-fields-and-functions-of-composite-types-using-optional-chaining)
because the borrowing of the reference could fail.
The reference could be `nil` if the targeted storage slot is empty, is already borrowed,
or if the requested type exceeds what is allowed by the capability.
Expand Down
4 changes: 2 additions & 2 deletions docs/cadence/tutorial/05-non-fungible-tokens-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ Possible examples of NFTs include:
CryptoKitties, Top Shot Moments, and tickets to a really fun concert.

Instead of being represented in a central ledger, like in most smart contract languages,
Cadence represents each NFT as a [resource object](../language/composite-types)
Cadence represents each NFT as a [resource object](../language/composite-types.mdx)
that users store in their accounts.
This allows NFTs to benefit from the resource ownership rules
that are enforced by the [type system](../language/values-and-types) -
that are enforced by the [type system](../language/values-and-types.mdx) -
resources can only have a single owner, they cannot be duplicated,
and they cannot be lost due to accidental or malicious programming errors.
These protections ensure that owners know that their NFT is safe and can represent an asset that has real value.
Expand Down
4 changes: 2 additions & 2 deletions docs/cadence/tutorial/05-non-fungible-tokens-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ account.storage.save(<-myNFTs, to: /storage/basicNFTDictionary)

## Dictionaries

This example uses a [**Dictionary**: a mutable, unordered collection of key-value associations](../language/values-and-types#dictionaries).
This example uses a [**Dictionary**: a mutable, unordered collection of key-value associations](../language/values-and-types.mdx#dictionaries).

```cadence
// Keys are `Int`
Expand Down Expand Up @@ -324,7 +324,7 @@ access(all) fun getIDs(): [UInt64] {
```

This can be used to iterate through the dictionary or just to see a list of what is stored.
As you can see, [a variable length array type](../language/values-and-types#arrays)
As you can see, [a variable length array type](../language/values-and-types.mdx#arrays)
is declared by enclosing the member type within square brackets (`[UInt64]`).

## Resources Owning Resources
Expand Down
10 changes: 5 additions & 5 deletions docs/cadence/tutorial/08-marketplace-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ and use them as building blocks for new applications.

Flow is designed to enable composability because of the way that interfaces, resources and capabilities are designed.

- [Interfaces](../language/interfaces) allow projects to support any generic type as long as it supports a standard set of functionality specified by an interface.
- [Resources](../language/resources) can be passed around and owned by accounts, contracts or even other resources, unlocking different use cases depending on where the resource is stored.
- [Interfaces](../language/interfaces.mdx) allow projects to support any generic type as long as it supports a standard set of functionality specified by an interface.
- [Resources](../language/resources.mdx) can be passed around and owned by accounts, contracts or even other resources, unlocking different use cases depending on where the resource is stored.
- [Capabilities](../language/capabilities.md) allow exposing user-defined sets of functionality through special objects that enforce strict security with Cadence's type system.

The combination of these allows developers to do more with less, re-using known safe code and design patterns
Expand Down Expand Up @@ -390,15 +390,15 @@ This contract has a few new features and concepts that are important to cover:

### Events

[Events](../language/events) are special values that can be emitted during the execution of a program.
[Events](../language/events.md) are special values that can be emitted during the execution of a program.
They usually contain information to indicate that some important action has happened in a smart contract,
such as an NFT transfer, a permission change, or many other different things.
Off-chain applications can monitor events using a Flow SDK to know what is happening on-chain without having to query a smart contract directly.

Many applications want to maintain an off-chain record of what is happening on-chain so they can have faster performance
when getting information about their users' accounts or generating analytics.

Events are declared by indicating [the access level](../language/access-control), `event`,
Events are declared by indicating [the access level](../language/access-control.md), `event`,
and the name and parameters of the event, like a function declaration:
```cadence
access(all) event ForSale(id: UInt64, price: UFix64, owner: Address?)
Expand Down Expand Up @@ -434,7 +434,7 @@ acct.link<&ExampleToken.Vault{ExampleToken.Receiver, ExampleToken.Balance}>
(/public/CadenceFungibleTokenTutorialReceiver, target: /storage/CadenceFungibleTokenTutorialVault)
```

Then, users can get that capability if it was created [in a public path](../language/accounts/paths),
Then, users can get that capability if it was created [in a public path](../language/accounts/paths.mdx),
borrow it, and access the functionality that the owner specified.

```cadence
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/flow-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To install a specific version of Flow CLI newer than v0.42.0, append the version
sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v0.44.0
```

To install a version older than v0.42.0, refer to [Installing versions before 0.42.0](#installing-versions-before-0420) below.
To install a version older than v0.42.0, refer to [Installing versions before 0.42.0](../tools/flow-cli/install.md#installing-versions-before-0420) below.

## Windows

Expand Down
Loading

1 comment on commit 071b540

@vercel
Copy link

@vercel vercel bot commented on 071b540 Nov 7, 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.