Skip to content

Commit

Permalink
Merge pull request #103 from FuelLabs/sarah/docs
Browse files Browse the repository at this point in the history
docs: updates for docs-hub
  • Loading branch information
sarahschwartz authored Jun 5, 2024
2 parents 27c4f18 + 0360d56 commit 1e567c6
Show file tree
Hide file tree
Showing 44 changed files with 967 additions and 577 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Docs

on:
pull_request:

jobs:
test:
uses: FuelLabs/github-actions/.github/workflows/mdbook-docs.yml@master
with:
docs-src-path: 'docs/src'
spellcheck-config-path: 'docs/.spellcheck.yml'
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[package]
name = "sway-standards"
version = "0.5.0"
edition = "2021"
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".docs/sway-standards-logo-dark-theme.png">
<img alt="Sway Standards logo" width="400px" src=".docs/sway-standards-logo-light-theme.png">
<source media="(prefers-color-scheme: dark)" srcset="assets/sway-standards-logo-dark-theme.png">
<img alt="Sway Standards logo" width="400px" src="assets/sway-standards-logo-light-theme.png">
</picture>
</p>

Expand Down Expand Up @@ -35,35 +35,35 @@ If you don't find what you're looking for, feel free to create an issue and prop

### Native Assets

- [SRC-20; Native Asset Standard](./SRCs/src-20.md) 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](./SRCs/src-3.md) is used to enable mint and burn functionality for fungible assets.
- [SRC-7; Arbitrary Asset Metadata Standard](./SRCs/src-7.md) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets).
- [SRC-9; Metadata Keys Standard](./SRCs/src-9.md) 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](./SRCs/src-6.md) defines the implementation of a standard API for asset vaults developed in Sway.
- [SRC-20; Native Asset Standard](./docs/src/src-20-native-asset.md) 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](./docs/src/src-3-minting-and-burning.md) is used to enable mint and burn functionality for fungible assets.
- [SRC-7; Arbitrary Asset Metadata Standard](./docs/src/src-7-asset-metadata.md) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets).
- [SRC-9; Metadata Keys Standard](./docs/src/src-9-metadata-keys.md) 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](./docs/src/src-6-vault.md) defines the implementation of a standard API for asset vaults developed in Sway.

### Access Control

- [SRC-5; Ownership Standard](./SRCs/src-5.md) is used to restrict function calls to admin users in contracts.
- [SRC-5; Ownership Standard](./docs/src/src-5-ownership.md) is used to restrict function calls to admin users in contracts.

### Contracts

- [SRC-12; Contract Factory](./SRCs/src-12.md) defines the implementation of a standard API for contract factories.
- [SRC-14; Simple Upgradable Proxies](./SRCs/src-14.md) defines the implementation of a standard API for simple upgradable proxies.
- [SRC-12; Contract Factory](./docs/src/src-12-contract-factory.md) defines the implementation of a standard API for contract factories.
- [SRC-14; Simple Upgradable Proxies](./docs/src/src-14-simple-upgradeable-proxies.md) defines the implementation of a standard API for simple upgradable proxies.

### Bridge

- [SRC-8; Bridged Asset](./SRCs/src-8.md) defines the metadata required for an asset bridged to the Fuel Network.
- [SRC-10; Native Bridge Standard](./SRCs/src-10.md) defines the standard API for the Native Bridge between the Fuel Chain and the canonical base chain.
- [SRC-8; Bridged Asset](./docs/src/src-8-bridged-asset.md) defines the metadata required for an asset bridged to the Fuel Network.
- [SRC-10; Native Bridge Standard](./docs/src/src-10-native-bridge.md) defines the standard API for the Native Bridge between the Fuel Chain and the canonical base chain.

### Documentation

- [SRC-2; Inline Documentation](./SRCs/src-2.md) defines how to document your Sway files.
- [SRC-2; Inline Documentation](./docs/src/src-2-inline-documentation.md) defines how to document your Sway files.

## Using a standard

To import a standard the following should be added to the project's `Forc.toml` file under `[dependencies]` with the most recent release:

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

Expand All @@ -72,13 +72,13 @@ standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.5.0"
You may then import your desired standard in your Sway Smart Contract as so:

```rust
```sway
use standards::<standard>::<standard_abi>;
```

For example, to import the SRC-20 Native Asset Standard use the following statement in your Sway Smart Contract file:

```rust
```sway
use standards::src20::SRC20;
```

Expand Down
Binary file removed SRCs/.docs/src-10-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-10-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-11-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-11-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-12-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-12-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-13-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-13-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-2-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-2-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-20-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-20-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-5-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-5-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-6-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-6-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-7-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-7-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-8-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-8-logo-light-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-9-logo-dark-theme.png
Binary file not shown.
Binary file removed SRCs/.docs/src-9-logo-light-theme.png
Binary file not shown.
File renamed without changes
File renamed without changes
28 changes: 28 additions & 0 deletions docs/.spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
matrix:
- name: SPCheck
aspell:
lang: en
dictionary:
encoding: utf-8
wordlists:
- docs/spell-check-custom-words.txt
pipeline:
- pyspelling.filters.context:
context_visible_first: true
escapes: \\[\\`~]
delimiters:
# Ignore all code blocks
- open: '(?s)^(?P<open> *`{3,}\s*(\w+\s*,?\s*)+.*?)$'
close: '^( *`{3,})$'
- pyspelling.filters.markdown:
markdown_extensions:
- pymdownx.superfences:
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
sources:
- 'docs/src/*.md'
- 'docs/src/**/*.md'
default_encoding: utf-8
263 changes: 263 additions & 0 deletions docs/spell-check-custom-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
ABI
ABIs
ASM
IDE
IDEs
LSP
namespace
ALU
APIs
JSON
BrowserStack
CLI
Deserialization
deserializing
DApp
intrinsics
Intrinsics
workspace
workspaces
Workspaces
neovim
EVM
EVM's
EOA
ERC
Ethereum
Ethereum's
FVM
FuelVM
Fuelup
Github
GraphQL
Infura
JSON
LSP
Merkle
PoA
PoS
PoW
RPC
SDK
SDK's
SDKs
SauceLabs
Sepolia
Structs
Sway
TAI
TODO
TypeScript
UTF
UTXO
UTXOs
Utils
VM
VSCode
OSS
Linux
abigen
args
async
backend
backtraces
blockchain
blockchain's
breakpoint
breakpoints
bytecode
codespace
codespaces
config
cryptographic
customizable
customizations
dapp
dev
dropdown
enum
enums
env
forc
frontend
fuelup
fullstack
graphQL
graphql
http
https
halfword
js
localhost
mainnet
mempool
merkle
monorepo
monorepos
natively
npm
nvm
onboarding
params
pnpm
prerelease
queryable
quickstart
relayer
relayers
repo
repos
runnable
stateful
struct
structs
struct's
testnet
testnets
toolchain
toolchains
urql
validator
validators
superABI
superABIs
SuperABIs
supertraits
compositional
typeclass
turbofish
DSL
TOML
IPFS
Bitwise
Bitwise
runtime
runtimes
formatter
deployable
Utils
ETH
initializer
initializers
destructuring
instantiation
VMs
superset
CEI
pre
entrancy
interoperable
blockchains
keccak
SHA
UI
backtrace
Collateralized
collateralized
submodule
DEX
TypeChain
inlines
inlining
MiB
FuelVM's
deterministically
CLI
VS
GraphViz
DOT
DCA
AST
GitHub
decrypt
subcommand
subcommands
Subcommands
supertrait
supertraits
Supertraits
incrementor
monomorphization
Booleans
boolean
Orchestrator
orchestrator
growable
arity
tuple's
unary
SRC
DEX
SubId
upgradeable
Upgradeable
transpiler
Pausable
Libs
Reentrancy
reentrancy
mathematic
Soulbound
NFTs
NFT
dApps
fungible
TicTacToe
DAO
Timelock
transpiler
namespacing
unsafety
prioritizations
polymorphism
ContractId
ENS's
OpenSea's
URI
URIs
Multi
sha
EIP
rata
withdrawable
subvault
soulbound
configurables
Configurables
libs
backticks
enum's
NFT's
OpenZeppelin
OpenZeppelin's
UUPS
minimalistic
permissioning
Permissioning
Solana
hardcode
prepended
Farcaster
LinkedIn
Reddit
TikTok
WeChat
WhatsApp
UPU
webpage
linktree
SVG
PNG
URI
URIs
WebP
HEIF
WebM
OGV
OGG
WAV
OGA
glTF
GLB
Uninitalized
upgradeability
Loading

0 comments on commit 1e567c6

Please sign in to comment.