Skip to content

user avatar 35 matches #435 fix(insurance): ReinsuranceStats missing Encode, Decode, TypeInfo, StorageLayout derives#453

Open
Ebenezer199914 wants to merge 430 commits into
MettaChain:revert-129-feat/project-requirementsfrom
Ebenezer199914:main
Open

user avatar 35 matches #435 fix(insurance): ReinsuranceStats missing Encode, Decode, TypeInfo, StorageLayout derives#453
Ebenezer199914 wants to merge 430 commits into
MettaChain:revert-129-feat/project-requirementsfrom
Ebenezer199914:main

Conversation

@Ebenezer199914
Copy link
Copy Markdown

Summary

Fixes #435 by adding the required ink!/scale derives to ReinsuranceStats in contracts/insurance/src/types.rs.

Problem

ReinsuranceStats is returned from an #[ink(message)] function and is also stored in contract state, but it was missing the required derives for SCALE encoding, metadata generation, and storage layout.

This caused compile errors such as:

error[E0277]: the trait bound `ReinsuranceStats: TypeInfo` is not satisfied
error[E0277]: the trait bound `Option<ReinsuranceStats>: Encode` is not satisfied
closes #435

Jonniie and others added 30 commits April 23, 2026 22:31
Fixes and changes:
- Resolve merge conflicts in property-token, load_tests, and traits
- Fix oracle MultiSigProposal missing StorageLayout derive
- Remove corrupted observer.rs module (was causing compilation issues)
- Add ShareLockPeriod and ShareStakeInfo types to property-token/types.rs
- Fix StakeRewardPoolFunded event to include amount field
- Remove duplicate fields in RateLimiterSim struct in load_tests
- Fix std feature quoting in oracle and property-token derive attributes
- Include upstream changes to dex, fees, oracle, and other contracts
- Add documentation files (SECURITY.md, audit schedules, guides)
- Add TypeScript types and SDK improvements
- cargo check passes, fmt passes, clippy passes with warnings only
- All 59 tests pass
Created robust validation script to check code signatures and structs against markdown documentation. Resolved existing documentation drifts in SYSTEM_ARCHITECTURE_OVERVIEW.md and contracts.md to match implementation. Integrated sync check into the GitHub Actions documentation workflow to prevent future divergence.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…etition

