Skip to content

Commit

Permalink
refactor: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mennatnaga committed Dec 1, 2023
1 parent bcf9d18 commit 87e92ad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 34 deletions.
20 changes: 0 additions & 20 deletions deploy.sh

This file was deleted.

5 changes: 5 additions & 0 deletions scripts/local_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,10 @@ $BIN keys add satoshi --keyring-backend test
ADDR=$($BIN keys show satoshi --keyring-backend test -a)
$BIN add-genesis-account $ADDR 100000000000000000seda --keyring-backend test
$BIN gentx satoshi 10000000000000000seda --keyring-backend test

$BIN keys add acc1 --keyring-backend test
ADDR=$($BIN keys show acc1 --keyring-backend test -a)
$BIN add-genesis-account $ADDR 100000000000000000seda --keyring-backend test

$BIN collect-gentxs
$BIN start
8 changes: 0 additions & 8 deletions x/randomness/keeper/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,10 @@ import (
"github.com/sedaprotocol/seda-chain/x/randomness/types"
)

// var _ types.QueryServer = Querier{}

type Querier struct {
Keeper
}

// func NewQuerierImpl(keeper Keeper) types.QueryServer {
// return &Querier{
// keeper,
// }
// }

func NewQuerierImpl(keeper Keeper) *Querier {
return &Querier{
keeper,
Expand Down
8 changes: 2 additions & 6 deletions x/randomness/keeper/query_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func CustomQuerier(randomnessKeeper *Querier) func(ctx sdk.Context, request json.RawMessage) ([]byte, error) {
return func(ctx sdk.Context, request json.RawMessage) ([]byte, error) {
ctx.Logger().Info("Received request", request)
ctx.Logger().Info("Received request")
ctx.Logger().Info(fmt.Sprintf("% x", string(request)))

var contractQuery types.QuerySeedRequest
Expand All @@ -29,11 +29,7 @@ func CustomQuerier(randomnessKeeper *Querier) func(ctx sdk.Context, request json
ctx.Logger().Info("Get seed")
ctx.Logger().Info(seedQueryResponse.Seed)

res := types.QuerySeedResponse{
Seed: seedQueryResponse.Seed,
BlockHeight: seedQueryResponse.BlockHeight,
}
bz, err := json.Marshal(res)
bz, err := json.Marshal(seedQueryResponse)
if err != nil {
return nil, sdkerrors.Wrap(err, "seed query response")
}
Expand Down

0 comments on commit 87e92ad

Please sign in to comment.