-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastar_installation.sh
49 lines (35 loc) · 1.21 KB
/
astar_installation.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Update the system
sudo apt-get update
sudo apt-get upgrade -y
# Install curl
sudo apt-get install -y curl
# Install Rust and Cargo (Rust's package manager)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
# Install git
sudo apt-get install -y git
# Clone Substrate's codebase
git clone https://github.com/paritytech/substrate.git
cd substrate
# Install required tools and dependencies
./scripts/init.sh
# Build all native code
cargo build --release
# Install Node.js and npm for running scripts and tests
sudo apt-get install -y nodejs npm
# Install other potential dependencies
sudo apt-get install -y cmake pkg-config libssl-dev git clang libclang-dev
# Install wasm compiler for Rust
rustup target add wasm32-unknown-unknown
# Install other useful tools
cargo install cargo-contract
cargo install canvas-node --git https://github.com/paritytech/canvas-node.git --tag v0.1.6 --force --locked
# For testing frameworks and JavaScript work
sudo apt-get install -y mocha
sudo apt-get install -y polkadot-js
# Install Solidity for smart contract development
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
echo "Setup Complete"