Skip to content

Commit

Permalink
Fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
bitzoic committed Apr 4, 2024
1 parent 0bc640f commit 544fd85
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/book/src/admin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For implementation details on the Admin Library please see the [Sway Libs Docs](

## Importing the Admin Library

In order to use the Admin Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md).
In order to use the Admin Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md).

To import the Admin Library, be sure to include both the Admin and Ownership Libraries in your import statements.

Expand Down
4 changes: 3 additions & 1 deletion docs/book/src/asset/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ For implementation details on the Asset Library base functionality please see th

## Importing the Asset Library Base Functionality

In order to use the Asset Library, Sway Libs and [Sway Standards](https://github.com/FuelLabs/sway-standards) must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md). To add Sway Standards as a dependency please see the [Sway Standards Book](https://github.com/FuelLabs/sway-standards).

To import the Asset Library Base Functionality and [SRC-20](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-20.md) Standard to your Sway Smart Contract, add the following to your Sway file:

```sway
Expand Down Expand Up @@ -131,7 +133,7 @@ impl SRC20 for Contract {

## Setting an Asset's SRC-20 Attributes

To set some the asset attributes for an Asset, use the `SetAssetAttributes` ABI provided by the Asset Library. The example below shows the implementation of the `SetAssetAttributes` ABI with no user defined restrictions or custom functionality. It is recommended that the [Ownership Library](../../access_security/ownership/) is used in conjunction with the `SetAssetAttributes` ABI to ensure only a single user has permissions to set an Asset's attributes.
To set some the asset attributes for an Asset, use the `SetAssetAttributes` ABI provided by the Asset Library. The example below shows the implementation of the `SetAssetAttributes` ABI with no user defined restrictions or custom functionality. It is recommended that the [Ownership Library](../ownership/index.md) is used in conjunction with the `SetAssetAttributes` ABI to ensure only a single user has permissions to set an Asset's attributes.

```sway
use sway_libs::asset::base::*;
Expand Down
4 changes: 3 additions & 1 deletion docs/book/src/asset/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ For implementation details on the Asset Library metadata functionality please se

## Importing the Asset Library Metadata Functionality

In order to use the Asset Library, Sway Libs and [Sway Standards](https://github.com/FuelLabs/sway-standards) must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md). To add Sway Standards as a dependency please see the [Sway Standards Book](https://github.com/FuelLabs/sway-standards).

To import the Asset Library Base Functionality and [SRC-7](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-7.md) Standard to your Sway Smart Contract, add the following to your Sway file:

```sway
Expand Down Expand Up @@ -51,7 +53,7 @@ storage {

### Setting Metadata

To set some metadata for an Asset, use the `SetAssetMetadata` ABI provided by the Asset Library. Be sure to follow the [SRC-9](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-9.md) standard for your `key`. It is recommended that the [Ownership Library](../../access_security/ownership/) is used in conjunction with the `SetAssetMetadata` ABI to ensure only a single user has permissions to set an Asset's metadata.
To set some metadata for an Asset, use the `SetAssetMetadata` ABI provided by the Asset Library. Be sure to follow the [SRC-9](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-9.md) standard for your `key`. It is recommended that the [Ownership Library](../ownership/index.md) is used in conjunction with the `SetAssetMetadata` ABI to ensure only a single user has permissions to set an Asset's metadata.

```sway
use sway_libs::asset::metadata::*;
Expand Down
4 changes: 3 additions & 1 deletion docs/book/src/asset/supply.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ For implementation details on the Asset Library supply functionality please see

## Importing the Asset Library Supply Functionality

In order to use the Asset Library, Sway Libs and [Sway Standards](https://github.com/FuelLabs/sway-standards) must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md). To add Sway Standards as a dependency please see the [Sway Standards Book](https://github.com/FuelLabs/sway-standards).

To import the Asset Library Supply Functionality and [SRC-3](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-3.md) Standard to your Sway Smart Contract, add the following to your Sway file:

```sway
Expand Down Expand Up @@ -44,7 +46,7 @@ storage {

## Implementing the SRC-3 Standard with the Asset Library

To use a base function, simply pass the `StorageKey` from the prescribed storage block. The example below shows the implementation of the [SRC-3](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-3.md) standard in combination with the Asset Library with no user defined restrictions or custom functionality. It is recommended that the [Ownership Library](../../access_security/ownership/) is used in conjunction with the Asset Library;s supply functionality to ensure only a single user has permissions to mint an Asset.
To use a base function, simply pass the `StorageKey` from the prescribed storage block. The example below shows the implementation of the [SRC-3](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-3.md) standard in combination with the Asset Library with no user defined restrictions or custom functionality. It is recommended that the [Ownership Library](../ownership/index.md) is used in conjunction with the Asset Library;s supply functionality to ensure only a single user has permissions to mint an Asset.

```sway
use sway_libs::asset::supply::{_mint, _burn};
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/bytecode/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For implementation details on the Bytecode Library please see the [Sway Libs Doc

## Importing the Bytecode Library

In order to use the Bytecode Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md).
In order to use the Bytecode Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md).

To import the Bytecode Library to your Sway Smart Contract, add the following to your Sway file:

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/fixed_point/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For implementation details on the Fixed Point Number Library please see the [Swa

## Importing the Fixed Point Number Library

In order to use the Fixed Point Number Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md).
In order to use the Fixed Point Number Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md).

To import the Fixed Point Number Library to your Sway Smart Contract, add the following to your Sway file:

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ impl Pausable for Contract {
}
```

Any instructions related to using a specific library should be found within the [libraries](../libraries/index.md) section of the Sway Libs Book.
Any instructions related to using a specific library should be found within the [libraries](../libraries.md) section of the Sway Libs Book.

For implementation details on the libraries please see the [Sway Libs Docs](https://fuellabs.github.io/sway-libs/master/sway_libs/).
12 changes: 6 additions & 6 deletions docs/book/src/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ There are several types of libraries that Sway Libs encompases. These include li

For implementation details on the libraries please see the [Sway Libs Docs](https://fuellabs.github.io/sway-libs/master/sway_libs/).

## [Assets Libraries](./asset_libraries.md)
## Assets Libraries

Asset Libraries are any libraries that use [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets) on the Fuel Network.

### [Asset Library](./asset/index.md)

The [Asset](./asset/asset/index.md) Library provides helper functions for the [SRC-20](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-20.md), [SRC-3](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-3.md), and [SRC-7](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-7.md) standards.
The [Asset](./asset/index.md) Library provides helper functions for the [SRC-20](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-20.md), [SRC-3](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-3.md), and [SRC-7](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-7.md) standards.

## [Access Control and Security Libraries](./access_security_libraries.md)
## Access Control and Security Libraries

Access Control and Security Libraries are any libraries that are built and intended to provide additional safety when developing smart contracts.

Expand All @@ -32,7 +32,7 @@ The [Pausable](./pausable/index.md) Library allows contracts to implement an eme

The [Reentrancy Guard](./reentrancy/index.md) Library is used to detect and prevent reentrancy attacks.

## [Cryptography Libraries](./cryptography_libraries.md)
## Cryptography Libraries

Cryptography Libraries are any libraries that provided cryptographic functionality beyond what the std-lib provides.

Expand All @@ -44,7 +44,7 @@ The [Bytecode](./bytecode/index.md) Library is used for on-chain verification an

The [Merkle Proof](./merkle/index.md) Library is used to verify Binary Merkle Trees computed off-chain.

## [Math Libraries](./math_libraries.md)
## Math Libraries

Math Libraries are libraries which provide mathematic functions or number types that are outside of the std-lib's scope.

Expand All @@ -56,7 +56,7 @@ The [Fixed Point Number](./fixed_point/index.md) Library is an interface to impl

The [Signed Integers](./signed_integers/index.md) Library is an interface to implement signed integers.

## [Data Structures Libraries](./data_structures_libraries.md)
## Data Structures Libraries

Data Structure Libraries are libraries which provide complex data structures which unlock additional functionality for Smart Contracts.

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/merkle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For implementation details on the Merkle Library please see the [Sway Libs Docs]

## Importing the Merkle Library

In order to use the Merkle Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md).
In order to use the Merkle Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md).

To import the Merkle Library to your Sway Smart Contract, add the following to your Sway file:

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/ownership/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For implementation details on the Ownership Library please see the [Sway Libs Do

## Importing the Ownership Library

In order to use the Ownership library, Sway Libs and [Sway Standards](https://github.com/FuelLabs/sway-standards) must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md). To add Sway Standards as a dependency please see the [Sway Standards Book](https://fuellabs.github.io/sway-libs/master/sway_libs/ownership/index.html).
In order to use the Ownership library, Sway Libs and [Sway Standards](https://github.com/FuelLabs/sway-standards) must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md). To add Sway Standards as a dependency please see the [Sway Standards Book](https://github.com/FuelLabs/sway-standards).

To import the Ownership Library and [SRC-5](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-5.md) Standard to your Sway Smart Contract, add the following to your Sway file:

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/pausable/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For implementation details on the Pausable Library please see the [Sway Libs Doc

## Importing the Pausable Library

In order to use the Pausable library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md).
In order to use the Pausable library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md).

To import the Pausable Library to your Sway Smart Contract, add the following to your Sway file:

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/queue/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For implementation details on the Queue Library please see the [Sway Libs Docs](

## Importing the Queue Library

In order to use the Queue Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md).
In order to use the Queue Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md).

To import the Queue Library to your Sway Smart Contract, add the following to your Sway file:

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/reentrancy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ While this can protect against both single-function reentrancy and cross-functio

## Importing the Reentrancy Guard Library

In order to use the Reentrancy Guard library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md).
In order to use the Reentrancy Guard library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md).

To import the Reentrancy Guard Library to your Sway Smart Contract, add the following to your Sway file:

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/signed_integers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For implementation details on the Signed Integers Library please see the [Sway L

## Importing the Signed Integer Library

In order to use the Signed Integer Number Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../../../getting_started/index.md).
In order to use the Signed Integer Number Library, Sway Libs must be added to the `Forc.toml` file and then imported into your Sway project. To add Sway Libs as a dependency to the `Forc.toml` file in your project please see the [Getting Started](../getting_started/index.md).

To import the Signed Integer Number Library to your Sway Smart Contract, add the following to your Sway file:

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Summary

- [Welcome](./welcome.md)
- [Welcome](./index.md)
- [GitHub Issues](./issues/index.md)
- [Searching for Issues](./issues/search.md.md)
- [Searching for Issues](./issues/search.md)
- [Filtering by label](./issues/filtering.md)
- [Checking for available issues](./issues/assignment.md)
- [Issue summary](./issues/summary.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing-book/src/documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In the following sections we will take a look at how to document the:

- [Read me](read-me.md)
- The first document a user will see which includes content such as installation instructions
- [Code](./code.md)
- [Code](../code_docs/index.md)
- Documenting the code itself such that contributors know how to interact with it
- [Specification](specification.md)
- [Specification](../code_docs/specification.md)
- Presenting technical (or non-technical) information about your project
2 changes: 1 addition & 1 deletion docs/contributing-book/src/issues/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You can see the activity of an issue by looking at the number of comments. This doesn't really tell you much aside from that there is a discussion about what should be done.

![Filtering issues by an app label image](../images/app-filter-comments.pngs)
![Filtering issues by an app label image](../images/app-filter-comments.png)

Clicking on the issue near the bottom `Sum Merkle Proof Verification` we can see some information about the library with some information on what the library intends to implement and why it is needed.

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing-book/src/library-quality/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ In the following sections we will take a look at:
- The file structure and how easily a library may be navigated
- [Code Structure](code-structure.md)
- How to structure the code inside a file
- [Documentation](documentation/index.md)
- [Documentation](../documentation/index.md)
- How to present information about your library
- [Testing](testing.md)
- [Testing](../testing/index.md)
- The file structure and tips for testing

If the library is well structured, tested and documented then the developer experience will be good.
2 changes: 1 addition & 1 deletion docs/contributing-book/src/testing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The `harness` file is the entry point for the tests, and thus it contains the `f

Here are some tips on how to approach testing:

- Similar to [code structure](code-structure.md) content, each file should be ordered alphabetically, with one exception, so that it's easy to navigate
- Similar to [code structure](../library-quality/code-structure.md) content, each file should be ordered alphabetically, with one exception, so that it's easy to navigate
- Test conditions in the order in which they may occur
- If a test has multiple assertions then the first assertion should be tested first, second assertion second etc.
- Check the code coverage
Expand Down

0 comments on commit 544fd85

Please sign in to comment.