Skip to content

Commit

Permalink
upgraded juno to latest v5 version
Browse files Browse the repository at this point in the history
  • Loading branch information
MonikaCat committed Jan 2, 2024
1 parent 7a08670 commit da32a4b
Show file tree
Hide file tree
Showing 79 changed files with 963 additions and 935 deletions.
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
12 changes: 6 additions & 6 deletions cmd/bdjuno/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ 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"

"github.com/cosmos/cosmos-sdk/simapp"
migratecmd "github.com/forbole/bdjuno/v4/cmd/migrate"
parsecmd "github.com/forbole/bdjuno/v4/cmd/parse"

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

humansaiapp "github.com/MonCatCat/humans/app"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules"
humansaiapp "github.com/MonCatCat/humans/app"
)

func main() {
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
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 @@ -18,9 +18,9 @@ import (
"github.com/forbole/bdjuno/v4/modules/slashing"
"github.com/forbole/bdjuno/v4/modules/staking"
"github.com/forbole/bdjuno/v4/utils"
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/parser"
"github.com/forbole/juno/v4/types/config"
parsecmdtypes "github.com/forbole/juno/v5/cmd/parse/types"
"github.com/forbole/juno/v5/parser"
"github.com/forbole/juno/v5/types/config"
"github.com/spf13/cobra"
)

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,7 +1,7 @@
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"

parseauth "github.com/forbole/bdjuno/v4/cmd/parse/auth"
Expand All @@ -12,9 +12,9 @@ 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"
parseblocks "github.com/forbole/juno/v4/cmd/parse/blocks"
parsegenesis "github.com/forbole/juno/v4/cmd/parse/genesis"
parsetransaction "github.com/forbole/juno/v4/cmd/parse/transactions"
parseblocks "github.com/forbole/juno/v5/cmd/parse/blocks"
parsegenesis "github.com/forbole/juno/v5/cmd/parse/genesis"
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 @@ -164,7 +164,7 @@ INSERT INTO proposal(
return fmt.Errorf("error while wrapping proposal proto content: %s", err)
}

contentBz, err := db.EncodingConfig.Codec.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 @@ -217,13 +217,13 @@ func (db *Db) GetProposal(id uint64) (types.Proposal, error) {
row := rows[0]

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

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

0 comments on commit da32a4b

Please sign in to comment.