Skip to content

Sync fairmint/OCP Changes #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 29, 2025
Merged

Sync fairmint/OCP Changes #102

merged 13 commits into from
Jul 29, 2025

Conversation

AdamMomen
Copy link
Collaborator

Summary

This update refactors the database schema and API to be more efficient and removes the redundant HistoricalTransaction collection. It also streamlines the migration script for better automation. For more info check #95.

Changes

  • Removed HistoricalTransaction Collection: Eliminated the centralized HistoricalTransaction model and its associated database operations.
  • Added tx_hash to Transaction Objects: All transaction documents (e.g., StockIssuance, StockCancellation) now store the on-chain transaction hash directly.
  • New StockCancellation Model: Introduced a new model and database operations for handling stock cancellations.
  • Streamlined Migration Script: Removed interactive environment confirmations to make the migrate.js script more automatable and introduced an ISSUERS_TO_MIGRATE list for targeted migrations.
  • API Updates: Endpoints that create on-chain transactions now return the tx_hash in the response body.
  • Code Cleanup:
    • Refactored the Factory schema for clarity.
    • Corrected a typo from removeAllListeners to reamoveAllListeners.

@AdamMomen AdamMomen self-assigned this Jul 29, 2025
@AdamMomen AdamMomen added the enhancement New feature or request label Jul 29, 2025
@AdamMomen AdamMomen merged commit 63df00d into dev Jul 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant