MCPcopy Create free account
hub / github.com/Sifchain/sifnode / readPoolsJSON

Function readPoolsJSON

x/margin/client/cli/tx.go:310–322  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

308}
309
310func readPoolsJSON(filename string) ([]string, error) {
311 var pools []string
312 bz, err := ioutil.ReadFile(filename)
313 if err != nil {
314 return []string{}, err
315 }
316 err = json.Unmarshal(bz, &pools)
317 if err != nil {
318 return []string{}, err
319 }
320
321 return pools, nil
322}
323
324func GetUpdateRowanCollateralCmd() *cobra.Command {
325 cmd := &cobra.Command{

Callers 1

GetUpdatePoolsCmdFunction · 0.85

Calls 1

UnmarshalMethod · 0.45

Tested by

no test coverage detected