feegrant
The feegrant
module is responsible for allowing accounts to grant fee allowances and to use fees from their accounts. Grantees can execute any transaction without the need to maintain sufficient fees.
For more information, visit https://docs.cosmos.network/main/modules/feegrant/
Message Types
Msg
defines the feegrant msg service.
_10 // GrantAllowance grants fee allowance to the grantee on the granter's
_10 // account with the provided expiration time.
_10 rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse);
_10 // RevokeAllowance revokes any fee allowance of granter's account that
_10 // has been granted to the grantee.
_10 rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse);
MsgGrantAllowance
MsgGrantAllowance
adds permission for Grantee to spend up to Allowance of fees from the account of Granter.
_12message MsgGrantAllowance {
_12 option (cosmos.msg.v1.signer) = "granter";
_12 // granter is the address of the user granting an allowance of their funds.
_12 string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
_12 // grantee is the address of the user being granted an allowance of another user's funds.
_12 string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
_12 // allowance can be any of basic, periodic, allowed fee allowance.
_12 google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
MsgGrantAllowanceResponse
MsgGrantAllowanceResponse
defines the Msg/GrantAllowanceResponse
response type.
_1message MsgGrantAllowanceResponse {}
MsgRevokeAllowance
MsgRevokeAllowance
removes any existing Allowance from Granter to Grantee.
_9message MsgRevokeAllowance {
_9 option (cosmos.msg.v1.signer) = "granter";
_9 // granter is the address of the user granting an allowance of their funds.
_9 string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
_9 // grantee is the address of the user being granted an allowance of another user's funds.
_9 string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
MsgRevokeAllowanceResponse
MsgRevokeAllowanceResponse
defines the Msg/RevokeAllowanceResponse
response type.
_1message MsgRevokeAllowanceResponse {}
Queries
Query
defines the gRPC querier service.
_18 // Allowance returns fee granted to the grantee by the granter.
_18 rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) {
_18 option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}";
_18 // Allowances returns all the grants for address.
_18 rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) {
_18 option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}";
_18 // AllowancesByGranter returns all the grants given by an address
_18 rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) {
_18 option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}";
QueryAllowanceRequest
QueryAllowanceRequest
is the request type for the Query/Allowance RPC method.
_7message QueryAllowanceRequest {
_7 // granter is the address of the user granting an allowance of their funds.
_7 string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
_7 // grantee is the address of the user being granted an allowance of another user's funds.
_7 string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
QueryAllowanceResponse
QueryAllowanceResponse
is the response type for the Query/Allowance
RPC method.
_4message QueryAllowanceResponse {
_4 // allowance is a allowance granted for grantee by granter.
_4 cosmos.feegrant.v1beta1.Grant allowance = 1;
QueryAllowancesRequest
QueryAllowancesRequest
is the request type for the Query/Allowances
RPC method.
_6message QueryAllowancesRequest {
_6 string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
_6 // pagination defines an pagination for the request.
_6 cosmos.base.query.v1beta1.PageRequest pagination = 2;
QueryAllowancesResponse
QueryAllowancesResponse
is the response type for the Query/Allowances
RPC method.
_7message QueryAllowancesResponse {
_7 // allowances are allowance's granted for grantee by granter.
_7 repeated cosmos.feegrant.v1beta1.Grant allowances = 1;
_7 // pagination defines an pagination for the response.
_7 cosmos.base.query.v1beta1.PageResponse pagination = 2;
QueryAllowancesByGranterRequest
QueryAllowancesByGranterRequest
is the request type for the Query/AllowancesByGranter
RPC method.
_6message QueryAllowancesByGranterRequest {
_6 string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
_6 // pagination defines an pagination for the request.
_6 cosmos.base.query.v1beta1.PageRequest pagination = 2;
QueryAllowancesByGranterResponse
QueryAllowancesByGranterResponse
is the response type for the Query/AllowancesByGranter
RPC method.
_7message QueryAllowancesByGranterResponse {
_7 // allowances that have been issued by the granter.
_7 repeated cosmos.feegrant.v1beta1.Grant allowances = 1;
_7 // pagination defines an pagination for the response.
_7 cosmos.base.query.v1beta1.PageResponse pagination = 2;