Skip to content

Commit fcecd2c

Browse files
committed
Update project structure and dependencies
added project structure updated contract deps cleanup
1 parent abb095f commit fcecd2c

50 files changed

Lines changed: 2101 additions & 4848 deletions

Some content is hidden

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

.cargo/config

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[profile.contract]
2+
inherits = "release"
3+
strip = true
4+
codegen-units = 1
5+
opt-level = "z"
6+
7+
#helloo
8+
9+
lto = true
10+
debug = false
11+
panic = "abort"
12+
overflow-checks = true

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
export CONTRACT_NAME=hodl_lockup

.github/workflows/push.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Push
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- name: Build
21+
run: make build-in-docker
22+
23+
lint:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
30+
- name: Lint
31+
run: make lint
32+
33+
unit-tests:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
submodules: recursive
39+
40+
- name: Unit tests
41+
run: make test
42+
43+
integration-tests:
44+
runs-on: macos-latest
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v4
48+
with:
49+
submodules: recursive
50+
51+
- name: Integration tests
52+
run: make integration

.github/workflows/test.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- name: Build
21+
run: make build
22+
23+
lint:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
30+
- name: Lint
31+
run: make lint
32+
33+
unit-tests:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
submodules: recursive
39+
40+
- name: Unit tests
41+
run: make test
42+
43+
integration-tests:
44+
runs-on: macos-latest
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v4
48+
with:
49+
submodules: recursive
50+
51+
- name: Integration tests
52+
run: make integration

.gitignore

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
14
target/
25

3-
neardev/
6+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8+
Cargo.lock
49

10+
# These are backup files generated by rustfmt
11+
**/*.rs.bk
12+
13+
# MSVC Windows builds of rustc generate these, which store debugging information
14+
*.pdb
15+
16+
res/contract_name.wasm
17+
18+
.idea
19+
20+
.DS_Store

.rustfmt.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
group_imports = "StdExternalCrate"
2+
imports_granularity = "Crate"
3+
max_width = 120

0 commit comments

Comments
 (0)