Skip to content

Commit

Permalink
stub out basket MsgServer
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronc committed Feb 9, 2022
1 parent 4eb5844 commit d4a8293
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
12 changes: 12 additions & 0 deletions x/ecocredit/server/basket/create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package basket

import (
"context"

baskettypes "github.com/regen-network/regen-ledger/x/ecocredit/basket"
)

func (k Keeper) Create(ctx context.Context, create *baskettypes.MsgCreate) (*baskettypes.MsgCreateResponse, error) {
//TODO implement me
panic("implement me")
}
4 changes: 4 additions & 0 deletions x/ecocredit/server/basket/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import (

"github.com/cosmos/cosmos-sdk/orm/model/ormdb"
sdk "github.com/cosmos/cosmos-sdk/types"

basketv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/basket/v1"
"github.com/regen-network/regen-ledger/x/ecocredit"
baskettypes "github.com/regen-network/regen-ledger/x/ecocredit/basket"
)

// Keeper is the basket keeper.
Expand All @@ -16,6 +18,8 @@ type Keeper struct {
ecocreditKeeper EcocreditKeeper
}

var _ baskettypes.MsgServer = Keeper{}

// NewKeeper returns a new keeper instance.
func NewKeeper(db ormdb.ModuleDB, ecocreditKeeper EcocreditKeeper, bankKeeper BankKeeper) Keeper {
basketStore, err := basketv1.NewStateStore(db)
Expand Down
12 changes: 12 additions & 0 deletions x/ecocredit/server/basket/put.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package basket

import (
"context"

baskettypes "github.com/regen-network/regen-ledger/x/ecocredit/basket"
)

func (k Keeper) Put(ctx context.Context, put *baskettypes.MsgPut) (*baskettypes.MsgPutResponse, error) {
//TODO implement me
panic("implement me")
}
12 changes: 12 additions & 0 deletions x/ecocredit/server/basket/take.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package basket

import (
"context"

baskettypes "github.com/regen-network/regen-ledger/x/ecocredit/basket"
)

func (k Keeper) Take(ctx context.Context, take *baskettypes.MsgTake) (*baskettypes.MsgTakeResponse, error) {
//TODO implement me
panic("implement me")
}
2 changes: 1 addition & 1 deletion x/ecocredit/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ func RegisterServices(configurator server.Configurator, paramSpace paramtypes.Su
}

_ = basket.NewKeeper(db, impl, bankKeeper)
// TODO register basket Msg and Query servers
// TODO Msg and Query server registration
}

0 comments on commit d4a8293

Please sign in to comment.