Skip to content

Commit

Permalink
test the incentive cw handlers with umee contract
Browse files Browse the repository at this point in the history
  • Loading branch information
gsk967 committed Jul 5, 2023
1 parent 3b150c4 commit 31ab62c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/wasm/query/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (plugin *Plugin) CustomQuerier() func(ctx sdk.Context, request json.RawMess
resp, err = smartcontractQuery.HandleMedianDeviations(ctx, plugin.ocQueryServer)

// incentive
case smartcontractQuery.IncentiveParams != nil:
case smartcontractQuery.IncentiveParameters != nil:
resp, err = smartcontractQuery.HandleIncentiveParams(ctx, plugin.incQueryServer)
case smartcontractQuery.TotalBonded != nil:
resp, err = smartcontractQuery.HandleTotalBonded(ctx, plugin.incQueryServer)
Expand Down
10 changes: 5 additions & 5 deletions app/wasm/query/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type UmeeQuery struct {

// incentive queries
// Incentive module params .
IncentiveParams *inctypes.QueryParams `json:"incentive_params,omitempty"`
IncentiveParameters *inctypes.QueryParams `json:"incentive_parameters,omitempty"`
// TotalBonded queries the sum of all bonded collateral uTokens.
TotalBonded *inctypes.QueryTotalBonded `json:"total_bonded,omitempty"`
// TotalUnbonding queries the sum of all unbonding collateral uTokens.
Expand All @@ -71,15 +71,15 @@ type UmeeQuery struct {
PendingRewards *inctypes.QueryPendingRewards `json:"pending_rewards,omitempty"`
// CompletedIncentivePrograms queries for all incentives programs that have been passed
// by governance,
CompletedIncentivePrograms *inctypes.QueryCompletedIncentivePrograms `json:"completed,omitempty"`
CompletedIncentivePrograms *inctypes.QueryCompletedIncentivePrograms `json:"completed_incentive_programs,omitempty"`
// OngoingIncentivePrograms queries for all incentives programs that have been passed
// by governance, funded, and started but not yet completed.
OngoingIncentivePrograms *inctypes.QueryOngoingIncentivePrograms `json:"ongoing,omitempty"`
OngoingIncentivePrograms *inctypes.QueryOngoingIncentivePrograms `json:"ongoing_incentive_programs,omitempty"`
// UpcomingIncentivePrograms queries for all incentives programs that have been passed
// by governance, but not yet started. They may or may not have been funded.
UpcomingIncentivePrograms *inctypes.QueryUpcomingIncentivePrograms `json:"upcoming,omitempty"`
UpcomingIncentivePrograms *inctypes.QueryUpcomingIncentivePrograms `json:"upcoming_incentive_programs,omitempty"`
// IncentiveProgram queries a single incentive program by ID.
IncentiveProgram *inctypes.QueryIncentiveProgram `json:"program,omitempty"`
IncentiveProgram *inctypes.QueryIncentiveProgram `json:"incentive_program,omitempty"`
// CurrentRates queries the hypothetical return of a bonded uToken denomination
// if current incentive rewards continued for one year. The response is an sdk.Coins
// of base token rewards, per reference amount (usually 10^exponent of the uToken.)
Expand Down
2 changes: 1 addition & 1 deletion app/wasm/test/umee_cw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (s *IntegrationTestSuite) TestIncentiveQueries() {
{
Name: "incentive query params",
CQ: s.genCustomQuery(wq.UmeeQuery{
IncentiveParams: &inctypes.QueryParams{},
IncentiveParameters: &inctypes.QueryParams{},
}),
ResponseCheck: func(data []byte) {
var rr inctypes.QueryParamsResponse
Expand Down
Binary file modified tests/artifacts/umee_cosmwasm-aarch64.wasm
Binary file not shown.

0 comments on commit 31ab62c

Please sign in to comment.