Skip to content

Commit

Permalink
Added installation section
Browse files Browse the repository at this point in the history
  • Loading branch information
Sniezka1927 committed Dec 14, 2023
1 parent c140b2b commit a266096
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 14 deletions.
51 changes: 51 additions & 0 deletions docs/docs/casper/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Installation

slug: /casper/installation
---

This section provides detailed instructions on how to install the Invariant protocol on Casper, including prerequisites and steps for setting up the development environment.

## Prerequisites

- Rust & Cargo ([rustup](https://www.rust-lang.org/tools/install))
- wasm-strip ([wabt](https://github.com/WebAssembly/wabt))
- cargo-odra ([cargo-odra](https://github.com/odradev/cargo-odra))

### Rust & Cargo

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

### wasm-strip

```bash
sudo apt install wabt
```

### cargo-odra

```bash
cargo install cargo-odra --locked
```

## Build protocol

- Clone repository

```
git clone [email protected]:invariant-labs/protocol-cspr.git
```

- Build contract

```
cargo odra build -b casper
```

- Run tests

```
cargo odra test
```
34 changes: 21 additions & 13 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
},
items: [
{ to: '/docs/solana/introduction', label: 'Solana', position: 'left' },
{ to: '/docs/aleph_zero/installation', label: 'Aleph Zero', position: 'left' }
{ to: '/docs/aleph_zero/installation', label: 'Aleph Zero', position: 'left' },
{ to: '/docs/casper/installation', label: 'Casper', position: 'left' }
]
},
footer: {
Expand Down Expand Up @@ -95,28 +96,35 @@ module.exports = {
'@docusaurus/plugin-client-redirects',
{
fromExtensions: ['html'],
toExtensions: ['html'],
toExtensions: ['html'],
redirects: [
{
from: '/docs/aleph_zero/',
to: '/docs/aleph_zero/installation',
to: '/docs/aleph_zero/installation'
},
{
from: '/docs/solana/',
to: '/docs/solana/introduction',
to: '/docs/solana/introduction'
},
{
from: '/docs/casper/',
to: '/docs/casper/installation'
}
],
createRedirects(existingPath) {
if(existingPath === "/docs/aleph_zero/" ) {
return "/docs/aleph_zero/installation";
if (existingPath === '/docs/aleph_zero/') {
return '/docs/aleph_zero/installation'
}
if (existingPath === '/docs/solana/') {
return '/docs/solana/introduction'
}
if (existingPath === "/docs/solana/") {
return '/docs/solana/introduction';
if (existingPath === '/docs/casper/') {
return '/docs/casper/installation'
}
// Path does not require a redirect.
return undefined;
},
},
],
],
return undefined
}
}
]
]
}
17 changes: 16 additions & 1 deletion docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,22 @@ module.exports = {
type: 'category',
label: 'Aleph Zero',
collapsed: true,
items: ['aleph_zero/installation', 'aleph_zero/overview', 'aleph_zero/types', 'aleph_zero/storage', 'aleph_zero/collections', 'aleph_zero/entrypoints', 'aleph_zero/listing_pool_to_azero', 'aleph_zero/invariant_errors',]
items: [
'aleph_zero/installation',
'aleph_zero/overview',
'aleph_zero/types',
'aleph_zero/storage',
'aleph_zero/collections',
'aleph_zero/entrypoints',
'aleph_zero/listing_pool_to_azero',
'aleph_zero/invariant_errors'
]
},
{
type: 'category',
label: 'Casper',
collapsed: true,
items: ['casper/installation']
},
'faq',
'resources',
Expand Down

0 comments on commit a266096

Please sign in to comment.