Skip to content

Commit

Permalink
update wasm to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Neznaykin committed Dec 16, 2024
1 parent a97df6c commit 99236cd
Show file tree
Hide file tree
Showing 23 changed files with 730 additions and 211 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.22.4
go-version: 1.23.4

- name: lint
run: make lint
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ race: dep ## Run data race detector

install-linter: ## Install golangci-lint
@mkdir -p bin
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b bin v1.59.0
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b bin v1.62.2
@bin/golangci-lint --version

lint: install-linter ## Lint the files
Expand Down
4 changes: 2 additions & 2 deletions client/grpc/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package grpc
import (
"context"

coretypes "github.com/cometbft/cometbft/rpc/core/types"
tmtypes "github.com/cometbft/cometbft/types"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
coretypes "github.com/tendermint/tendermint/rpc/core/types"
tmtypes "github.com/tendermint/tendermint/types"
)

func (c *Client) Block(ctx context.Context, height int64) (*coretypes.ResultBlock, error) {
Expand Down
2 changes: 2 additions & 0 deletions client/grpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func (c *Client) Start(ctx context.Context) error {
ctx, cancel := context.WithTimeout(ctx, 15*time.Second) // dial timeout
defer cancel()

// nolint:staticcheck
options := []grpc.DialOption{
grpc.WithBlock(),
grpc.WithChainUnaryInterceptor(timeout.UnaryClientInterceptor(c.cfg.Timeout)), // request timeout
Expand Down Expand Up @@ -71,6 +72,7 @@ func (c *Client) Start(ctx context.Context) error {
}

// Create a connection to the gRPC server.
// nolint:staticcheck
grpcConn, err := grpc.DialContext(
ctx,
c.cfg.Host, // Or your gRPC server address.
Expand Down
2 changes: 1 addition & 1 deletion client/grpc/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/hex"
"time"

"github.com/cometbft/cometbft/types"
"github.com/cosmos/cosmos-sdk/types/tx"
"github.com/tendermint/tendermint/types"

"github.com/bro-n-bro/spacebox-crawler/v2/adapter/storage/model"
)
Expand Down
8 changes: 4 additions & 4 deletions client/grpc/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package grpc
import (
"context"

"github.com/cometbft/cometbft/crypto/ed25519"
coretypes "github.com/cometbft/cometbft/rpc/core/types"
"github.com/cometbft/cometbft/types"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
"github.com/cosmos/cosmos-sdk/types/query"
"github.com/tendermint/tendermint/crypto/ed25519"
coretypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/tendermint/tendermint/types"
)

const (
Expand Down Expand Up @@ -42,7 +42,7 @@ func (c *Client) Validators(ctx context.Context, height int64) (*coretypes.Resul
vals.Validators = append(vals.Validators, convertValidator(val))
}

vals.Total = int(respPb.Pagination.Total)
vals.Total = int(respPb.Pagination.Total) //nolint:gosec

if len(respPb.Validators) < defaultLimit {
break
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/block_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rpc
import (
"context"

coretypes "github.com/tendermint/tendermint/rpc/core/types"
coretypes "github.com/cometbft/cometbft/rpc/core/types"
)

func (c *Client) GetBlockResults(ctx context.Context, height int64) (*coretypes.ResultBlockResults, error) {
Expand Down
4 changes: 2 additions & 2 deletions client/rpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"net/http"

httpCli "github.com/cometbft/cometbft/rpc/client/http"
jsonrpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client"
"github.com/prometheus/client_golang/prometheus/promhttp"
httpCli "github.com/tendermint/tendermint/rpc/client/http"
jsonrpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client"
)

type Client struct {
Expand Down
5 changes: 3 additions & 2 deletions client/rpc/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"
"encoding/base64"

"github.com/tendermint/tendermint/libs/json"
"github.com/tendermint/tendermint/types"
"github.com/cometbft/cometbft/libs/json"
"github.com/cometbft/cometbft/types"
"golang.org/x/sync/errgroup"
)

//nolint:gosec
func (c *Client) Genesis(ctx context.Context) (*types.GenesisDoc, error) {
chunk, err := c.RPCClient.GenesisChunked(ctx, 0)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rpc
import (
"context"

coretypes "github.com/tendermint/tendermint/rpc/core/types"
coretypes "github.com/cometbft/cometbft/rpc/core/types"
)

func (c *Client) SubscribeNewBlocks(ctx context.Context) (<-chan coretypes.ResultEvent, error) {
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/tx_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rpc
import (
"context"

abci "github.com/tendermint/tendermint/abci/types"
abci "github.com/cometbft/cometbft/abci/types"
)

func (c *Client) GetTxResults(ctx context.Context, height int64) ([]*abci.ResponseDeliverTx, error) {
Expand Down
Loading

0 comments on commit 99236cd

Please sign in to comment.