-
Notifications
You must be signed in to change notification settings - Fork 51
/
querier.go
40 lines (34 loc) · 906 Bytes
/
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
39
40
package types
import sdk "github.com/cosmos/cosmos-sdk/types"
// Querier routes for the oracle module
const (
QueryOperator = "operator"
QueryOperators = "operators"
QueryWithdrawals = "withdrawals"
QueryTask = "task"
QueryResponse = "response"
)
type QueryTaskParams struct {
Contract string
Function string
}
// NewQueryTaskParams returns a QueryTaskParams object.
func NewQueryTaskParams(contract string, function string) QueryTaskParams {
return QueryTaskParams{
Contract: contract,
Function: function,
}
}
type QueryResponseParams struct {
Contract string
Function string
Operator sdk.AccAddress
}
// NewQueryResponseParams returns a QueryResponseParams.
func NewQueryResponseParams(contract string, function string, operator sdk.AccAddress) QueryResponseParams {
return QueryResponseParams{
Contract: contract,
Function: function,
Operator: operator,
}
}