Skip to content

Commit 22a4b9a

Browse files
Add Loam ports of Soroban example contracts (#174)
* copy over files * cargo toml format * Revert "cargo toml format" This reverts commit 53a6d26. * update cargo toml * more progress on importing contracts into loam * fix account example * more progress on porting, account fixes * more progress on examples port * finish porting examples from smart deploy * add missing soroban examples * get account test working * adding tests * fix: update cargo tomls and use * fix: tests * more updates * more updates to liquidity pool, add test to single offer * make mod pub for contract import * remove unused import * fix single offer and timelock * change to use error for token so that panic checks work * fix part of the liquidity pool example * remaining fixes * cargo fmt * fix other liq pool tests * clippy fixes * fmt * remove test files * fix: update account storage * fix: alloc * fix: atomic multiswap * fix: atomic swap * fix: auth * fix: calculator * fix: custom_types * fix: fmt * fix: deep_contract_aouth * fix: deployer * fix: errors * fix: events * fix: clippy * fix: ft * fix: hello world * fix: increment * fix: increment-init * fix: clippy * fix: liquidity pool * fix: logging * fix: simple account * fix: single offer * fix: status message * fix: timelock * fix: token * fix: ttl * fix: update to upstream example * fix: updated to upstream * fix: isolate integration tests * fix: fix all tests * fix: fmt * fix: split tests across different CI runs as not all need the server * fix: build before clippy so contracts get expanded in proc macro * fix: separate out the tests that don't require RPC * fix: remove old mod refs * fix: cargo fmt * fix: add just to CI test * fix: ignore stalling test and setup rust for other test --------- Co-authored-by: Willem Wyndham <willem@ahalabs.dev>
1 parent 261b8b4 commit 22a4b9a

File tree

141 files changed

+15459
-200
lines changed

Some content is hidden

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

141 files changed

+15459
-200
lines changed

.config/nextest.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[profile.default.overrides]]
2+
filter = 'package(loam-cli)'
3+
slow-timeout = { period = "90s", terminate-after = 4 }

.github/workflows/rust.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,26 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v3
17-
- uses: dtolnay/rust-toolchain@stable
17+
- uses: actions/cache@v3
1818
with:
19-
components: rustfmt, clippy
20-
- uses: Swatinem/rust-cache@v2
19+
path: |
20+
~/.cargo/bin/
21+
~/.cargo/registry/index/
22+
~/.cargo/registry/cache/
23+
~/.cargo/git/db/
24+
crates/loam-cli/tests/fixtures/soroban-init-boilerplate/target/
25+
target/
26+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
27+
- run: rustup update
28+
- run: rustup target add wasm32-unknown-unknown
29+
- uses: taiki-e/install-action@nextest
30+
- uses: taiki-e/install-action@just
2131

2232
- name: Run cargo fmt
2333
run: cargo fmt --all -- --check
24-
34+
- name: build since clippy needs contracts to be built
35+
run: just build
2536
- name: Run cargo clippy
2637
run: cargo clippy --all
38+
- name: Unit Tests
39+
run: just test

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ jobs:
4343
- run: rustup update
4444
- run: rustup target add wasm32-unknown-unknown
4545
- uses: taiki-e/install-action@just
46+
- uses: taiki-e/install-action@nextest
4647
- uses: cargo-bins/cargo-binstall@main
4748
- run: just setup
4849
- run: just create
49-
- run: just test
50+
- run: just test-integration
5051
- run: just redeploy
5152

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
target/
22
.soroban/
3-
.env
3+
.env
4+
test_snapshots/

0 commit comments

Comments
 (0)