Skip to content

IRISHUB-327:generate the param.json file#257

Merged
wukongcheng merged 3 commits intoirisnet:feature/govfrom
MrXJC:jiacheng/gov
Sep 19, 2018
Merged

IRISHUB-327:generate the param.json file#257
wukongcheng merged 3 commits intoirisnet:feature/govfrom
MrXJC:jiacheng/gov

Conversation

@MrXJC
Copy link
Contributor

@MrXJC MrXJC commented Sep 19, 2018

cat param.json

{
  "gov": {
    "Gov/gov/depositProcedure": {
      "min_deposit": [
        {
          "denom": "iris-atto",
          "amount": "10000000000000000000"
        }
      ],
      "max_deposit_period": "20"
    }
  }
}

var (
flagModule = "module"
flagKey = "key"
flagHome = "home"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this flag has been defined before

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a common flag. And should be in client/flags.go


ctx := context.NewCLIContext().WithCodec(cdc)

if homeStr != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

homeStr always has a default value


} else {
return nil
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else { return nil } can be removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And should print msg as "no params can be found"

}

fmt.Println("No GovParams can be found")
return nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return error

@wukongcheng wukongcheng merged commit 7f69414 into irisnet:feature/gov Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants