Skip to content

Conversation

andrejrakic
Copy link
Collaborator

This PR adds the following Report Schemas to Go 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:51
@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 Report Schema implementations for data stream versions v5, v6, and v7 to the Go SDK. These schemas handle different data structures for financial feeds including exchange rates, multiple price points, and rate/duration data.

  • Implements three new report schema versions (v5, v6, v7) with corresponding data structures and ABI definitions
  • Adds comprehensive test coverage for encoding/decoding operations for all new schemas
  • Updates the core report type union and feed version constants to include the new versions

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go/report/v5/data.go Implements v5 schema with rate, timestamp, and duration fields
go/report/v5/data_test.go Test coverage for v5 data encoding/decoding
go/report/v6/data.go Implements v6 schema with five price fields (price, price2-5)
go/report/v6/data_test.go Test coverage for v6 data encoding/decoding
go/report/v7/data.go Implements v7 schema with single exchangeRate field
go/report/v7/data_test.go Test coverage for v7 data encoding/decoding
go/report/report.go Updates Data type union to include v5, v6, v7 data types
go/report/report_test.go Adds integration tests and test data for all new schema versions
go/feed/feed.go Adds FeedVersion5, FeedVersion6, FeedVersion7 constants
Comments suppressed due to low confidence (1)

@andrejrakic andrejrakic marked this pull request as ready for review August 8, 2025 12:55
@andrejrakic andrejrakic merged commit fb56ce0 into main Aug 8, 2025
6 checks passed
@andrejrakic andrejrakic deleted the go/add-v5-v6-v7-schemas branch August 8, 2025 18:28
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