Skip to content
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

Implement serialization for ReportFormatEVMABIEncodeUnpacked #995

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pkg/types/llo/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ const (
// ReportFormatRetirement is a special "capstone" report format to indicate
// a retired OCR instance, and handover crucial information to a new one
ReportFormatRetirement ReportFormat = 3
// ReportFormatEVMAbiEncodeUnpacked supports encoding reports with a fixed
// ReportFormatEVMABIEncodeUnpacked supports encoding reports with a fixed
// schema followed by an arbitrary ABI-encoded payload
ReportFormatEVMAbiEncodeUnpacked = 4
ReportFormatEVMABIEncodeUnpacked = 4

_ ReportFormat = math.MaxUint32 // reserved
)
Expand All @@ -66,6 +66,8 @@ func (rf ReportFormat) String() string {
return "json"
case ReportFormatRetirement:
return "retirement"
case ReportFormatEVMABIEncodeUnpacked:
return "evm_abi_encode_unpacked"
default:
return fmt.Sprintf("unknown(%d)", rf)
}
Expand All @@ -79,6 +81,8 @@ func ReportFormatFromString(s string) (ReportFormat, error) {
return ReportFormatJSON, nil
case "retirement":
return ReportFormatRetirement, nil
case "evm_abi_encode_unpacked":
return ReportFormatEVMABIEncodeUnpacked, nil
default:
return 0, fmt.Errorf("unknown report format: %q", s)
}
Expand Down
Loading