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

docs(core):add comments for funcs #14842

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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: 8 additions & 0 deletions core/capabilities/ccip/ccipevm/executecodec.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ func NewExecutePluginCodecV1() *ExecutePluginCodecV1 {
}
}

// Encode serializes the CommitPluginReport into a byte array.
// Parameters:
// - ctx: The context for controlling the lifetime of the request.
// - report: The CommitPluginReport containing information to be encoded,
// including Merkle roots, RMN signatures, and price updates.
// Returns:
// - A byte array containing the encoded commit report, excluding the first
// four bytes.
func (e *ExecutePluginCodecV1) Encode(ctx context.Context, report cciptypes.ExecutePluginReport) ([]byte, error) {
evmReport := make([]offramp.InternalExecutionReport, 0, len(report.ChainReports))

Expand Down
7 changes: 7 additions & 0 deletions core/capabilities/compute/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ type ParsedConfig struct {

type transformer struct{}

// Transform processes the input map and extracts various configuration values,
// returning a parsed configuration object.
// Parameters:
// - in: A pointer to a values.Map containing the input data to be transformed.
// - opts: Optional functional parameters that can modify the ParsedConfig.
// Returns:
// - A pointer to the ParsedConfig containing the transformed values.
func (t *transformer) Transform(in *values.Map, opts ...func(*ParsedConfig)) (*ParsedConfig, error) {
binary, err := popValue[[]byte](in, binaryKey)
if err != nil {
Expand Down