Skip to content

Commit

Permalink
updated juno to latest v5 version
Browse files Browse the repository at this point in the history
  • Loading branch information
MonikaCat committed Jan 5, 2024
1 parent 691e26c commit 6fd7784
Show file tree
Hide file tree
Showing 86 changed files with 214 additions and 243 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.default
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine AS builder
FROM golang:1.19-alpine AS builder
RUN apk update && apk add --no-cache make git
WORKDIR /go/src/github.com/forbole/bdjuno
COPY . ./
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ all: lint build test-unit
### Build flags ###
###############################################################################

LD_FLAGS = -X github.com/forbole/juno/v4/cmd.Version=$(VERSION) \
-X github.com/forbole/juno/v4/cmd.Commit=$(COMMIT)
LD_FLAGS = -X github.com/forbole/juno/v5/cmd.Version=$(VERSION) \
-X github.com/forbole/juno/v5/cmd.Commit=$(COMMIT)
BUILD_FLAGS := -ldflags '$(LD_FLAGS)'

ifeq ($(LINK_STATICALLY),true)
Expand Down
10 changes: 5 additions & 5 deletions cmd/bdjuno/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package main

import (
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/forbole/juno/v4/cmd"
initcmd "github.com/forbole/juno/v4/cmd/init"
parsetypes "github.com/forbole/juno/v4/cmd/parse/types"
startcmd "github.com/forbole/juno/v4/cmd/start"
"github.com/forbole/juno/v4/modules/messages"
"github.com/forbole/juno/v5/cmd"
initcmd "github.com/forbole/juno/v5/cmd/init"
parsetypes "github.com/forbole/juno/v5/cmd/parse/types"
startcmd "github.com/forbole/juno/v5/cmd/start"
"github.com/forbole/juno/v5/modules/messages"

migratecmd "github.com/forbole/bdjuno/v4/cmd/migrate"
parsecmd "github.com/forbole/bdjuno/v4/cmd/parse"
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"

v3 "github.com/forbole/bdjuno/v4/cmd/migrate/v3"
Expand Down
6 changes: 3 additions & 3 deletions cmd/migrate/v3/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (

"github.com/forbole/bdjuno/v4/modules/actions"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"

"gopkg.in/yaml.v3"

junov4 "github.com/forbole/juno/v4/cmd/migrate/v4"
"github.com/forbole/juno/v4/types/config"
junov4 "github.com/forbole/juno/v5/cmd/migrate/v4"
"github.com/forbole/juno/v5/types/config"
)

// RunMigration runs the migrations from v2 to v3
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/v3/types.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v3

import (
v3 "github.com/forbole/juno/v4/cmd/migrate/v3"
v3 "github.com/forbole/juno/v5/cmd/migrate/v3"

"github.com/forbole/bdjuno/v4/modules/actions"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/v3/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path"

"github.com/forbole/juno/v4/types/config"
"github.com/forbole/juno/v5/types/config"
"gopkg.in/yaml.v3"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/auth/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package auth

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/auth/vesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"encoding/json"
"fmt"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v4/database"
Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/bank/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package bank

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/bank/supply.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

modulestypes "github.com/forbole/bdjuno/v4/modules/types"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v4/database"
Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/ccv/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/forbole/bdjuno/v4/database"
provider "github.com/forbole/bdjuno/v4/modules/ccv/provider"
modulestypes "github.com/forbole/bdjuno/v4/modules/types"
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/ccv/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ccv

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/distribution/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package distribution

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/distribution/communitypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package distribution
import (
"fmt"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v4/database"
Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/feegrant/allowance.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"encoding/hex"
"fmt"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"

"github.com/forbole/bdjuno/v4/modules/feegrant"
"github.com/forbole/bdjuno/v4/utils"
Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/feegrant/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package feegrant

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/gov/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/parse/gov/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"github.com/rs/zerolog/log"

govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/juno/v4/parser"
"github.com/forbole/juno/v5/parser"

"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/distribution"
Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/mint/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mint

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/mint/inflation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package mint
import (
"fmt"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v4/database"
Expand Down
8 changes: 4 additions & 4 deletions cmd/parse/parse.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package parse

import (
parse "github.com/forbole/juno/v4/cmd/parse/types"
parse "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"

parseblocks "github.com/forbole/juno/v4/cmd/parse/blocks"
parseblocks "github.com/forbole/juno/v5/cmd/parse/blocks"

parseccv "github.com/forbole/bdjuno/v4/cmd/parse/ccv"
parsegenesis "github.com/forbole/juno/v4/cmd/parse/genesis"
parsegenesis "github.com/forbole/juno/v5/cmd/parse/genesis"

parseauth "github.com/forbole/bdjuno/v4/cmd/parse/auth"
parsebank "github.com/forbole/bdjuno/v4/cmd/parse/bank"
Expand All @@ -17,7 +17,7 @@ import (
parsemint "github.com/forbole/bdjuno/v4/cmd/parse/mint"
parsepricefeed "github.com/forbole/bdjuno/v4/cmd/parse/pricefeed"
parsestaking "github.com/forbole/bdjuno/v4/cmd/parse/staking"
parsetransaction "github.com/forbole/juno/v4/cmd/parse/transactions"
parsetransaction "github.com/forbole/juno/v5/cmd/parse/transactions"
)

// NewParseCmd returns the Cobra command allowing to parse some chain data without having to re-sync the whole database
Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/pricefeed/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pricefeed

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/pricefeed/price.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pricefeed
import (
"fmt"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v4/database"
Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/pricefeed/pricehistory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pricefeed
import (
"fmt"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v4/database"
Expand Down
2 changes: 1 addition & 1 deletion cmd/parse/staking/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package staking

import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/staking/staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package staking
import (
"fmt"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v4/database"
Expand Down
4 changes: 2 additions & 2 deletions cmd/parse/staking/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

modulestypes "github.com/forbole/bdjuno/v4/modules/types"

parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v4/database"
Expand Down
4 changes: 2 additions & 2 deletions database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package database
import (
"fmt"

db "github.com/forbole/juno/v4/database"
"github.com/forbole/juno/v4/database/postgresql"
db "github.com/forbole/juno/v5/database"
"github.com/forbole/juno/v5/database/postgresql"
"github.com/jmoiron/sqlx"
)

Expand Down
8 changes: 4 additions & 4 deletions database/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import (
"testing"
"time"

dbconfig "github.com/forbole/juno/v4/database/config"
"github.com/forbole/juno/v4/logging"
dbconfig "github.com/forbole/juno/v5/database/config"
"github.com/forbole/juno/v5/logging"

junodb "github.com/forbole/juno/v4/database"
junodb "github.com/forbole/juno/v5/database"

"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/types"

juno "github.com/forbole/juno/v4/types"
juno "github.com/forbole/juno/v5/types"

tmversion "github.com/cometbft/cometbft/proto/tendermint/version"
tmctypes "github.com/cometbft/cometbft/rpc/core/types"
Expand Down
6 changes: 3 additions & 3 deletions database/gov.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ INSERT INTO proposal(
return fmt.Errorf("error while wrapping proposal proto content: %s", err)
}

contentBz, err := db.EncodingConfig.Marshaler.MarshalJSON(anyContent)
contentBz, err := db.Cdc.MarshalJSON(anyContent)
if err != nil {
return fmt.Errorf("error while marshaling proposal content: %s", err)
}
Expand Down Expand Up @@ -180,13 +180,13 @@ func (db *Db) GetProposal(id uint64) (*types.Proposal, error) {
row := rows[0]

var contentAny codectypes.Any
err = db.EncodingConfig.Marshaler.UnmarshalJSON([]byte(row.Content), &contentAny)
err = db.Cdc.UnmarshalJSON([]byte(row.Content), &contentAny)
if err != nil {
return nil, err
}

var content govtypes.Content
err = db.EncodingConfig.Marshaler.UnpackAny(&contentAny, &content)
err = db.Cdc.UnpackAny(&contentAny, &content)
if err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit 6fd7784

Please sign in to comment.