Skip to content

Commit bc282b1

Browse files
author
hard-nett
committed
first commit
0 parents  commit bc282b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2460
-0
lines changed

.cargo/config.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[alias]
2+
wasm = "build --release --target wasm32-unknown-unknown"
3+
unit-test = "test --lib"
4+
5+
# You can specify your package with `--package` option
6+
schema = "run --bin schema --features schema"

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.rs]
11+
indent_size = 4

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
schema/*.json linguist-generated=true

.github/dependabot.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: cargo
8+
directory: /
9+
schedule:
10+
interval: daily
11+
ignore:
12+
- dependency-name: "*"
13+
# patch and minor updates don't matter for libraries
14+
# remove this ignore rule if your package has binaries
15+
update-types:
16+
- "version-update:semver-patch"
17+
- "version-update:semver-minor"

.github/workflows/check.yml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
permissions:
2+
contents: read
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
name: check
8+
jobs:
9+
fmt:
10+
runs-on: ubuntu-latest
11+
name: stable / fmt
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
submodules: true
16+
- name: Install stable
17+
uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: rustfmt
20+
- name: cargo fmt --check
21+
run: cargo fmt --check
22+
- name: install taplo-cli
23+
run: cargo install taplo-cli --locked
24+
- name: taplo fmt --check
25+
run: find . -type f -iname "*.toml" -print0 | xargs -0 taplo format --check
26+
clippy:
27+
runs-on: ubuntu-latest
28+
name: ${{ matrix.toolchain }} / clippy
29+
permissions:
30+
contents: read
31+
checks: write
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
toolchain: [stable, beta]
36+
steps:
37+
- uses: actions/checkout@v4
38+
with:
39+
submodules: true
40+
- name: Install ${{ matrix.toolchain }}
41+
uses: dtolnay/rust-toolchain@master
42+
with:
43+
toolchain: ${{ matrix.toolchain }}
44+
components: clippy
45+
- name: cargo clippy
46+
uses: actions-rs/clippy-check@v1
47+
with:
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
args: --all-features -- -D warnings
50+
doc:
51+
runs-on: ubuntu-latest
52+
name: nightly / doc
53+
steps:
54+
- uses: actions/checkout@v4
55+
with:
56+
submodules: true
57+
- name: Install nightly
58+
uses: dtolnay/rust-toolchain@nightly
59+
- name: cargo doc
60+
run: cargo doc --no-deps --lib --all-features
61+
env:
62+
RUSTDOCFLAGS: --cfg docsrs
63+
hack:
64+
runs-on: ubuntu-latest
65+
name: ubuntu / stable / features
66+
steps:
67+
- uses: actions/checkout@v4
68+
with:
69+
submodules: true
70+
- name: Install stable
71+
uses: dtolnay/rust-toolchain@stable
72+
- name: cargo install cargo-hack
73+
uses: taiki-e/install-action@cargo-hack
74+
- name: cargo hack
75+
run: cargo hack --feature-powerset check --lib --tests
76+
msrv:
77+
runs-on: ubuntu-latest
78+
# we use a matrix here just because env can't be used in job names
79+
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
80+
strategy:
81+
matrix:
82+
msrv: [1.72.0] # cosmrs v0.15.0 requires 1.72.0 or newer
83+
name: ubuntu / ${{ matrix.msrv }}
84+
steps:
85+
- uses: actions/checkout@v4
86+
with:
87+
submodules: true
88+
- name: Install ${{ matrix.msrv }}
89+
uses: dtolnay/rust-toolchain@master
90+
with:
91+
toolchain: ${{ matrix.msrv }}
92+
- name: cargo +${{ matrix.msrv }} check
93+
run: cargo check

.github/workflows/scheduled.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
permissions:
2+
contents: read
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
schedule:
8+
- cron: "7 7 * * *"
9+
name: rolling
10+
jobs:
11+
# https://twitter.com/mycoliza/status/1571295690063753218
12+
nightly:
13+
runs-on: ubuntu-latest
14+
name: ubuntu / nightly
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: true
19+
- name: Install nightly
20+
uses: dtolnay/rust-toolchain@nightly
21+
- name: cargo generate-lockfile
22+
if: hashFiles('Cargo.lock') == ''
23+
run: cargo generate-lockfile
24+
- name: cargo test --locked
25+
run: cargo test --locked --all-features --all-targets
26+
# https://twitter.com/alcuadrado/status/1571291687837732873
27+
update:
28+
runs-on: ubuntu-latest
29+
name: ubuntu / beta / updated
30+
# There's no point running this if no Cargo.lock was checked in in the
31+
# first place, since we'd just redo what happened in the regular test job.
32+
# Unfortunately, hashFiles only works in if on steps, so we reepeat it.
33+
# if: hashFiles('Cargo.lock') != ''
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
submodules: true
38+
- name: Install beta
39+
if: hashFiles('Cargo.lock') != ''
40+
uses: dtolnay/rust-toolchain@beta
41+
- name: cargo update
42+
if: hashFiles('Cargo.lock') != ''
43+
run: cargo update
44+
- name: cargo test
45+
if: hashFiles('Cargo.lock') != ''
46+
run: cargo test --locked --all-features --all-targets
47+
env:
48+
RUSTFLAGS: -D deprecated

.github/workflows/test.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
permissions:
2+
contents: read
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
name: test
8+
jobs:
9+
required:
10+
runs-on: ubuntu-latest
11+
name: ubuntu / ${{ matrix.toolchain }}
12+
strategy:
13+
matrix:
14+
toolchain: [stable, beta]
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: true
19+
- name: Install ${{ matrix.toolchain }}
20+
uses: dtolnay/rust-toolchain@master
21+
with:
22+
toolchain: ${{ matrix.toolchain }}
23+
- name: cargo generate-lockfile
24+
if: hashFiles('Cargo.lock') == ''
25+
run: cargo generate-lockfile
26+
- name: cargo test --locked
27+
run: cargo test --locked --all-features --all-targets

.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/target
2+
3+
artifacts
4+
5+
Cargo.lock
6+
7+
.env
8+
9+
.vscode
10+
.idea
11+
12+
state.json
13+
14+
typescript/node_modules
15+
16+
contracts/**/schema
17+
schema/
18+
19+
build/

