GetParamsFee() returns the current state of the governance params in the Fee space
()
| 340 | |
| 341 | // GetParamsFee() returns the current state of the governance params in the Fee space |
| 342 | func (s *StateMachine) GetParamsFee() (ptr *FeeParams, err lib.ErrorI) { |
| 343 | // check cache |
| 344 | if s.cache.feeParams == nil { |
| 345 | // create a new object ref for the fee params to ensure a non-nil result |
| 346 | s.cache.feeParams = new(FeeParams) |
| 347 | // get the fee parameters from state |
| 348 | err = s.getParams(ParamSpaceFee, s.cache.feeParams, ErrEmptyFeeParams) |
| 349 | } |
| 350 | // exit |
| 351 | return s.cache.feeParams, err |
| 352 | } |
| 353 | |
| 354 | // getParams() is a generic helper function loads the params for a specific ParamSpace into a ptr object |
| 355 | func (s *StateMachine) getParams(space string, ptr any, emptyErr func() lib.ErrorI) (err lib.ErrorI) { |