Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
${{ runner.os }}-cargo-

- name: Check format (workspace crates)
run: cargo fmt --package callora-vault --package callora-settlement --package callora-revenue-pool --package callora-validators --package callora-cross-contract-tests -- --check
run: cargo fmt --package callora-settlement --package callora-revenue-pool --package callora-validators --package callora-cross-contract-tests -- --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
${{ runner.os }}-cargo-

- name: Check format
run: cargo fmt --package callora-vault --package callora-settlement --package callora-revenue-pool --package callora-cross-contract-tests -- --check
run: cargo fmt --package callora-settlement --package callora-revenue-pool --package callora-cross-contract-tests -- --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
Expand Down
59 changes: 35 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ publish = false
[workspace]
resolver = "2"
members = [
"contracts/vault",
"contracts/revenue_pool",
"contracts/settlement",
"contracts/settlement/fuzz",
Expand All @@ -16,18 +15,23 @@ members = [
"contracts/helpers",
"contracts/validators",
"contracts/revenue_pool/fuzz",
"contracts/migrate/fuzz",
"contracts/migrate",
"contracts/tests",
"contracts/whitelist",
"contracts/cold",
"contracts/hot",
"contracts/registry",
"contracts/upgrade",
"contracts/yield",
]
default-members = [
"contracts/vault",
"contracts/revenue_pool",
"contracts/settlement",
"contracts/checkpoint",
"contracts/freeze",
"contracts/helpers",
"contracts/cold",
"contracts/hot",
"contracts/validators",
]

Expand All @@ -36,7 +40,6 @@ default-members = [
soroban-sdk = "22"

[dev-dependencies]
callora-vault = { path = "contracts/vault" }
callora-settlement = { path = "contracts/settlement" }
callora-revenue-pool = { path = "contracts/revenue_pool" }
soroban-sdk = { workspace = true, features = ["testutils"] }
Expand Down
14 changes: 8 additions & 6 deletions contracts/checkpoint/tests/proptest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum CheckpointAction {

fn checkpoint_action_strategy() -> impl Strategy<Value = CheckpointAction> {
prop_oneof![
5 => (0_i128..=1_000_000_i128).prop_map(CheckpointAction::CreateSingle),
5 => (0_i128..=1_000_000_i128).prop_map(|balance| CheckpointAction::CreateSingle { balance }),
3 => (1_u32..=MAX_BATCH_SIZE, 0_i128..=1_000_000_i128)
.prop_map(|(count, balance)| CheckpointAction::CreateBatch { count, balance }),
2 => (0_u64..=200_u64, 0_u32..=150_u32)
Expand Down Expand Up @@ -223,15 +223,15 @@ proptest! {
record.balance, expected_balance
);
prop_assert_eq!(
record.subject, subject,
record.subject, subject.clone(),
"record subject mutated"
);
prop_assert_eq!(
record.token, token,
record.token, token.clone(),
"record token mutated"
);
prop_assert_eq!(
record.metadata, meta,
record.metadata, meta.clone(),
"record metadata mutated"
);
}
Expand Down Expand Up @@ -476,8 +476,10 @@ proptest! {
client.batch_create_checkpoints(&admin, &items)
}));

if let Ok(Ok(ids)) = result {
expected_id = *ids.last().unwrap();
if let Ok(ids_result) = result {
if let Ok(ids) = ids_result {
expected_id = *ids.last().unwrap();
}
}

let latest = client.get_latest_checkpoint();
Expand Down
Loading
Loading