{"modulePath":"github.com/smartcontractkit/libocr","version":"v0.0.0-20261124122528-7112dc75ac47","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package confighelper\n\nPackage confighelper provides helpers for converting between the gethwrappers/OCR2Aggregator.SetConfig event and types.ContractConfig\n\n## Functions\n\n```go\nfunc ContractSetConfigArgsForEthereumIntegrationTest(\n\toracles []OracleIdentityExtra,\n\tf int,\n\talphaPPB uint64,\n) (\n\tsigners []common.Address,\n\ttransmitters []common.Address,\n\tf_ uint8,\n\tonchainConfig []byte,\n\toffchainConfigVersion uint64,\n\toffchainConfig []byte,\n\terr error,\n)\n```\nContractSetConfigArgsForIntegrationTest generates setConfig args for integration tests in core. Only use this for testing, \\*not\\* for production. See [ocr2config.PublicConfig](/github.com/smartcontractkit/libocr/offchainreporting2plus/internal/config/ocr2config#PublicConfig) for documentation of the arguments.\n\n```go\nfunc ContractSetConfigArgsForTests(\n\tdeltaProgress time.Duration,\n\tdeltaResend time.Duration,\n\tdeltaRound time.Duration,\n\tdeltaGrace time.Duration,\n\tdeltaStage time.Duration,\n\trMax uint8,\n\ts []int,\n\toracles []OracleIdentityExtra,\n\treportingPluginConfig []byte,\n\tmaxDurationInitialization *time.Duration,\n\tmaxDurationQuery time.Duration,\n\tmaxDurationObservation time.Duration,\n\tmaxDurationReport time.Duration,\n\tmaxDurationShouldAcceptFinalizedReport time.Duration,\n\tmaxDurationShouldTransmitAcceptedReport time.Duration,\n\n\tf int,\n\tonchainConfig []byte,\n) (\n\tsigners []types.OnchainPublicKey,\n\ttransmitters []types.Account,\n\tf_ uint8,\n\tonchainConfig_ []byte,\n\toffchainConfigVersion uint64,\n\toffchainConfig []byte,\n\terr error,\n)\n```\nContractSetConfigArgsForTests generates setConfig args from the relevant parameters. Only use this for testing, \\*not\\* for production. See [ocr2config.PublicConfig](/github.com/smartcontractkit/libocr/offchainreporting2plus/internal/config/ocr2config#PublicConfig) for documentation of the arguments.\n\n```go\nfunc ContractSetConfigArgsForTestsWithAuxiliaryArgs(\n\tdeltaProgress time.Duration,\n\tdeltaResend time.Duration,\n\tdeltaRound time.Duration,\n\tdeltaGrace time.Duration,\n\tdeltaStage time.Duration,\n\trMax uint8,\n\ts []int,\n\toracles []OracleIdentityExtra,\n\treportingPluginConfig []byte,\n\tmaxDurationInitialization *time.Duration,\n\tmaxDurationQuery time.Duration,\n\tmaxDurationObservation time.Duration,\n\tmaxDurationReport time.Duration,\n\tmaxDurationShouldAcceptFinalizedReport time.Duration,\n\tmaxDurationShouldTransmitAcceptedReport time.Duration,\n\n\tf int,\n\tonchainConfig []byte,\n\tauxiliaryArgs AuxiliaryArgs,\n) (\n\tsigners []types.OnchainPublicKey,\n\ttransmitters []types.Account,\n\tf_ uint8,\n\tonchainConfig_ []byte,\n\toffchainConfigVersion uint64,\n\toffchainConfig []byte,\n\terr error,\n)\n```\nContractSetConfigArgsForTestsWithAuxiliaryArgs generates setConfig args from the relevant parameters. Only use this for testing, \\*not\\* for production. See [ocr2config.PublicConfig](/github.com/smartcontractkit/libocr/offchainreporting2plus/internal/config/ocr2config#PublicConfig) for documentation of the arguments.\n\n## Types\n\n```go\ntype AuxiliaryArgs struct {\n\tRNG io.Reader\n}\n```\nAuxiliaryArgs provides keyword-style extra configuration for calls to ContractSetConfigArgsForTests\n\n```go\ntype OracleIdentity struct {\n\tOffchainPublicKey types.OffchainPublicKey\n\t// For EVM-chains, this an *address*.\n\tOnchainPublicKey types.OnchainPublicKey\n\tPeerID           string\n\tTransmitAccount  types.Account\n}\n```\nOracleIdentity is identical to the internal type [config.OracleIdentity](/github.com/smartcontractkit/libocr/offchainreporting2plus/internal/config#OracleIdentity). We intentionally make a copy to make potential future internal modifications easier.\n\n```go\ntype OracleIdentityExtra struct {\n\tOracleIdentity\n\tConfigEncryptionPublicKey types.ConfigEncryptionPublicKey\n}\n```\n\n```go\ntype PublicConfig struct {\n\tDeltaProgress    time.Duration\n\tDeltaResend      time.Duration\n\tDeltaRound       time.Duration\n\tDeltaGrace       time.Duration\n\tDeltaStage       time.Duration\n\tRMax             uint8\n\tS                []int\n\tOracleIdentities []OracleIdentity\n\n\tReportingPluginConfig []byte\n\n\tMaxDurationInitialization               *time.Duration\n\tMaxDurationQuery                        time.Duration\n\tMaxDurationObservation                  time.Duration\n\tMaxDurationReport                       time.Duration\n\tMaxDurationShouldAcceptFinalizedReport  time.Duration\n\tMaxDurationShouldTransmitAcceptedReport time.Duration\n\n\tF             int\n\tOnchainConfig []byte\n\tConfigDigest  types.ConfigDigest\n}\n```\nPublicConfig is identical to the internal type [ocr2config.PublicConfig](/github.com/smartcontractkit/libocr/offchainreporting2plus/internal/config/ocr2config#PublicConfig). See the documentation there for details. We intentionally duplicate the internal type to make potential future internal modifications easier.\n\n```go\nfunc PublicConfigFromContractConfig(skipResourceExhaustionChecks bool, change types.ContractConfig) (PublicConfig, error)\n```\n\n```go\nfunc (pc PublicConfig) N() int\n```\n\n","path":"github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper","name":"confighelper","synopsis":"Package confighelper provides helpers for converting between the gethwrappers/OCR2Aggregator.SetConfig event and types.ContractConfig","isRedistributable":true}
