diff --git a/proto/cosmos/feegrant/v1beta1/feegrant.proto b/proto/cosmos/feegrant/v1beta1/feegrant.proto index 769490c59..eca71e2b9 100644 --- a/proto/cosmos/feegrant/v1beta1/feegrant.proto +++ b/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -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"]; } diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto index 16dd1a920..a12d9aaab 100644 --- a/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -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"]; } diff --git a/x/feegrant/feegrant.pb.go b/x/feegrant/feegrant.pb.go index 4b75f267a..5d764e84b 100644 --- a/x/feegrant/feegrant.pb.go +++ b/x/feegrant/feegrant.pb.go @@ -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"` } diff --git a/x/feegrant/spec/01_concepts.md b/x/feegrant/spec/01_concepts.md index a4571f8a9..523ff3e94 100644 --- a/x/feegrant/spec/01_concepts.md +++ b/x/feegrant/spec/01_concepts.md @@ -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. diff --git a/x/feegrant/tx.pb.go b/x/feegrant/tx.pb.go index af208f286..be7c9cfd4 100644 --- a/x/feegrant/tx.pb.go +++ b/x/feegrant/tx.pb.go @@ -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"` }