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

Update tutorials #94

Merged
merged 5 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@
"blocktime",
"EVMs",
"timeframe",
"malincentives"
"malincentives",
"INITIALSUPPLY",
"solady",
"BASEURI"
],
"flagWords": ["hte", "addresss"]
}
8 changes: 5 additions & 3 deletions docs/develop/smart-contracts/deploy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Deploy
description: How to deploy a smart contract to the Quai Network.
sidebar_position: 3
sidebar_position: 2
keywords:
- smart contract
- solidityx
Expand Down Expand Up @@ -45,6 +45,8 @@ Contrary to monolithic blockchains, Quai Network's multi-threaded architecture a

Sister contracts are created by deploying contracts across all chains that the project intends to support. After the deployment of these sister contracts, a trust on first-use (TOFU) strategy is used to link the contracts together, allowing each contract to be aware of the state and activities of all of its sisters. Each sister contract contains an objective reference to the public address of every other sister contract.

Contracts intended to function across many chains will contain initially empty slots for the addresses of its sisters. If a contract intends to maintain functionality across the initial network of 13 chains, 12 slots are required for all 12 sister contracts to be referenced.
Contracts intended to function across many chains will contain initially empty slots for the addresses of its sisters. If a contract intends to maintain functionality across the initial network of 9 chains, 8 slots are required for all 8 sister contracts to be referenced.

Information on how to deploy a multi-chain smart contracts with hardhat can be found in the [Multi-Chain Deployment Tutorial](/develop/tutorials/multi-chain.md).
Tutorials on how to deploy a multi-chain smart contracts with hardhat can be found in the [Multi-Chain Deployment Tutorial](/develop/tutorials/multi-chain.md).

Resources for automated cross-chain deployment and sister contract linking and be found in the [`quais-by-example` repository](https://github.com/dominant-strategies/quais-by-example/tree/main).
25 changes: 24 additions & 1 deletion docs/develop/smart-contracts/languages.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Languages
description: Smart contract development languages supported on Quai Network.
sidebar_position: 2
sidebar_position: 1
keywords:
- solidity
- solidityx
Expand All @@ -14,6 +14,29 @@ Quai Network runs a modified Ethereum Virtual Machine environment that provides

Generic [Solidity](#solidity) smart contracts can be deployed to any single chain in the network and will function as expected. However, to take full advantage of Quai's cross-chain functionality, developers must use [SolidityX](#solidityx) based smart contracts.

### Choosing Solidity vs SolidityX

There are a few main differences between Solidity and SolidityX that developers should consider when choosing which language to use for smart contract development on Quai Network.

#### Solidity

- **Recommended for developers new to Quai Network**
- Single chain deployments without cross-chain functionality
- Easier to use, deploy, and test + compatible with existing Solidity tooling
- Supports any previously existing Solidity compiler version
- Compatible with existing Solidity contract libraries like [OpenZeppelin](https://www.openzeppelin.com/contracts) and [Solady](https://github.com/Vectorized/solady).
- **Recommended for most use cases**

#### SolidityX

- **Recommended for more advanced developers looking to experiment with cross-chain functionality**
- Enables cross-chain contract deployments
- Requires the [SolidityX compiler](https://github.com/dominant-strategies/SolidityX/releases/tag/0.8.19-solidityx) and additional configuration (can be difficult to set up)
- Not compatible with pre-existing Solidity contract libraries.
- Will be forward compatible with [dynamic scaling events](/learn/advanced-introduction/poem/infinite-execution-shards/dynamic-sharding.mdx)

## Language Details

### Solidity

Solidity is a contract-oriented, high-level programming language for creating smart contracts. It was influenced by C++, Python, and JavaScript and is designed to target the Ethereum Virtual Machine (EVM) environments. Solidity is statically typed, supports inheritance, and libraries. It allows developers to create smart contracts for a wide range of use cases and applications. Key features of Solidity include:
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/smart-contracts/opcode-additions.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Opcode Additions
description: Specification of the isaddrinternal and etx opcodes additions on Quai Network.
sidebar_position: 1
sidebar_position: 3
keywords:
- solidityx
- quai virtual machine
Expand Down
Loading
Loading