Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7c1e9c2
style: run cargo fmt across workspace to satisfy format check
Seunfunmi-319509 Aug 28, 2026
0bbb896
fix: resolve creator-keys clippy violations
Seunfunmi-319509 Aug 28, 2026
fe136d3
Merge origin/main into PR branch
Seunfunmi-319509 Aug 29, 2026
d63e62e
fix: align PR branch with clippy-safe main
Seunfunmi-319509 Aug 29, 2026
733890d
style: apply workspace formatting
Seunfunmi-319509 Aug 29, 2026
cd417d2
fix: avoid Soroban error spec size overflow
Seunfunmi-319509 Aug 29, 2026
88323c4
Merge branch 'main' into fix/cargo-fmt-main
Seunfunmi-319509 Aug 29, 2026
781b6fb
style: fix formatting after main merge
Seunfunmi-319509 Aug 29, 2026
30dc7da
Merge branch 'main' into fix/cargo-fmt-main
Seunfunmi-319509 Aug 30, 2026
e07234c
Merge branch 'main' into fix/cargo-fmt-main
Seunfunmi-319509 Sep 1, 2026
784cbec
fix: restore truncated cancel_auction body and fix circuit breaker in…
oluwaseunshowunmi97-byte Sep 1, 2026
accaeb5
fix: resolve duplicate definitions, missing types, and compilation er…
oluwaseunshowunmi97-byte Sep 1, 2026
60a0c8b
fix: resolve test failures from missing admin setup, circuit breaker …
oluwaseunshowunmi97-byte Sep 1, 2026
805d6e3
Merge branch 'main' into fix/cargo-fmt-main
Seunfunmi-319509 Sep 3, 2026
68a4c6d
fix: use final_proceeds in sell event to fix unused-assignment clippy…
Seunfunmi-319509 Sep 3, 2026
9063b25
wip: advance ledger before test sells and align helpers ahead of main…
Seunfunmi-319509 Sep 6, 2026
51dbbc3
Merge branch 'main' into fix/cargo-fmt-main
Seunfunmi-319509 Sep 6, 2026
00dee86
fix: restore distinct holder-cap errors clobbered by main merge
Seunfunmi-319509 Sep 6, 2026
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
4 changes: 2 additions & 2 deletions creator-keys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3352,7 +3352,7 @@ impl CreatorKeysContract {
let max_allowed = ((i128::from(post_buy_supply) * i128::from(cap_bps))
/ i128::from(fee::BPS_MAX)) as u32;
if post_buy_balance > max_allowed {
return Err(ContractError::WalletCapExceeded);
return Err(ContractError::MaxHoldingExceeded);
}
}
}
Expand Down Expand Up @@ -5887,7 +5887,7 @@ impl CreatorKeysContract {
creator.require_auth();
let resolved_bps = cap_bps.unwrap_or(DEFAULT_HOLDER_CAP_BPS);
if !(HOLDER_CAP_MIN_BPS..=HOLDER_CAP_MAX_BPS).contains(&resolved_bps) {
return Err(ContractError::WalletCapExceeded);
return Err(ContractError::InvalidHolderCap);
}
let key = constants::storage::holder_cap_bps(&creator);
env.storage().persistent().set(&key, &resolved_bps);
Expand Down
4 changes: 4 additions & 0 deletions creator-keys/src/test_issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ mod issue_tests {
client.buy_key(&creator, &buyer, &KEY_PRICE, &None);
}

// Advance ledger so sells are in a different ledger from the last buy
// (required by the flash-loan guard).
env.ledger().with_mut(|l| l.sequence_number += 1);

assert_supply_equals_holder_sum(
&env,
&client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
],
"ledger": {
"protocol_version": 22,
"sequence_number": 1,
"sequence_number": 2,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
"base_reserve": 0,
Expand Down Expand Up @@ -645,13 +645,13 @@
},
"durability": "persistent",
"val": {
"u32": 6311521
"u32": 6311522
}
}
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -750,7 +750,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -804,7 +804,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -855,7 +855,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -1229,7 +1229,7 @@
},
"ext": "v0"
},
6312000
6312001
]
],
[
Expand Down Expand Up @@ -1295,7 +1295,7 @@
},
"ext": "v0"
},
6312000
6312001
]
],
[
Expand Down Expand Up @@ -1493,7 +1493,7 @@
},
"ext": "v0"
},
6312000
6312001
]
],
[
Expand Down Expand Up @@ -1526,7 +1526,7 @@
},
"ext": "v0"
},
6312000
6312001
]
],
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@
"symbol": "ledger"
},
"val": {
"u32": 0
"u32": 2
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,68 @@
]
},
"events": [
{
"event": {
"ext": "v0",
"contract_id": "0000000000000000000000000000000000000000000000000000000000000001",
"type_": "contract",
"body": {
"v0": {
"topics": [
{
"symbol": "slp_ok"
},
{
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M"
}
],
"data": {
"map": [
{
"key": {
"symbol": "actual_amount"
},
"val": {
"i128": {
"hi": 0,
"lo": 0
}
}
},
{
"key": {
"symbol": "bound"
},
"val": {
"i128": {
"hi": 0,
"lo": 0
}
}
},
{
"key": {
"symbol": "creator_id"
},
"val": {
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M"
}
},
{
"key": {
"symbol": "ledger"
},
"val": {
"u32": 1
}
}
]
}
}
}
},
"failed_call": false
},
{
"event": {
"ext": "v0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
],
"ledger": {
"protocol_version": 22,
"sequence_number": 1,
"sequence_number": 2,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
"base_reserve": 0,
Expand Down Expand Up @@ -493,7 +493,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -532,13 +532,13 @@
},
"durability": "persistent",
"val": {
"u32": 6311521
"u32": 6311522
}
}
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -693,7 +693,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -747,7 +747,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -798,7 +798,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -1088,7 +1088,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -1130,7 +1130,7 @@
},
"ext": "v0"
},
6311521
6311522
]
],
[
Expand Down Expand Up @@ -1393,7 +1393,7 @@
},
"ext": "v0"
},
6312000
6312001
]
],
[
Expand Down Expand Up @@ -1426,7 +1426,7 @@
},
"ext": "v0"
},
6312000
6312001
]
],
[
Expand Down
8 changes: 8 additions & 0 deletions creator-keys/tests/global_emergency_pause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ fn test_global_resume_with_two_approvals_lifts_halt() {
let events = env.events().all();
assert!(!f.client.get_global_trading_paused());

// Check the captured log: a view call above resets the harness's visible
// event buffer, so a fresh `env.events().all()` here would be empty.
assert!(events.iter().any(|(_, topics, _)| {
topics.get(0).map(|topic| {
let name: soroban_sdk::Symbol = topic.into_val(&env);
name == GLOBAL_PAUSE_LIFTED_EVENT_NAME
}) == Some(true)
}));
let (_, data) = events
.iter()
.rev()
Expand Down
6 changes: 3 additions & 3 deletions creator-keys/tests/holder_cap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fn test_buy_pushing_holder_above_cap_panics() {
let result = client.try_buy_key(&creator, &buyer, &KEY_PRICE, &None);
assert_eq!(
result,
Err(Ok(ContractError::WalletCapExceeded)),
Err(Ok(ContractError::MaxHoldingExceeded)),
"a buy past 10% of supply must be rejected"
);
assert_eq!(client.get_key_balance(&creator, &buyer), 2);
Expand Down Expand Up @@ -118,10 +118,10 @@ fn test_set_holder_cap_rejects_values_outside_one_and_twenty_five_percent() {
let (client, creator) = setup(&env);

let too_small = client.try_set_holder_cap(&creator, &Some(99));
assert_eq!(too_small, Err(Ok(ContractError::WalletCapExceeded)));
assert_eq!(too_small, Err(Ok(ContractError::InvalidHolderCap)));

let too_large = client.try_set_holder_cap(&creator, &Some(2501));
assert_eq!(too_large, Err(Ok(ContractError::WalletCapExceeded)));
assert_eq!(too_large, Err(Ok(ContractError::InvalidHolderCap)));

assert_eq!(client.get_holder_cap(&creator), None);
}
Expand Down
3 changes: 3 additions & 0 deletions creator-keys/tests/resolve_issues_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ fn test_sell_updates_creator_supply_and_seller_balance_atomically() {
assert_eq!(client.get_total_key_supply(&creator), 3);
assert_eq!(client.get_key_balance(&creator, &seller), 3);

// Advance the ledger so the sells are not blocked by the flash-loan guard.
env.ledger().with_mut(|l| l.sequence_number += 1);

// Execute a sell of 2 keys
let mut l = env.ledger().get();
l.sequence_number += 1;
Expand Down
Loading