docs: update feegrant `AllowedFeeAllowance` docs (#11344)
## Description Closes: #11346 --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
This commit is contained in:
parent
cf46f56d64
commit
142cf67978
|
@ -58,7 +58,7 @@ message AllowedMsgAllowance {
|
|||
option (gogoproto.goproto_getters) = false;
|
||||
option (cosmos_proto.implements_interface) = "FeeAllowanceI";
|
||||
|
||||
// allowance can be any of basic and filtered fee allowance.
|
||||
// allowance can be any of basic and periodic fee allowance.
|
||||
google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||
|
||||
// allowed_messages are the messages for which the grantee has the access.
|
||||
|
@ -73,6 +73,6 @@ message Grant {
|
|||
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||
string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// allowance can be any of basic and filtered fee allowance.
|
||||
// allowance can be any of basic, periodic, allowed fee allowance.
|
||||
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ message MsgGrantAllowance {
|
|||
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||
string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// allowance can be any of basic and filtered fee allowance.
|
||||
// allowance can be any of basic, periodic, allowed fee allowance.
|
||||
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ func (m *PeriodicAllowance) GetPeriodReset() time.Time {
|
|||
|
||||
// AllowedMsgAllowance creates allowance only for specified message types.
|
||||
type AllowedMsgAllowance struct {
|
||||
// allowance can be any of basic and filtered fee allowance.
|
||||
// allowance can be any of basic and periodic fee allowance.
|
||||
Allowance *types1.Any `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"`
|
||||
// allowed_messages are the messages for which the grantee has the access.
|
||||
AllowedMessages []string `protobuf:"bytes,2,rep,name=allowed_messages,json=allowedMessages,proto3" json:"allowed_messages,omitempty"`
|
||||
|
@ -224,7 +224,7 @@ type Grant struct {
|
|||
Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
|
||||
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||
Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
|
||||
// allowance can be any of basic and filtered fee allowance.
|
||||
// allowance can be any of basic, periodic, allowed fee allowance.
|
||||
Allowance *types1.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ There are two types of fee allowances present at the moment:
|
|||
|
||||
* `BasicAllowance`
|
||||
* `PeriodicAllowance`
|
||||
* `AllowedMsgAllowance`
|
||||
|
||||
## BasicAllowance
|
||||
|
||||
|
@ -49,6 +50,16 @@ There are two types of fee allowances present at the moment:
|
|||
|
||||
* `period_reset` keeps track of when a next period reset should happen.
|
||||
|
||||
## AllowedMsgAllowance
|
||||
|
||||
`AllowedMsgAllowance` is a fee allowance, it can be any of `BasicFeeAllowance`, `PeriodicAllowance` but restricted only to the allowed messages mentioned by the granter.
|
||||
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/proto/cosmos/feegrant/v1beta1/feegrant.proto#L55-L65
|
||||
|
||||
* `allowance` is either `BasicAllowance` or `PeriodicAllowance`.
|
||||
|
||||
* `allowed_messages` is array of messages allowed to execute the given allowance.
|
||||
|
||||
## FeeGranter flag
|
||||
|
||||
`feegrant` module introduces a `FeeGranter` flag for CLI for the sake of executing transactions with fee granter. When this flag is set, `clientCtx` will append the granter account address for transactions generated through CLI.
|
||||
|
|
|
@ -37,7 +37,7 @@ type MsgGrantAllowance struct {
|
|||
Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
|
||||
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||
Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
|
||||
// allowance can be any of basic and filtered fee allowance.
|
||||
// allowance can be any of basic, periodic, allowed fee allowance.
|
||||
Allowance *types.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue