-
Notifications
You must be signed in to change notification settings - Fork 368
/
querier.go
38 lines (33 loc) · 1.15 KB
/
querier.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/rest"
)
// Querier routes for the incentive module
const (
QueryGetClaims = "claims"
RestClaimOwner = "owner"
RestClaimCollateralType = "collateral_type"
QueryGetParams = "parameters"
QueryGetRewardPeriods = "reward-periods"
QueryGetClaimPeriods = "claim-periods"
)
// QueryClaimsParams params for query /incentive/claims
type QueryClaimsParams struct {
Owner sdk.AccAddress
CollateralType string
}
// NewQueryClaimsParams returns QueryClaimsParams
func NewQueryClaimsParams(owner sdk.AccAddress, collateralType string) QueryClaimsParams {
return QueryClaimsParams{
Owner: owner,
CollateralType: collateralType,
}
}
// PostClaimReq defines the properties of claim transaction's request body.
type PostClaimReq struct {
BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
Sender sdk.AccAddress `json:"sender" yaml:"sender"`
CollateralType string `json:"collateral_type" yaml:"collateral_type"`
MultiplierName string `json:"multiplier_name" yaml:"multiplier_name"`
}