Midnight-js-2.1.0 has now been released and open-sourced, introducing block time for Midnight smart contracts utilising Compact.
Key Changes and Highlights
-
Block Time Access: Added secondsSinceLastEpoch value to QueryContext in Compact programs to retrieve current block time within contracts
-
E2E Test Documentation: Comprehensive README for end-to-end testing setup and usage
-
Enhanced Testing Framework: New block time API tests and improved contract testing capabilities
-
Import Sorting: ESLint configuration now includes automatic import sorting for better code organization
To use the newly released midnight-js 2.1.0 version, please ensure you update the necessary components using the version details in the compatibility matrix below.
Please ensure you update the necessary components using the version details in the compatibility matrix: https://docs.midnight.network/relnotes/comp-matrix
Link to Midnight.js open sourced repo: https://github.com/midnightntwrk/midnight-js
Release details available here: https://github.com/midnightntwrk/midnight-js/releases/tag/v2.1.0