burrow icon indicating copy to clipboard operation
burrow copied to clipboard

[Docs] GovTx usage

Open conanoc opened this issue 6 years ago • 1 comments

I could not find how to use GovTx. It would be helpful if there is an example changing the permission of an account.

conanoc avatar Oct 28 '19 08:10 conanoc

This could do with being documented.

There are three ways to change permissions currently:

  1. Using permission SNatives via smart contract (provided the callee has appropriate setBase/setGlobal moderator permissions)
  2. Sending a PermissionTx
  3. Using GovTx

GovTx is a bit of a big pointy stick if you just want to change permissions - it's an all-powerful transaction often only granted to a system account as part of our proposal mechanism.

See here for setting permission via a permissions tx with burrow deploy:

https://github.com/hyperledger/burrow/tree/master/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries

Here for generating a govtx:

https://github.com/hyperledger/burrow/tree/master/tests/jobs_fixtures/app48-govern-account

Both can be done programmatically, see for example:

https://github.com/hyperledger/burrow/blob/3920ee3e401fd18c7bff62b42b5d27a8a33d61f3/txs/payload/gov_tx.go#L60

Sorry to drop you off in the deep end with this - I would love to have better starter documentation here, but hopefully with those links you can see the usage. If you are able to contribute some documentation that would have scratched your itch it is much appreciated.

silasdavis avatar Oct 30 '19 11:10 silasdavis