You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Authz is one of those things that creates a whole new set of use cases on Cosmos chains. Validators provide auto-compounding services. You can give your hot wallet permissions to vote with the stake from your cold wallet. The list goes on.
One of pains when using Authz with CLI's in a multi-chain world is that you have to maintain multiple binaries and keyrings (one for each chain).
If the ignite cli could provide a single CLI where you could interact with any authz-enabled cosmos chain (obviously, also including local ones you are developing and testing against) it would be valuable for end-users, validators and anyone wanting to create automation scripts much easier.
The solution is similar to what is outlined for the ignite node bank commands (#2489).
Implement the following commands:
ignite node query authz grantee-grants
ignite node query authz granter-grants
ignite node query authz grants
ignite node tx authz exec
ignite node tx authz grant
ignite node tx authz revoke
All the commands need the --rpc flag.
The query commands also need the pagination flags.
The tx commands also need gas, keyring and --generate-only flags
Take a look at for instance the gaiad query/tx authz command commands to see which other flags we might need. You can also look at the flags implemented for ignite node query bank balances and ignite node tx bank send to see what some of the basic flags are and how they are implemented.
For the grant and revoke commands, notice especially the --msg-type, --spend-limit, --expiration, --allowed-validators and --deny-validators flags
Please note that we need to define their respective top level commands for the above commands.
In the ignite/cmd package we should create a file for each command (some already exist):
ignite node tx authz grant [cosmos... / or / account-name ] generic --msg-type --node https://rpc.cosmos.network:443
account-name above and also the value of --from taken from the account names when you use ignite account command set.
These balances and send commands pretty similar to the ones in gaiad but with an exception that we need to make them compatible with all Cosmos-SDK based chains and make it use accounts from ignite account.
Make sure to add an integration test that will:
Scaffold a chain with a custom address prefix
Grant different types of grants <authorization_type="send"|"generic"|"delegate"|"unbond"|"redelegate">
Query the grants
Execute a ignite node tx authz exec command with the output from the ignite node tx bank send command (by using --generate-only and putting the output in a file)
Revoke grant
Try to execute again and see that it fails
The text was updated successfully, but these errors were encountered:
Authz is one of those things that creates a whole new set of use cases on Cosmos chains. Validators provide auto-compounding services. You can give your hot wallet permissions to vote with the stake from your cold wallet. The list goes on.
One of pains when using Authz with CLI's in a multi-chain world is that you have to maintain multiple binaries and keyrings (one for each chain).
If the ignite cli could provide a single CLI where you could interact with any authz-enabled cosmos chain (obviously, also including local ones you are developing and testing against) it would be valuable for end-users, validators and anyone wanting to create automation scripts much easier.
The solution is similar to what is outlined for the
ignite node bank
commands (#2489).Implement the following commands:
ignite node query authz grantee-grants
ignite node query authz granter-grants
ignite node query authz grants
ignite node tx authz exec
ignite node tx authz grant
ignite node tx authz revoke
All the commands need the
--rpc
flag.The query commands also need the pagination flags.
The tx commands also need gas, keyring and
--generate-only
flagsTake a look at for instance the
gaiad query/tx authz command
commands to see which other flags we might need. You can also look at the flags implemented forignite node query bank balances
andignite node tx bank send
to see what some of the basic flags are and how they are implemented.For the grant and revoke commands, notice especially the
--msg-type
,--spend-limit
,--expiration
,--allowed-validators
and--deny-validators
flagsPlease note that we need to define their respective top level commands for the above commands.
In the ignite/cmd package we should create a file for each command (some already exist):
You need to initialize ignite/pkg/cosmosclient inside ignite/cmd and have all the business logic implement there for these new commands.
So we need to implement the functions inside the cosmosclient package. Look at how this is already done for the bank commands.
These commands should be able to be used for any chain.
Sample usages:
ignite node q authz granter-grants [cosmos... / or / account-name ] --node https://rpc.cosmos.network:443
ignite node tx authz grant [cosmos... / or / account-name ] generic --msg-type --node https://rpc.cosmos.network:443
account-name above and also the value of --from taken from the account names when you use ignite account command set.
These balances and send commands pretty similar to the ones in gaiad but with an exception that we need to make them compatible with all Cosmos-SDK based chains and make it use accounts from ignite account.
Make sure to add an integration test that will:
ignite node tx authz exec
command with the output from theignite node tx bank send
command (by using--generate-only
and putting the output in a file)The text was updated successfully, but these errors were encountered: