Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
SEO in fundamentals & concepts (#548)
Browse files Browse the repository at this point in the history
* SEO in fundamentals & concepts

* formatting
  • Loading branch information
briwylde08 authored Aug 16, 2023
1 parent 448f6ca commit b6334e4
Show file tree
Hide file tree
Showing 17 changed files with 298 additions and 13 deletions.
16 changes: 15 additions & 1 deletion docs/fundamentals-and-concepts/authorization.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
---
sidebar_position: 4
title: Authorization
description: An overview of the Soroban authorization framework.
description: Smart contract authorization.
---

<head>
<title>Smart contract authorization</title>
<meta charSet="utf-8" />
<meta property="og:title" content="Smart contract authorization" />
<meta
property="og:description"
content="Learn about Soroban’s authorization framework, smart contract-specific authorization, account abstraction, and other authorization concepts in blockchain."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/authorization"
/>
</head>

:::info

This is an overview of the Soroban authorization framework.
Expand Down
19 changes: 18 additions & 1 deletion docs/fundamentals-and-concepts/built-in-types.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
---
sidebar_position: 5
title: Built-In Types
description: A description of built-in types used as contract inputs and outputs.
description: Built-in types used as smart contract inputs and outputs.
---

<head>
<title>Built-in types used as smart contract inputs and outputs.</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="Built-in types used as smart contract inputs and outputs."
/>
<meta
property="og:description"
content="Learn about the built-in types that are available in Soroban smart contracts, including primitive types, symbols, bytes, strings, vecs, maps, and addresses."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/built-in-types"
/>
</head>

Built-in types are available to all contracts for use as contract function
inputs and outputs, and are defined by the [environment] and the [Rust SDK].

Expand Down
21 changes: 20 additions & 1 deletion docs/fundamentals-and-concepts/contract-lifecycle.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
---
sidebar_position: 6
title: Contract Lifecycle
description: The workflow of developing, deploying, and maintaining Soroban contracts.
description: The process of developing, deploying, and maintaining smart contracts.
---

<head>
<title>
The process of developing, deploying, and maintaining smart contracts.
</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="The process of developing, deploying, and maintaining smart contracts."
/>
<meta
property="og:description"
content="Learn about how smart contracts work from development to deployment to execution and then how to monitor and upgrade them."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/contract-lifecycle"
/>
</head>

## Development

Contract development can be done on a local computer with as little as 3 necessary components: an IDE, a copy of the Rust toolchain, and a copy of the Soroban SDK.
Expand Down
17 changes: 17 additions & 0 deletions docs/fundamentals-and-concepts/custom-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ title: Custom Types
description: Struct, union, and enum types defined by contracts.
---

<head>
<title>Struct, union, and enum types defined by contracts.</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="Struct, union, and enum types defined by contracts."
/>
<meta
property="og:description"
content="View the struct, union, and enum types that are usable as contract inputs, contract outputs, or for storage."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/custom-types"
/>
</head>

import stack from "../../static/img/stack.png";

Custom types are struct, union, and enum types defined by contracts. They are
Expand Down
19 changes: 18 additions & 1 deletion docs/fundamentals-and-concepts/debugging.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
---
sidebar_position: 9
title: Debugging
description: How to debug Soroban contracts natively and as Wasm.
description: Debug smart contracts natively and as WASM.
---

<head>
<title>Debug smart contracts natively and as WASM.</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="Debug smart contracts natively and as WASM."
/>
<meta
property="og:description"
content="Compile smart contracts natively for local testing or into WASM for deployment in order to debug."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/debugging"
/>
</head>

Soroban contracts are as much as possible regular Rust programs and can be debugged using the same tools you'd usually use.

The debugging facilities available differ significantly depending on whether a contract is compiled natively for local testing, or compiled into Wasm for deployment.
Expand Down
22 changes: 21 additions & 1 deletion docs/fundamentals-and-concepts/environment-concepts.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
---
sidebar_position: 10
title: Environment Concepts
description: The interface that defines objects, functions, and data available to contracts.
description: The interface that defines objects, functions, and data available to smart contracts.
---

<head>
<title>
The interface that defines objects, functions, and data available to smart
contracts.
</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="The interface that defines objects, functions, and data available to smart contracts."
/>
<meta
property="og:description"
content="Learn about the interface environment that defines the objects, functions, data sources, and more that are available in smart contracts."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/environment-concepts"
/>
</head>

The contract environment is an _interface_ that defines the facilities -- objects, functions, data sources, etc. -- available to contracts.

## Host and Guest
Expand Down
16 changes: 15 additions & 1 deletion docs/fundamentals-and-concepts/errors.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
---
sidebar_position: 11
title: Errors
description: Generating errors from contracts.
description: Generating errors from smart contracts.
---

<head>
<title>Generating errors from smart contracts.</title>
<meta charSet="utf-8" />
<meta property="og:title" content="Generating errors from smart contracts." />
<meta
property="og:description"
content="Generating errors from smart contracts."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/errors"
/>
</head>

There are a number of ways to generate errors in contracts.

One way is error enum types, that are defined by contracts and that map errors
Expand Down
19 changes: 18 additions & 1 deletion docs/fundamentals-and-concepts/events.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
---
sidebar_position: 12
title: Events
description: The mechanism that off-chain applications use to monitor contract changes.
description: Monitor off-chain smart contract changes.
---

<head>
<title>Monitor off-chain smart contract changes.</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="Monitor off-chain smart contract changes."
/>
<meta
property="og:description"
content="Learn about the mechanism that off-chain applications can use to monitor changes and events in smart contracts that are on-chain."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/events"
/>
</head>

Events are the mechanism that applications off-chain can use to monitor changes and events in contracts on-chain.

## How are events emitted?
Expand Down
17 changes: 17 additions & 0 deletions docs/fundamentals-and-concepts/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ title: Soroban on Stellar FAQs
description: Frequently asked questions about Soroban on Stellar.
---

<head>
<title>Frequently asked questions about Soroban on Stellar.</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="Frequently asked questions about Soroban on Stellar."
/>
<meta
property="og:description"
content="Frequently asked questions about Soroban on Stellar."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/faq"
/>
</head>

:::caution

Soroban's Stellar integration is under active-development and may change.
Expand Down
19 changes: 18 additions & 1 deletion docs/fundamentals-and-concepts/fees-and-metering.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
---
sidebar_position: 13
title: Fees and Metering
description: The mechanisms that measure and bill the cost of running a contract.
description: Smart contract fees and metering on Soroban.
---

<head>
<title>Smart contract fees and metering on Soroban.</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="Smart contract fees and metering on Soroban."
/>
<meta
property="og:description"
content="Learn about how the smart contract resource fees, resource limits, and metering system works on Soroban and methodology behind it."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/fees-and-metering"
/>
</head>

:::caution

Soroban is still under active development. While the fee model described here is unlikely to change, the exact values of the fee rates and limits remain undetermined.
Expand Down
21 changes: 21 additions & 0 deletions docs/fundamentals-and-concepts/fully-typed-contracts.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
---
sidebar_position: 14
title: "Fully-Typed Contracts"
desctiption: Smart contract WASM files contain a machine-readable description of the interface type.
sidebar_label: Fully-Typed Contracts
---

<head>
<title>
Smart contract WASM files contain a machine-readable description of the
interface type.
</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="Smart contract WASM files contain a machine-readable description of the interface type."
/>
<meta
property="og:description"
content="All smart contract interface types will be available on-chain right away with no secondary API calls to external services, no secondary API management, and more."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/fully-typed-contracts"
/>
</head>

When you compile a contract created with [soroban-sdk](../reference/sdks/rust.mdx), the Wasm file ends up with a [custom section](https://webassembly.github.io/spec/core/appendix/custom.html) containing a machine-readable description of your contract's interface types, sometimes called its [spec](https://github.com/stellar/rs-soroban-sdk/tree/main/soroban-spec) or its [API](https://github.com/stellar/soroban-docs/pull/381#issuecomment-1507283476). This is similar to [ABIs](https://www.quicknode.com/guides/ethereum-development/smart-contracts/what-is-an-abi/) in Ethereum, except that Soroban will store every single one of them on-chain from day one, and they include the comments from the contract's author.

Today, these interface types are formatted using [XDR](https://developers.stellar.org/docs/encyclopedia/xdr), but this [may change](https://github.com/stellar/rs-soroban-sdk/issues/683) down the road.
Expand Down
19 changes: 18 additions & 1 deletion docs/fundamentals-and-concepts/high-level-overview.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
---
sidebar_position: 1
title: High-Level Overview
description: Descriptions of key Soroban concepts.
description: An overview of Rust, SDKs, and the Soroban host environment.
---

<head>
<title>An overview of Rust, SDKs, and the host environment.</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="An overview of Rust, SDKs, and the host environment."
/>
<meta
property="og:description"
content="An overview of Rust, SDKs, and the host environment."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/high-level-overview"
/>
</head>

## Rust language

Contracts are small programs written in the [Rust programming language](https://www.rust-lang.org). In order to write contracts, [install a Rust toolchain](https://www.rust-lang.org/tools/install), configure your [editor to support Rust programs](https://www.rust-lang.org/tools), and [learn at least some basic Rust concepts](https://www.rust-lang.org/learn).
Expand Down
16 changes: 15 additions & 1 deletion docs/fundamentals-and-concepts/interacting-with-contracts.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
---
sidebar_position: 15
title: Interacting with Contracts
description: Function calls, contract invocation, Stellar ops, and testing.
description: Interact with smart contracts.
---

<head>
<title>Interact with smart contracts.</title>
<meta charSet="utf-8" />
<meta property="og:title" content="Interact with smart contracts." />
<meta
property="og:description"
content="Interact with smart contracts with function calls, contract invocation, and blockchain operations."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/interacting-with-contracts"
/>
</head>

## Three types of interactions

### Function call
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
---
sidebar_position: 16
title: Interacting with Soroban via Stellar
description: A description of the InvokeHostFunctionOp operation.
description: Invoke and deploy smart contracts with the InvokeHostFunctionOp operation.
---

<head>
<title>
Invoke and deploy smart contracts with the InvokeHostFunctionOp operation.
</title>
<meta charSet="utf-8" />
<meta
property="og:title"
content="Invoke and deploy smart contracts with the InvokeHostFunctionOp operation."
/>
<meta
property="og:description"
content="Invoke and deploy smart contracts with the InvokeHostFunctionOp operation."
/>
<link
rel="canonical"
href="https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions"
/>
</head>

Stellar supports invoking and deploying contracts with a new Operation named `InvokeHostFunctionOp`. The [`soroban-cli`] abstracts these details away from the user, but SDKs do not yet and if you're building a dapp you'll probably find yourself building the XDR transaction to submit to the network.

The `InvokeHostFunctionOp` can be used to perform the following Soroban operations:
Expand Down
Loading

0 comments on commit b6334e4

Please sign in to comment.