Skip to content

test : Scenario Tests for Multi-Period, Multi-Offering Lifecycle#124

Merged
thlpkee20-wq merged 1 commit intoRevoraOrg:masterfrom
Olowodarey:test
Mar 9, 2026
Merged

test : Scenario Tests for Multi-Period, Multi-Offering Lifecycle#124
thlpkee20-wq merged 1 commit intoRevoraOrg:masterfrom
Olowodarey:test

Conversation

@Olowodarey
Copy link
Contributor

Overview

This PR introduces comprehensive end-to-end scenario tests simulating realistic lifecycle interactions across offerings, multiple periods, and revenue distribution flows.


What Was Changed

A new scenarios module was appended within src/test.rs, leveraging the existing internal test helpers:

  • make_client
  • Env
  • Address

Test Scenarios

1. Happy Path Lifecycle Scenario

Validates a full successful lifecycle, including:

  • Registering an offering with a specified revenue share (bps).
  • Incrementally reporting multi-period revenue.
  • Allocating and shifting holder shares across consecutive periods (total supply: 100).
  • Executing batch distributions and claims for multiple investors.
  • Ensuring precise fractional claimable balances for each participant.

2. Failure and Correction Flow Scenario

Exercises negative edge cases and critical invariants, including:

  • Ensuring invalid negative revenue reports are rejected.
  • Emulating claim limits via time delays (e.g., 86400 seconds) and asserting that premature claims are blocked.
  • Validating that revenue correction overrides properly update claim calculations.
  • Demonstrating that blacklisted users are excluded from subsequent distribution mechanics.

closes #114

@thlpkee20-wq thlpkee20-wq merged commit 267b8d0 into RevoraOrg:master Mar 9, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Comprehensive Scenario Tests for Multi-Period, Multi-Offering Lifecycle

2 participants