Skip to content

Fix/issues 758 757 756 755 - #795

Merged
Chucks1093 merged 4 commits into
accesslayerorg:mainfrom
harystyleseze:fix/issues-758-757-756-755
Aug 27, 2026
Merged

Fix/issues 758 757 756 755#795
Chucks1093 merged 4 commits into
accesslayerorg:mainfrom
harystyleseze:fix/issues-758-757-756-755

Conversation

@harystyleseze

@harystyleseze harystyleseze commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds batch key purchasing, creator royalty configuration, and bonding curve exponent migration to the creator-keys contract. Property-based fuzz tests are excluded from this PR per maintainer review feedback on the previous PR — they exhaust the Soroban host budget in CI and will be delivered separately.

Changes

  • batch_buy: New function accepting 1–5 creator orders, processing each with bonding curve logic atomically. Reverts entire batch on any failure. Emits batch_buy_completed event.
  • set_royalty: Creator-callable function to configure buy/sell royalty fees (0–500 bps). Royalty is credited to the creator's fee balance on top of existing protocol and creator fees during buy and sell operations.
  • migrate_curve: Admin-only function to change the bonding curve exponent (1–5) for specified creators. Uses per-creator CurveExponent storage that takes priority over CurvePreset.
  • New error variants: BatchSizeExceeded, InvalidExponent, RoyaltyExceedsLimit.
  • New DataKey variants: RoyaltyConfig(Address), CurveExponent(Address) (appended at end — serialization safe).
  • New event types: BatchBuyCompletedEvent, CurveMigratedEvent, RoyaltyUpdatedEvent.

Issues

Resolves #758
Resolves #757
Resolves #756
Resolves #755

Verification

Manual code review of complete diff confirmed:

  • All three issues are fully resolved
  • No unrelated changes introduced
  • Error and DataKey variants appended at end of enums
  • No snapshots added or modified
  • No generated files added

Local verification: 45 issue tests pass (cargo test -p creator-keys --lib test_issues), fmt and clippy clean. Full CI run also passed on this branch before retargeting.

harystyleseze and others added 4 commits August 25, 2026 20:06
The 10,000-iteration fuzz tests exceeded the default Soroban host budget
(Error(Budget, ExceededLimit)) in CI. Reduce iterations to 1,000 and
reset the budget every 200 iterations via env.cost_estimate().budget().
reset_default().
Remove the three property-based fuzz tests per maintainer review
feedback: they exhaust the Soroban host budget at scale and block CI.
Core feature work (batch buy, royalty config, curve migration) lands
on its own.
@Chucks1093
Chucks1093 merged commit a0091e1 into accesslayerorg:main Aug 27, 2026
1 check failed
Adejumo-2 added a commit to Adejumo-2/accesslayer-contracts that referenced this pull request Aug 28, 2026
…and accesslayerorg#795

Two PRs (protocol-fee-holder-cap-lockup-ttl and
fix/issues-758-757-756-755) branched from the same base and added
items at positions 41-43 in ContractError, plus different DataKey
variants, storage helpers, contract methods, and event types. When
merged into main, the implementation code was silently dropped while
the test files survived, causing compilation failures.

Restored:
- DataKey variants: RoyaltyConfig, CurveExponent, AuctionConfig,
  StakeUnlockLedger, TotalStaked, StakingRewardsPool, HolderCapBps,
  LastBuyTimestamp, ProtocolFeeBps, LockupDurationSecs
- ContractError variants: BatchSizeExceeded, RoyaltyExceedsLimit,
  InvalidExponent, MaxHoldingExceeded, LockupPeriodActive,
  InvalidHolderCap
- Contract methods: batch_buy, set_royalty, get_royalty_config,
  migrate_curve, get_curve_exponent, refresh_ttl
- Event types: FeeCollectedEvent, LockupBlockedEvent
- Storage helpers: holder_cap_bps, last_buy_timestamp
- AuctionConfig struct
- cargo fmt applied to all affected files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment