@@ -28,6 +28,11 @@ type Configurer struct {
28
28
}
29
29
30
30
// NewConfigurer creates a new Configurer for Solana chains.
31
+ //
32
+ // options:
33
+ //
34
+ // WithDoNotSendInstructionsOnChain: when selected, the Configurer instance will not
35
+ // send the Solana instructions to the blockchain.
31
36
func NewConfigurer (
32
37
client * rpc.Client , auth solana.PrivateKey , chainSelector types.ChainSelector , options ... configurerOption ,
33
38
) * Configurer {
@@ -53,7 +58,15 @@ func WithDoNotSendInstructionsOnChain() configurerOption {
53
58
}
54
59
55
60
// SetConfig sets the configuration for the MCM contract on the Solana chain.
56
- func (c * Configurer ) SetConfig (ctx context.Context , mcmAddress string , cfg * types.Config , clearRoot bool ) (types.TransactionResult , error ) {
61
+ //
62
+ // The list of instructions needed to set the configuration is returned in the
63
+ // `RawData` field. And if the instructions were sent on chain (which they are
64
+ // unless the `WithDoNotSendInstructionsOnChain` option was selected in the
65
+ // constructor), the signature of the last instruction is returned in the
66
+ // `Hash` field.
67
+ func (c * Configurer ) SetConfig (
68
+ ctx context.Context , mcmAddress string , cfg * types.Config , clearRoot bool ,
69
+ ) (types.TransactionResult , error ) {
57
70
programID , pdaSeed , err := ParseContractAddress (mcmAddress )
58
71
if err != nil {
59
72
return types.TransactionResult {}, err
0 commit comments