4141 ValidatorAddrString string
4242 Encoding junoparams.EncodingConfig
4343 GasPrices string
44+ FeeGrantAddress string
4445 GasAdjustment float64
4546 GRPCEndpoint string
4647 KeyringPassphrase string
@@ -67,6 +68,7 @@ func NewOracleClient(
6768 grpcEndpoint string ,
6869 gasAdjustment float64 ,
6970 gasPrice string ,
71+ feeGrantAddress string ,
7072) (OracleClient , error ) {
7173
7274 oracleAddr , err := sdk .AccAddressFromBech32 (oracleAddrString )
@@ -89,6 +91,7 @@ func NewOracleClient(
8991 GasAdjustment : gasAdjustment ,
9092 GRPCEndpoint : grpcEndpoint ,
9193 GasPrices : gasPrice ,
94+ FeeGrantAddress : feeGrantAddress ,
9295 }
9396
9497 clientCtx , err := oracleClient .CreateClientContext ()
@@ -164,6 +167,13 @@ func (oc OracleClient) BroadcastTx(nextBlockHeight, timeoutHeight int64, msgs ..
164167
165168 // set last check height to latest block height
166169 lastCheckHeight = latestBlockHeight
170+ if oc .FeeGrantAddress != "" {
171+ feeGrandAccAddress , err := sdk .AccAddressFromBech32 (oc .FeeGrantAddress )
172+ if err != nil {
173+ return err
174+ }
175+ clientCtx = clientCtx .WithFeeGranterAddress (feeGrandAccAddress )
176+ }
167177
168178 resp , err := BroadcastTx (clientCtx , factory , oc .GasPrices , msgs ... )
169179 if resp != nil && resp .Code != 0 {
0 commit comments