Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix links #192

Merged
merged 3 commits into from
Oct 15, 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
8 changes: 4 additions & 4 deletions deprecated_dapps/Governance/DAO.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DAOs provide secure alternatives for pooling funds for a particular cause. It's

### DAO application example

Anyone can easily create their own DAO application and run it on the Vara Network. To facilitate this, use an example of the DAO program (smart contract), which is available on [GitHub](https://github.com/gear-foundation/dapps/tree/master/contracts/dao-light).
Anyone can easily create their own DAO application and run it on the Vara Network. To facilitate this, use an example of the DAO program (smart contract), which is available on [GitHub](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/dao-light).

This article explains the programming interface, data structure, basic functions, and their purposes. You can use it as-is or modify it to suit your own scenarios.

Expand Down Expand Up @@ -283,7 +283,7 @@ extern fn state() {
.expect("Failed to encode or reply with `DaoState` from `state()`");
}
```
To display only necessary certain values from the state, you need to write a separate crate. In this crate, specify functions that will return the desired values from the `DaoState` state. For example - [gear-foundation/dapps/dao/state](https://github.com/gear-foundation/dapps/tree/master/contracts/dao/state):
To display only necessary certain values from the state, you need to write a separate crate. In this crate, specify functions that will return the desired values from the `DaoState` state. For example - [gear-foundation/dapps/dao/state](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/dao/state):

```rust title="dao-light/state/src/lib.rs"
#[gmeta::metawasm]
Expand Down Expand Up @@ -314,9 +314,9 @@ pub mod metafns {
```

## Source code
The source code for this DAO program example and its testing implementation are available on [GitHub](https://github.com/gear-foundation/dapps/tree/master/contracts/dao-light).
The source code for this DAO program example and its testing implementation are available on [GitHub](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/dao-light).

The extended version of DAO that includes admin, membership proposals and delegated voting can be found at [GitHub](https://github.com/gear-foundation/dapps/tree/master/contracts/dao).
The extended version of DAO that includes admin, membership proposals and delegated voting can be found at [GitHub](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/dao).

<!--The application source code is available in: [https://github.com/gear-foundation/dapps-dao-app](https://github.com/gear-foundation/dapps-dao-app).
-->
Expand Down
10 changes: 5 additions & 5 deletions deprecated_dapps/escrow.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ sidebar_position: 2

An escrow is a special wallet to which certain assets (e.g., money or stocks) are deposited and stored until specific conditions are met. In terms of programs, an escrow is a wallet stored on a blockchain that, like a traditional escrow, can receive assets (e.g., cryptocurrency or fungible tokens, such as [Vara fungible tokens - VFT](../Standards/vft.md) in this example) from one user and, when certain conditions are met, send them to another.

- Program source code is avalible on [Github](https://github.com/gear-foundation/dapps/tree/master/contracts/escrow)
- dApp UI [Github](https://github.com/gear-foundation/dapps/tree/master/frontend/apps/escrow)
- Program source code is avalible on [Github](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/escrow)
- dApp UI [Github](https://github.com/gear-foundation/dapps/tree/3f59be8c871dd1eceea5f5768a7dc275c3a29f0a/frontend/apps/escrow)

## How to run

This video demonstrates how to configure and run Escrow application on your own and explains the user interaction workflow: **https://youtu.be/CD8j4epEY4E**

### ⚒️ Build program

- Get the source code of the [Escrow program](https://github.com/gear-foundation/dapps/tree/master/contracts/escrow)
- Build program as described in [program/README.md](https://github.com/gear-foundation/dapps/blob/master/contracts/escrow/README.md).
- Get the source code of the [Escrow program](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/escrow)
- Build program as described in [program/README.md](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/escrow/README.md).

### 🏗️ Upload Сode

Expand All @@ -30,7 +30,7 @@ This application requires code to create an escrow wallet

### 🖥️ Run UI

1. Install packages as described in [frontend/README.md](https://github.com/gear-foundation/dapps/blob/master/frontend/apps/escrow/README.md)
1. Install packages as described in [frontend/README.md](https://github.com/gear-foundation/dapps/tree/3f59be8c871dd1eceea5f5768a7dc275c3a29f0a/frontend/apps/escrow/README.md)
2. Configure .evn file. Specify network address and code ID like in the example below:

```sh
Expand Down
12 changes: 6 additions & 6 deletions deprecated_dapps/game-of-chance.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ sidebar_position: 5

Game of chance is a simple game program with the lottery logic.

- Program source code available on [Github](https://github.com/gear-foundation/dapps/tree/master/contracts/game-of-chance)
- dApp UI [Github](https://github.com/gear-foundation/dapps/tree/master/frontend/apps/game-of-chance)
- Program source code available on [Github](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/game-of-chance)
- dApp UI [Github](https://github.com/gear-foundation/dapps/tree/3f59be8c871dd1eceea5f5768a7dc275c3a29f0a/frontend/apps/game-of-chance)

## How to run

### ⚒️ Build program

- Get the source code of [GOC contract](https://github.com/gear-foundation/dapps/tree/master/contracts/game-of-chance)
- Build programs as described in [program/README.md](https://github.com/gear-foundation/dapps/blob/master/contracts/game-of-chance/README.md).
- Get the source code of [GOC contract](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/game-of-chance)
- Build programs as described in [program/README.md](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/game-of-chance/README.md).

### 🏗️ Upload program

Expand All @@ -28,7 +28,7 @@ Game of chance is a simple game program with the lottery logic.

### 🖥️ Run UI

1. Install packages as described in [frontend/README.md](https://github.com/gear-foundation/dapps/blob/master/frontend/apps/game-of-chance/README.md)
1. Install packages as described in [frontend/README.md](https://github.com/gear-foundation/dapps/tree/3f59be8c871dd1eceea5f5768a7dc275c3a29f0a/frontend/apps/game-of-chance/README.md)
2. Configure `.env` file. Specify network address and program ID like in the example below:

```sh
Expand Down Expand Up @@ -174,6 +174,6 @@ To display only necessary certain values from the state, you need to write a sep

## Source code

The source code of the Game of Chance program and an implementation of its testing are available on [GitHub](https://github.com/gear-foundation/dapps/tree/master/frontend/apps/game-of-chance). They can be used as is or modified to suit your own scenarios.
The source code of the Game of Chance program and an implementation of its testing are available on [GitHub](https://github.com/gear-foundation/dapps/tree/3f59be8c871dd1eceea5f5768a7dc275c3a29f0a/frontend/apps/game-of-chance). They can be used as is or modified to suit your own scenarios.

For more details about testing programs written on Vara, refer to the [Program Testing](/docs/build/testing) article.
6 changes: 3 additions & 3 deletions deprecated_dapps/rock-paper-scissors.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A simultaneous, zero-sum game, it has three possible outcomes: a draw, a win or

One popular five-weapon expansion is "rock paper scissors Spock lizard", invented by Sam Kass and Karen Bryla, which adds "Spock" and "lizard" to the standard three choices. "Spock" is signified with the Star Trek Vulcan salute, while "lizard" is shown by forming the hand into a sock-puppet-like mouth. Spock smashes scissors and vaporizes rock; he is poisoned by lizard and disproved by paper. Lizard poisons Spock and eats paper; it is crushed by rock and decapitated by scissors. This variant was mentioned in a 2005 article in The Times of London and was later the subject of an episode of the American sitcom The Big Bang Theory in 2008 (as rock-paper-scissors-lizard-Spock).

Anyone can easily create their own decentralized game application and run it on the Gear Network. To do this, Gear made a "rock paper scissors Spock lizard" game version for multiple players, in which the winner can be determined in several rounds of tense struggle. The source code is available on [GitHub](https://github.com/gear-foundation/dapps/tree/master/contracts/rock-paper-scissors). This article explains the programming interface, data structure, basic functions and explains their purpose. It can be used as is or modified to suit your own scenarios.
Anyone can easily create their own decentralized game application and run it on the Gear Network. To do this, Gear made a "rock paper scissors Spock lizard" game version for multiple players, in which the winner can be determined in several rounds of tense struggle. The source code is available on [GitHub](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/rock-paper-scissors). This article explains the programming interface, data structure, basic functions and explains their purpose. It can be used as is or modified to suit your own scenarios.

## Logic

Expand Down Expand Up @@ -213,7 +213,7 @@ extern fn state() {
.expect("Failed to encode or reply with `ContractState` from `state()`");
}
```
To display only necessary certain values from the state, you need to write a separate crate. In this crate, specify functions that will return the desired values from the `ContractState` state. For example - [rock-paper-scissors/state](https://github.com/gear-foundation/dapps/tree/master/contracts/rock-paper-scissors/state):
To display only necessary certain values from the state, you need to write a separate crate. In this crate, specify functions that will return the desired values from the `ContractState` state. For example - [rock-paper-scissors/state](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/rock-paper-scissors/state):

```rust title="rock-paper-scissors/state/src/lib.rs"
#[gmeta::metawasm]
Expand All @@ -240,6 +240,6 @@ pub mod metafns {

## Source code

The source code of Rock Paper Scissors implementation and the example of an implementation of its testing is available on [GitHub](https://github.com/gear-foundation/dapps/tree/master/contracts/rock-paper-scissors).
The source code of Rock Paper Scissors implementation and the example of an implementation of its testing is available on [GitHub](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/rock-paper-scissors).

For more details about testing programs written on Vara, refer to the [Program Testing](/docs/build/testing) article.
16 changes: 8 additions & 8 deletions deprecated_dapps/supply-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ sidebar_position: 2

In logistics, a supply chain is a system for tracking and delivering to an end consumer various items. As a rule, such systems can't work without a lot of paperwork and other layers of bureaucracy. All of this costs a lot of time and money and increases the likelihood of an accidental error or, worst of all, a fraud. With the help of smart contracts (programs) and blockchain technologies, it is possible to eliminate these problems by making a supply chain more efficient, reliable and transparent.

- [Supply chain program](https://github.com/gear-foundation/dapps/tree/master/contracts/supply-chain).
- [Supply chain UI](https://github.com/gear-foundation/dapps/tree/master/frontend/apps/supply-chain).
- [Supply chain program](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/supply-chain).
- [Supply chain UI](https://github.com/gear-foundation/dapps/tree/3f59be8c871dd1eceea5f5768a7dc275c3a29f0a/frontend/apps/supply-chain).

## How to run

### ⚒️ Build programs

Upload Supply chain program requires build two auxiliary programs:

- Build [NFT contract](https://github.com/gear-foundation/dapps/tree/master/contracts/non-fungible-token) as described in `README.md`
- Build [Sharded FT contract](https://github.com/gear-foundation/dapps/tree/master/contracts/sharded-fungible-token) as described in `README.md`
- Build [Supply Chain program](https://github.com/gear-foundation/dapps/tree/master/contracts/supply-chain) as described in `README.md`
- Build [NFT contract](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/non-fungible-token) as described in `README.md`
- Build [Sharded FT contract](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/sharded-fungible-token) as described in `README.md`
- Build [Supply Chain program](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/supply-chain) as described in `README.md`

### 🏗️ Upload programs

Expand Down Expand Up @@ -65,7 +65,7 @@ yarn install

2. Configure .evn file. Specify network address and program ID like in the example below:

For proper application functioning, one needs to adjust an environment variable parameters. An example is available [here](https://github.com/gear-foundation/dapps/blob/master/frontend/apps/supply-chain/.env.example).
For proper application functioning, one needs to adjust an environment variable parameters. An example is available [here](https://github.com/gear-foundation/dapps/tree/3f59be8c871dd1eceea5f5768a7dc275c3a29f0a/frontend/apps/supply-chain/.env.example).

```sh
REACT_APP_NODE_ADDRESS=wss://rpc-node.gear-tech.io
Expand Down Expand Up @@ -592,7 +592,7 @@ extern fn state() {
msg::reply(state, 0).expect("Failed to encode or reply with `State` from `state()`");
}
```
To display only necessary certain values from the state, you need to write a separate crate. In this crate, specify functions that will return the desired values from the `State` struct. For example - [supply-chain/state](https://github.com/gear-foundation/dapps/tree/master/contracts/supply-chain/state):
To display only necessary certain values from the state, you need to write a separate crate. In this crate, specify functions that will return the desired values from the `State` struct. For example - [supply-chain/state](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/supply-chain/state):

```rust title="supply-chain/state/src/lib.rs"
#[gmeta::metawasm]
Expand Down Expand Up @@ -654,6 +654,6 @@ pub mod metafns {

## Source code

The source code of this example of a supply chain program and an implementation of its testing is available on [GitHub](https://github.com/gear-foundation/dapps/tree/master/contracts/supply-chain). They can be used as is or modified to suit your own scenarios.
The source code of this example of a supply chain program and an implementation of its testing is available on [GitHub](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/supply-chain). They can be used as is or modified to suit your own scenarios.

For more details about testing programs written on Vara, refer to the [Program Testing](/docs/build/testing) article.
4 changes: 2 additions & 2 deletions docs/examples/DeFi/crowdsale.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A public offering to help build brand-new cryptocurrency or other digital assets

The example of a crowdsale program implementation described in this article is just one of many decentralized applications that can be implemented and launched on Gear. This article explains the programming interface, data structure, basic functions, and their purposes. It can be used as-is or modified to suit specific scenarios. Anyone can easily create a crowdsale application and run it on the Vara network.

The initial resources used to acquire tokens are determined by the Vara fungible tokens contract - [VFT](/docs/examples/Standards/vft.md). The program's source code is available on [GitHub](https://github.com/gear-foundation/dapps/tree/master/contracts/crowdsale).
The initial resources used to acquire tokens are determined by the Vara fungible tokens contract - [VFT](/docs/examples/Standards/vft.md). The program's source code is available on [GitHub](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/crowdsale).

## Interface

Expand Down Expand Up @@ -206,6 +206,6 @@ pub mod metafns {

## Conclusion

The source code of this example of an ICO program and the example of an implementation of its testing is available on [Github](https://github.com/gear-foundation/dapps/tree/master/contracts/crowdsale).
The source code of this example of an ICO program and the example of an implementation of its testing is available on [Github](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/crowdsale).

For more details about testing programs written on Vara, refer to the [Program Testing](/docs/build/testing.md) article.
8 changes: 4 additions & 4 deletions docs/examples/DeFi/dex.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ While transactions on a centralized exchange are recorded in that exchange's int

DEXs are usually built on open-source code, allowing anyone interested to see exactly how they work. This also means that developers can adapt existing code to create new competing projects, as seen with Uniswap's code being adapted by various DEXs like Sushiswap and Pancakeswap.

The exchange uses [Vara fungible tokens (VFT)](/docs/examples/Standards/vft) for the tokens and the [Gear-lib FT wrapper](https://github.com/gear-foundation/dapps/tree/master/contracts/gear-lib-old/src/fungible_token) for the pair to track liquidity.
The exchange uses [Vara fungible tokens (VFT)](/docs/examples/Standards/vft) for the tokens and the [Gear-lib FT wrapper](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/gear-lib-old/src/fungible_token) for the pair to track liquidity.

### Math
All prices are algorithmically calculated. Investors provide funds to the liquidity pools, and the price is calculated according to the amount of tokens in the reserves using the following formula:
Expand Down Expand Up @@ -128,7 +128,7 @@ extern "C" fn state() {
.expect("Failed to encode or reply with `<ContractMetadata as Metadata>::State` from `state()`");
}
```
To display only specific values from the state, write a separate crate. In this crate, specify functions that will return the desired values from the `State` struct. For example, see [gear-foundation/dapps/dex/factory/state](https://github.com/gear-foundation/dapps/tree/master/contracts/dex/factory/state):
To display only specific values from the state, write a separate crate. In this crate, specify functions that will return the desired values from the `State` struct. For example, see [gear-foundation/dapps/dex/factory/state](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/dex/factory/state):

```rust
#[metawasm]
Expand Down Expand Up @@ -186,9 +186,9 @@ async fn create_pair(&mut self, mut token_a: ActorId, mut token_b: ActorId);
```

### Source Code
The source code of this DEX factory program example and its testing implementation is available on [gear-foundation/dapps/dex/factory](https://github.com/gear-foundation/dapps/tree/master/contracts/dex/factory).
The source code of this DEX factory program example and its testing implementation is available on [gear-foundation/dapps/dex/factory](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/dex/factory).

See also an example of the program testing implementation based on `gtest`: [tests/utils/factory.rs](https://github.com/gear-foundation/dapps/blob/master/contracts/dex/tests/utils/factory.rs).
See also an example of the program testing implementation based on `gtest`: [tests/utils/factory.rs](https://github.com/gear-foundation/dapps/tree/a357635b61e27c52f46908885fecb048dc8424e5/contracts/dex/tests/utils/factory.rs).

For more details about testing programs written on Vara, refer to the [Program Testing](/docs/build/testing) article.

Expand Down
Loading