Skip to content

Conversation

andrejrakic
Copy link
Collaborator

This PR bumps versions of chainlink_data_streams_report and chainlink_data_streams_sdk crates to v1.0.3 and adds the following Report Schemas to Rust SDK:

v5

const reportBlobAbiV5 = [
  { type: 'bytes32', name: 'feedId' },
  { type: 'uint32', name: 'validFromTimestamp' },
  { type: 'uint32', name: 'observationsTimestamp' },
  { type: 'uint192', name: 'nativeFee' },
  { type: 'uint192', name: 'linkFee' },
  { type: 'uint32', name: 'expiresAt' },
  { type: 'int192', name: 'rate' },
  { type: 'uint32', name: 'timestamp' },
  { type: 'uint32', name: 'duration' },
]

v6

const reportBlobAbiV6 = [
  { type: 'bytes32', name: 'feedId' },
  { type: 'uint32', name: 'validFromTimestamp' },
  { type: 'uint32', name: 'observationsTimestamp' },
  { type: 'uint192', name: 'nativeFee' },
  { type: 'uint192', name: 'linkFee' },
  { type: 'uint32', name: 'expiresAt' },
  { type: 'int192', name: 'price' },
  { type: 'int192', name: 'price2' },
  { type: 'int192', name: 'price3' },
  { type: 'int192', name: 'price4' },
  { type: 'int192', name: 'price5' },
]

v7

const reportBlobAbiV7 = [
  { type: 'bytes32', name: 'feedId' },
  { type: 'uint32', name: 'validFromTimestamp' },
  { type: 'uint32', name: 'observationsTimestamp' },
  { type: 'uint192', name: 'nativeFee' },
  { type: 'uint192', name: 'linkFee' },
  { type: 'uint32', name: 'expiresAt' },
  { type: 'int192', name: 'exchangeRate' },
]

@andrejrakic andrejrakic requested a review from Copilot August 8, 2025 12:11
@andrejrakic andrejrakic self-assigned this Aug 8, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for three new report schemas (v5, v6, and v7) to the Rust Data Streams SDK and bumps the version to 1.0.3.

  • Implements ReportDataV5 with rate/timestamp/duration fields for interest rate data
  • Implements ReportDataV6 with multiple price fields (price through price5) for multi-price feeds
  • Implements ReportDataV7 with exchange rate field for currency conversion data

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rust/crates/sdk/Cargo.toml Updates SDK version to 1.0.3 and report dependency version
rust/crates/report/Cargo.toml Updates report crate version to 1.0.3
rust/crates/report/src/report.rs Adds module declarations and comprehensive tests for v5/v6/v7 schemas
rust/crates/report/src/report/v5.rs Implements ReportDataV5 with ABI encoding/decoding for rate data
rust/crates/report/src/report/v6.rs Implements ReportDataV6 with ABI encoding/decoding for multi-price data
rust/crates/report/src/report/v7.rs Implements ReportDataV7 with ABI encoding/decoding for exchange rate data
rust/README.md Updates documentation to reference version 1.0.3

@andrejrakic andrejrakic marked this pull request as ready for review August 8, 2025 12:54
@andrejrakic andrejrakic merged commit b271d52 into main Aug 8, 2025
6 checks passed
@andrejrakic andrejrakic deleted the rust/add-v5-v6-v7-schemas branch August 8, 2025 16:34
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.

2 participants