Skip to content

Commit

Permalink
ccip: add report info to exec calldata.
Browse files Browse the repository at this point in the history
  • Loading branch information
winder committed Dec 18, 2024
1 parent 75d720b commit 5935cb2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/capabilities/ccip/ocrimpls/contract_transmitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types"

"github.com/smartcontractkit/chainlink-ccip/pkg/consts"
"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
commontypes "github.com/smartcontractkit/chainlink-common/pkg/types"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key"
)
Expand Down Expand Up @@ -69,12 +70,19 @@ func ToExecCalldata(
// WARNING: Be careful if you change the data types.
// Using a different type e.g. `type Foo [32]byte` instead of `[32]byte`
// will trigger undefined chainWriter behavior, e.g. transactions submitted with wrong arguments.
info, err := ccipocr3.DecodeExecuteReportInfo(report.Info)
if err != nil {
return nil, err
}

return struct {
ReportContext [2][32]byte
Report []byte
Info ccipocr3.ExecuteReportInfo
}{
ReportContext: rawReportCtx,
Report: report.Report,
Info: info,
}, nil
}

Expand Down

0 comments on commit 5935cb2

Please sign in to comment.