Cargo.toml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[workspace]
2+
members = [
3+
"contracts/*","packages/*"]
4+
resolver = "2"
5+
6+
[workspace.package]
7+
version = "0.0.1"
8+
9+
[profile.release]
10+
rpath = false
11+
lto = true
12+
overflow-checks = true
13+
opt-level = 3
14+
debug = false
15+
debug-assertions = false
16+
codegen-units = 1
17+
panic = 'abort'
18+
incremental = false
19+
20+
[workspace.dependencies]
21+
22+
usb = { path = "packages/usb", package = "usb" }
23+
24+
usb-plugin = { path = "contracts/usb" }
25+
usb-adapter = { path = "contracts/usb-adapter" }
26+
27+
cosmwasm-std = { version = "1.5.3" }
28+
cosmwasm-schema = { version = "1.5.3" }
29+
cw-semver = { version = "1.0" }
30+
cw-controllers = { version = "1.1.2" }
31+
cw-storage-plus = "1.2.0"
32+
thiserror = { version = "1.0.50" }
33+
schemars = "0.8"
34+
cw-asset = { version = "3.0.0" }
35+
abstract-app = { version = "0.22.2" }
36+
abstract-adapter = { version = "0.22.2" }
37+
abstract-interface = { version = "0.22.0" }
38+
abstract-client = { version = "0.22.0" }
39+
lazy_static = "1.4.0"
40+
cw-orch = { version = "0.22.2" }
41+
const_format = "0.2.32"
42+
speculoos = "0.11.0"
43+
semver = "1.0"
44+
dotenv = "0.15.0"
45+
env_logger = "0.11.3"
46+
clap = { version = "4.3.7" }
47+
prost = "0.12.3"
48+
prost-build = "0.12.3"
49+
sha2 = "0.10.2"
50+
hex = "0.4.3"

0 commit comments

Comments
 (0)