Skip to content

Commit

Permalink
Merge pull request #48 from FuelLabs/bitzoic-fix-source-readme
Browse files Browse the repository at this point in the history
Add missing standards, organize standards, and update links in source README
  • Loading branch information
bitzoic authored Dec 28, 2023
2 parents 7492dd3 + 3132396 commit 77cdc14
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,26 @@ If you don't find what you're looking for, feel free to create an issue and prop
## Standards

- [SRC-20; Token Standard](./standards/src_20/) defines the implementation of a standard API for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets) using the Sway Language.
- [SRC-2; Inline Documentation](./standards/src_2/) defines how to document your Sway files.
- [SRC-3; Mint and Burn](./standards/src_3/) is used to enable mint and burn functionality for Native Assets.
- [SRC-5; Ownership Standard](./standards/src_5/) is used to restrict function calls to admin users in contracts.
- [SRC-7; Arbitrary Asset Metadata Standard](./standards/src_7/) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets).
- [SRC-9; Metadata Keys Standard](./standards/src_9/) is used to store standardized metadata keys for [Native Assets](https://fuellabs.github.io/sway/v0.44.0/book/blockchain-development/native_assets.html) in combination with the SRC-7 standard.
### Native Assets

- [SRC-20; Token Standard](./standards/src20-token/) defines the implementation of a standard API for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets) using the Sway Language.
- [SRC-3; Mint and Burn](./standards/src3-mint-burn/) is used to enable mint and burn functionality for Native Assets.
- [SRC-7; Arbitrary Asset Metadata Standard](./standards/src7-metadata/) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets).
- [SRC-9; Metadata Keys Standard](./standards/src9-metadata-keys/) is used to store standardized metadata keys for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets) in combination with the SRC-7 standard.
- [SRC-6; Vault Standard](./standards/src6-vault/) defines the implementation of a standard API for token vaults developed in Sway.

### Access Control

- [SRC-5; Ownership Standard](./standards/src5-ownership/) is used to restrict function calls to admin users in contracts.

### Bridge

- [SRC-8; Bridged Asset](./standards/src8-bridged-asset/) defines the metadata required for an asset bridged to the Fuel Network.

### Documentation

- [SRC-2; Inline Documentation](./standards/src2-inline-docs/) defines how to document your Sway files.


## Using a standard

Expand All @@ -57,7 +71,7 @@ use standard::<standard_abi>;
For example, to import the SRC-20 Token Standard use the following statements in your `Forc.toml` and Sway Smart Contract file respectively:

```rust
src20 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.0"}
src20 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.0" }
```

```rust
Expand Down Expand Up @@ -98,6 +112,20 @@ Example of the SRC-5 implementation where a contract does not have an owner set

Example of the SRC-5 implementation where a contract has an owner set at compile time.

#### SRC-6; Vault Standard Examples

##### [Multi Token Vault](./examples/src6-vault/multi_token_vault/)

A basic implementation of the vault standard that supports any number of sub vaults being created for every AssetId.

##### [Single Token Vault](./examples/src6-vault/single_token_vault/)

A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single AssetId.

##### [Single Token Single Sub Vault](./examples/src6-vault/single_token_single_sub_vault/)

A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single AssetId, and to a single Sub vault.

#### SRC-7; Arbitrary Asset Metadata Standard Examples

##### - [Single Native Asset](./examples/src7-metadata/single_asset/src/single_asset.sw)
Expand Down
6 changes: 3 additions & 3 deletions standards/src6-vault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ abi SRC6 {

## [Multi Token Vault](../../examples/src6-vault/multi_token_vault/)

A barebones implementation of the vault standard that supports any number of sub vaults being created for every AssetId.
A basic implementation of the vault standard that supports any number of sub vaults being created for every AssetId.

## [Single Token Vault](../../examples/src6-vault/single_token_vault/)

A barebones implemenation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId.
A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single AssetId.

## [Single Token Single Sub Vault](../../examples/src6-vault/single_token_single_sub_vault/)

A barebones implementation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId, and to a single Sub vault.
A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single AssetId, and to a single Sub vault.

0 comments on commit 77cdc14

Please sign in to comment.