Skip to content

Commit e5376c6

Browse files
Initial commit
0 parents  commit e5376c6

37 files changed

+10653
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "Substrate Node template",
3+
"context": "..",
4+
"settings": {
5+
"terminal.integrated.shell.linux": "/bin/bash",
6+
"lldb.executable": "/usr/bin/lldb"
7+
},
8+
"extensions": [
9+
"rust-lang.rust",
10+
"bungcip.better-toml",
11+
"vadimcn.vscode-lldb"
12+
],
13+
"forwardPorts": [
14+
3000,
15+
9944
16+
],
17+
"onCreateCommand": ["cargo build", "cargo check"],
18+
"postStartCommand": "./target/debug/node-template --dev --ws-external",
19+
"menuActions": [
20+
{"id": "polkadotjs",
21+
"label": "Open PolkadotJS Apps",
22+
"type": "external-preview",
23+
"args": ["https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F/$HOST/wss"]}
24+
]
25+
}

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
indent_style=space
5+
indent_size=2
6+
tab_width=2
7+
end_of_line=lf
8+
charset=utf-8
9+
trim_trailing_whitespace=true
10+
insert_final_newline = true
11+
12+
[*.{rs,toml}]
13+
indent_style=tab
14+
indent_size=tab
15+
tab_width=4
16+
max_line_length=100

.envrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# If lorri exists, better try it first.
2+
if has lorri; then
3+
eval "$(lorri direnv)"
4+
else
5+
# Otherwise fall back to pure nix
6+
use nix
7+
fi
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Ask a Question
3+
about: Ask a question about this template.
4+
title: ""
5+
labels: question
6+
assignees: ""
7+
---
8+
9+
**Question**
10+
11+
_Please include information such as the following: is your question to clarify an existing resource
12+
or are you asking about something new? what are you trying to accomplish? where have you looked for
13+
answers?_
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Report a Bug
3+
about: Report a problem with this template.
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Description**
10+
11+
_Tell us what happened. In particular, be specific about any changes you made to this template.
12+
Ideally, provide a link to your project's GitHub repository. Please note that we are not able to
13+
support all conceivable changes to this template project, but the more information you are able to
14+
provide the more equipped we will be to help._
15+
16+
**Steps to Reproduce**
17+
18+
_Replace the example steps below with actual steps to reproduce the bug you're reporting._
19+
20+
1. Go to '...'
21+
2. Click on '....'
22+
3. Scroll down to '....'
23+
4. See error
24+
25+
**Expected vs. Actual Behavior**
26+
27+
_What did you expect to happen after you followed the steps you described in the last section? What
28+
actually happened?_
29+
30+
**Environment**
31+
32+
_Describe the environment in which you encountered this bug. Use the list below as a starting point
33+
and add additional information if you think it's relevant._
34+
35+
- Operating system:
36+
- Template version/tag:
37+
- Rust version (run `rustup show`):
38+
39+
**Logs, Errors or Screenshots**
40+
41+
_Please provide the text of any logs or errors that you experienced; if
42+
applicable, provide screenshots to help illustrate the problem._
43+
44+
**Additional Information**
45+
46+
_Please add any other details that you think may help us solve your problem._
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Suggest a Feature
3+
about: Suggest a new feature or an improvement to an existing feature for this template.
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Motivation**
10+
11+
_Describe the need or frustration that motivated you to make this suggestion. Please note that the
12+
goal of this project is to provide a general-purpose template project, so please take care when
13+
suggesting features that may be specific to a particular use case._
14+
15+
**Suggested Solution**
16+
17+
_Describe your suggested solution to the need or frustration that you are experiencing._
18+
19+
**Alternatives**
20+
21+
_Describe any alternative solutions or features you considered and why you believe your suggested
22+
solution is preferable._
23+
24+
**Additional Information**
25+
26+
_Provide any additional information that you believe may help us evaluate your suggestion._

.github/workflows/check.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Check Set-Up & Build
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the master branch
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
check:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-20.04
19+
20+
# Steps represent a sequence of tasks that will be executed as part of the job
21+
steps:
22+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23+
- uses: actions/checkout@v2
24+
25+
- name: Set-Up
26+
run: sudo apt install -y git clang curl libssl-dev llvm libudev-dev
27+
28+
- name: Install Rustup
29+
run: |
30+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
31+
source ~/.cargo/env
32+
rustup default stable
33+
rustup update nightly
34+
rustup update stable
35+
rustup target add wasm32-unknown-unknown --toolchain nightly
36+
37+
- name: Check Build
38+
run: |
39+
SKIP_WASM_BUILD=1 cargo check --release
40+
41+
- name: Check Build for Benchmarking
42+
run: >
43+
pushd node &&
44+
cargo check --features=runtime-benchmarks --release

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
**/target/
4+
# These are backup files generated by rustfmt
5+
**/*.rs.bk
6+
7+
.DS_Store
8+
9+
# The cache for docker container dependency
10+
.cargo
11+
12+
# The cache for chain data in container
13+
.local
14+
15+
# direnv cache
16+
.direnv

.vscode/tasks.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Run ",
8+
"type": "shell",
9+
"command": "cargo",
10+
"args": ["run", "--release", "--", "--dev"],
11+
"group": {
12+
"kind": "build",
13+
"isDefault": true
14+
},
15+
"presentation": {
16+
"reveal": "always",
17+
"panel": "new"
18+
},
19+
"problemMatcher": [
20+
{
21+
"owner": "rust",
22+
"fileLocation": ["relative", "${workspaceRoot}"],
23+
"pattern": {
24+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(\\d+):(\\d+)\\s+(warning|error):\\s+(.*)$",
25+
"file": 1,
26+
"line": 2,
27+
"column": 3,
28+
"endLine": 4,
29+
"endColumn": 5,
30+
"severity": 6,
31+
"message": 7
32+
}
33+
}
34+
]
35+
}
36+
]
37+
}

0 commit comments

Comments
 (0)