- test(MettaChain#154): expand load testing framework for real testnet latency
  · E2E tests with high-latency network simulation for Westend/Polkadot
  · Configurable latency profiles mirroring real testnet environments
  · Stress test scenarios covering burst and sustained load conditions
  · CI-compatible test runner with pass/fail thresholds and timeouts

- feat(MettaChain#164): implement interactive API playground
  · Web-based environment for calling contract methods against local node
  · Integrated directly into docs with live method execution support
  · Pre-configured endpoints for all major contract interactions
  · CI build step validates playground builds and loads without errors

- feat(MettaChain#194): implement property token snapshot mechanism
  · Snapshot functionality for capturing token balances at a block height
  · Designed for governance voting weight calculation
  · Immutable snapshot records prevent retroactive balance manipulation
  · Unit tests covering snapshot creation, retrieval and edge cases

- feat(MettaChain#315): add DEX trading competition system
  · Trading competition lifecycle — create, join, execute, settle
  · Reward distribution logic tied to competition leaderboard ranking
  · Competition state machine with clean start/end/claim transitions
  · Full unit and integration tests for reward edge cases

Closes MettaChain#154, Closes MettaChain#164, Closes MettaChain#194, Closes MettaChain#315
…zation-dashboard

Feat/add ci cd visualization dashboard
…ift-detection-between-code-and-docs

ci: automate architecture documentation sync check
Pr raised for Dex and Security on admin side
docs: add KindFi and Trustless Work Stellar Wave research submissions
…onitoring

feat: add memory leak monitoring for load tests
…tion-188

feat(sdk): add dynamic contract module federation
Tests bridge contracts under extreme load conditions including:
- High-volume concurrent request creation (200 users)
- Rate limiting enforcement under burst traffic
- Concurrent multi-signature collection (10 operators)
- Duplicate signature rejection under concurrency
- Full pipeline throughput benchmark (500 requests, create->sign->execute)
- Emergency pause rejecting all in-flight requests
- Expired request handling under concurrent load
- Concurrent recovery operations after expiry
- State consistency under mixed concurrent operations
- Raw throughput benchmark (10,000 requests)
- Spike load handling (300 concurrent requests)
- Multi-chain load distribution across 5 chains
- Sustained load throughput degradation check
…4-194-315-propchain-contract

feat: load testing, API playground, token snapshot & DEX trading comp…
LaGodxy and others added 27 commits April 29, 2026 09:07
…rvesting

Add tax loss harvesting recommendations
…for-fractional-owners

Add voting rights for fractional owners
…board

Add fractional ownership dashboard
…strictions

Implement KYC transfer restrictions
…ervicer-integration

Lending: implement loan servicer integration
…ortfolio-management

Lending: implement loan portfolio management
…ection

feat(insurance): implement risk assessment (MettaChain#254) and fraud detection…
…anism (MettaChain#174-181-201)

MettaChain#174 — API versioning strategy
- indexer/src/api.rs: added API_VERSION constant ('v1'), VersionResponse struct,
  api_version() handler (GET /api/v1/version), and set_api_version_header()
  Axum middleware that injects X-API-Version on every response.
- indexer/src/main.rs: moved /events and /contracts under /api/v1/ using
  Router::nest(); /health and /metrics kept at root for infra tooling;
  version middleware applied to the nested v1 router.

MettaChain#181 — Formal verification for Bridge multi-sig logic
- contracts/bridge/src/tests.rs: four property-based tests documenting and
  enforcing bridge invariants:
  property_execution_requires_minimum_signatures: execute must fail with < min sigs.
  property_no_duplicate_signatures: AlreadySigned returned on replay attempt.
  property_expired_request_rejects_signatures: RequestExpired after timeout.
  property_no_double_execution: second execute call always returns error.

MettaChain#201 — Bridge transaction rollback mechanism
- contracts/bridge/src/lib.rs: added BridgeRolledBack event (request_id,
  token_id, requester, reason, rolled_back_at) and rollback_bridge_transaction()
  message that atomically: (1) marks Recovering to prevent concurrency, (2)
  clears all signatures, (3) marks Failed, (4) emits BridgeRolledBack.
  Blocks rollback of already-Completed requests.
…MettaChain#304)

- types.rs additions (inline in lib.rs):
  ListingStatus enum: Open | OfferAccepted | Originated | Cancelled
  LoanListing struct: borrower, property_id, requested_amount, max_rate_bps,
    term_months, collateral_kind, status, created_at, accepted_offer_id
  LoanOffer struct: offer_id, listing_id, lender, offered_amount, rate_bps,
    term_months, is_accepted, created_at

- Storage: added marketplace_listings, marketplace_offers, listing_count,
  offer_count fields to PropertyLending; initialised to defaults in constructor.

- Events: LoanListingCreated, LoanOfferSubmitted, LoanOfferAccepted,
  LoanListingCancelled — all with indexed topics for off-chain indexing.

- Messages:
  create_loan_listing(): borrower publishes a request with max_rate_bps cap
  submit_loan_offer(): lender counters at or below the borrower's max rate
  accept_loan_offer(): borrower accepts offer, auto-originates LoanApplication
    with status=Active and interest_rate_bps from the offer
  cancel_loan_listing(): borrower withdraws an open listing
  get_loan_listing() / get_loan_offer(): view accessors
…4-181-201

feat: API versioning, bridge formal verification, rollback, loan marketplace (MettaChain#174-181-201-304)
MettaChain#257 Insurance: Add insurance analytics dashboard
@nanaf6203-bit
Copy link
Copy Markdown
Contributor

@Ebenezer199914 this cannot be possible.

@nanaf6203-bit
Copy link
Copy Markdown
Contributor

112k changes?
what!!!!!

@nanaf6203-bit
Copy link
Copy Markdown
Contributor

@Ebenezer199914 please stick to the task assigned to you.

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.