@@ -77,18 +77,12 @@ type wrappedMintReport struct {
7777// chainSelector represents the chain selector type, mimics the ChainSelector type in the SM plugin repo
7878type chainSelector uint64
7979
80- type SolanaConfig struct {
81- // Add Solana-specific configuration fields here
82- AccountContext solana.AccountMetaSlice `mapstructure:"remaining_accounts"`
83- }
84-
8580// SecureMintAggregatorConfig is the config for the SecureMint aggregator.
8681// This aggregator is designed to pick out reports for a specific chain selector.
8782type SecureMintAggregatorConfig struct {
8883 // TargetChainSelector is the chain selector to look for
8984 TargetChainSelector chainSelector `mapstructure:"targetChainSelector"`
9085 DataID [16 ]byte `mapstructure:"dataID"`
91- Solana SolanaConfig `mapstructure:"solana"`
9286}
9387
9488// ToMap converts the SecureMintAggregatorConfig to a values.Map, which is suitable for the
@@ -154,7 +148,6 @@ func newEVMReportFormatter(chainSelector chainSelector, config SecureMintAggrega
154148type solanaReportFormatter struct {
155149 targetChainSelector chainSelector
156150 dataID [16 ]byte
157- onReportAccounts solana.AccountMetaSlice
158151}
159152
160153func (f * solanaReportFormatter ) packReport (lggr logger.Logger , wreport * wrappedMintReport ) (* values.Map , error ) {
@@ -171,7 +164,7 @@ func (f *solanaReportFormatter) packReport(lggr logger.Logger, wreport *wrappedM
171164 for _ , acc := range wreport .solanaAccountContext {
172165 accounts = append (accounts , acc .PublicKey [:]... )
173166 }
174- lggr .Debugf ("accounts length: %d" , len (accounts ))
167+ lggr .Debugf ("accounts length: %d" , len (wreport . solanaAccountContext ))
175168 accountContextHash := sha256 .Sum256 (accounts )
176169 lggr .Debugw ("calculated account context hash" , "accountContextHash" , accountContextHash )
177170
@@ -186,6 +179,7 @@ func (f *solanaReportFormatter) packReport(lggr logger.Logger, wreport *wrappedM
186179 SolDataIDOutputFieldName : f .dataID ,
187180 },
188181 }
182+ lggr .Debugf ("pass dataID %x" , f .dataID )
189183
190184 wrappedReport , err := values .NewMap (map [string ]any {
191185 TopLevelAccountCtxHashFieldName : accountContextHash ,
@@ -200,7 +194,7 @@ func (f *solanaReportFormatter) packReport(lggr logger.Logger, wreport *wrappedM
200194}
201195
202196func newSolanaReportFormatter (chainSelector chainSelector , config SecureMintAggregatorConfig ) chainReportFormatter {
203- return & solanaReportFormatter {targetChainSelector : chainSelector , onReportAccounts : config . Solana . AccountContext , dataID : config .DataID }
197+ return & solanaReportFormatter {targetChainSelector : chainSelector , dataID : config .DataID }
204198}
205199
206200// chainReportFormatterBuilder is a function that returns a chainReportFormatter for a given chain selector and config
@@ -407,9 +401,8 @@ func (a *SecureMintAggregator) createOutcome(lggr logger.Logger, report *wrapped
407401// parseSecureMintConfig parses the user-facing, type-less, SecureMint aggregator config into the internal typed config.
408402func parseSecureMintConfig (config values.Map ) (SecureMintAggregatorConfig , error ) {
409403 type rawConfig struct {
410- TargetChainSelector string `mapstructure:"targetChainSelector"`
411- DataID string `mapstructure:"dataID"`
412- Solana SolanaConfig `mapstructure:"solana"`
404+ TargetChainSelector string `mapstructure:"targetChainSelector"`
405+ DataID string `mapstructure:"dataID"`
413406 }
414407
415408 var rawCfg rawConfig
@@ -442,18 +435,9 @@ func parseSecureMintConfig(config values.Map) (SecureMintAggregatorConfig, error
442435 return SecureMintAggregatorConfig {}, fmt .Errorf ("dataID must be 16 bytes, got %d" , len (decodedDataID ))
443436 }
444437
445- if len (rawCfg .Solana .AccountContext ) > 0 {
446- for _ , acc := range rawCfg .Solana .AccountContext {
447- if acc .PublicKey == [32 ]byte {} {
448- return SecureMintAggregatorConfig {}, errors .New ("solana account context public key must not be all zeros" )
449- }
450- }
451- }
452-
453438 parsedConfig := SecureMintAggregatorConfig {
454439 TargetChainSelector : chainSelector (sel ),
455440 DataID : [16 ]byte (decodedDataID ),
456- Solana : rawCfg .Solana ,
457441 }
458442
459443 return parsedConfig , nil
0 commit comments