Skip to content

Commit

Permalink
Merge branch 'cosmos/v0.46.x' of https://github.com/forbole/bdjuno in…
Browse files Browse the repository at this point in the history
…to chains/evmos/mainnet
  • Loading branch information
MonikaCat committed Mar 22, 2023
2 parents 8a7f993 + 4e03eaa commit 4ce0cc5
Show file tree
Hide file tree
Showing 136 changed files with 331 additions and 340 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#### Staking Module
- ([\#443](https://github.com/forbole/bdjuno/pull/443)) Remove tombstone status from staking module(already stored in slashing module)
- ([\#455](https://github.com/forbole/bdjuno/pull/455)) Added `unbonding_tokens` and `staked_not_bonded_tokens` values to staking pool table
- ([\#536](https://github.com/forbole/bdjuno/pull/536) Fix `PoolSnapshot` tokens type from `sdk.Int` to `sdkmath.Int`

#### Gov Module
- ([\#461](https://github.com/forbole/bdjuno/pull/461)) Parse `x/gov` genesis with `genesisDoc.InitialHeight` instead of the hard-coded height 1
Expand Down Expand Up @@ -136,4 +137,4 @@ This version introduces breaking changes to certain address-specific data that i
- ([\#276](https://github.com/forbole/bdjuno/pull/276)) Added `fee_grant_allowance` table (v0.44.x)

#### Modules
- ([\#353](https://github.com/forbole/bdjuno/pull/353)) Removed the support for the `history` module
- ([\#353](https://github.com/forbole/bdjuno/pull/353)) Removed the support for the `history` module
10 changes: 5 additions & 5 deletions cmd/bdjuno/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
startcmd "github.com/forbole/juno/v4/cmd/start"
"github.com/forbole/juno/v4/modules/messages"

migratecmd "github.com/forbole/bdjuno/v3/cmd/migrate"
parsecmd "github.com/forbole/bdjuno/v3/cmd/parse"
migratecmd "github.com/forbole/bdjuno/v4/cmd/migrate"
parsecmd "github.com/forbole/bdjuno/v4/cmd/parse"

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

"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules"

evmosapp "github.com/evmos/evmos/v11/app"
)
Expand Down
5 changes: 2 additions & 3 deletions cmd/migrate/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/spf13/cobra"

v3 "github.com/forbole/bdjuno/v3/cmd/migrate/v3"
v3 "github.com/forbole/bdjuno/v4/cmd/migrate/v3"
)

type Migrator func(parseCfg *parsecmdtypes.Config) error
Expand All @@ -32,8 +32,7 @@ func NewMigrateCmd(appName string, parseConfig *parsecmdtypes.Config) *cobra.Com
Use: "migrate [to-version]",
Short: "Perform the migrations from the current version to the specified one",
Long: `Migrates all the necessary things (config file, database, etc) from the current version to the new one.
If you are upgrading from a very old version to the latest one, migrations must be performed in order
(eg. to migrate from v1 to v3 you need to do v1 -> v2 and then v2 -> v3).
Note that migrations must be performed in order: to migrate from vX to vX+2 you need to do vX -> vX+1 and then vX+1 -> vX+2.
`,
Example: fmt.Sprintf("%s migrate v3", appName),
Args: cobra.RangeArgs(0, 1),
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/v3/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io/ioutil"

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

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

Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/v3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v3
import (
v3 "github.com/forbole/juno/v4/cmd/migrate/v3"

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

type Config struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/parse/auth/vesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/forbole/juno/v4/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v3/database"
authutils "github.com/forbole/bdjuno/v3/modules/auth"
"github.com/forbole/bdjuno/v3/utils"
"github.com/forbole/bdjuno/v4/database"
authutils "github.com/forbole/bdjuno/v4/modules/auth"
"github.com/forbole/bdjuno/v4/utils"
)

// vestingCmd returns a Cobra command that allows to fix the vesting data for the accounts
Expand Down
6 changes: 3 additions & 3 deletions cmd/parse/bank/supply.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package bank
import (
"fmt"

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

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

"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules/bank"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/bank"
)

// supplyCmd returns the Cobra command allowing to refresh x/bank total supply
Expand Down
6 changes: 3 additions & 3 deletions cmd/parse/distribution/communitypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/forbole/juno/v4/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules/distribution"
modulestypes "github.com/forbole/bdjuno/v3/modules/types"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/distribution"
modulestypes "github.com/forbole/bdjuno/v4/modules/types"
)

// communityPoolCmd returns the Cobra command allowing to refresh community pool
Expand Down
6 changes: 3 additions & 3 deletions cmd/parse/feegrant/allowance.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
parsecmdtypes "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/forbole/juno/v4/types/config"

"github.com/forbole/bdjuno/v3/modules/feegrant"
"github.com/forbole/bdjuno/v3/utils"
"github.com/forbole/bdjuno/v4/modules/feegrant"
"github.com/forbole/bdjuno/v4/utils"

"github.com/spf13/cobra"

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

"sort"

Expand Down
26 changes: 13 additions & 13 deletions cmd/parse/gov/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ import (
"strconv"
"time"

modulestypes "github.com/forbole/bdjuno/v3/modules/types"
modulestypes "github.com/forbole/bdjuno/v4/modules/types"
"github.com/rs/zerolog/log"

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

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

govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules/distribution"
"github.com/forbole/bdjuno/v3/modules/gov"
"github.com/forbole/bdjuno/v3/modules/inflation"
"github.com/forbole/bdjuno/v3/modules/mint"
"github.com/forbole/bdjuno/v3/modules/slashing"
"github.com/forbole/bdjuno/v3/modules/staking"

"github.com/forbole/bdjuno/v3/utils"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/distribution"
"github.com/forbole/bdjuno/v4/modules/gov"
"github.com/forbole/bdjuno/v4/modules/inflation"
"github.com/forbole/bdjuno/v4/modules/mint"
"github.com/forbole/bdjuno/v4/modules/slashing"
"github.com/forbole/bdjuno/v4/modules/staking"

"github.com/forbole/bdjuno/v4/utils"
)

// proposalCmd returns the Cobra command allowing to fix all things related to a proposal
Expand Down Expand Up @@ -150,7 +150,7 @@ func refreshProposalDeposits(parseCtx *parser.Context, proposalID uint64, govMod

// Handle the MsgDeposit messages
for index, msg := range junoTx.GetMsgs() {
if _, ok := msg.(*govtypes.MsgDeposit); !ok {
if _, ok := msg.(*govtypesv1.MsgDeposit); !ok {
continue
}

Expand Down Expand Up @@ -182,7 +182,7 @@ func refreshProposalVotes(parseCtx *parser.Context, proposalID uint64, govModule

// Handle the MsgVote messages
for index, msg := range junoTx.GetMsgs() {
if _, ok := msg.(*govtypes.MsgVote); !ok {
if _, ok := msg.(*govtypesv1.MsgVote); !ok {
continue
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/parse/mint/inflation.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/forbole/juno/v4/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules/mint"
modulestypes "github.com/forbole/bdjuno/v3/modules/types"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/mint"
modulestypes "github.com/forbole/bdjuno/v4/modules/types"
)

// inflationCmd returns the Cobra command allowing to refresh x/mint inflation
Expand Down
18 changes: 8 additions & 10 deletions cmd/parse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ import (
parse "github.com/forbole/juno/v4/cmd/parse/types"
"github.com/spf13/cobra"

parseauth "github.com/forbole/bdjuno/v4/cmd/parse/auth"
parsebank "github.com/forbole/bdjuno/v4/cmd/parse/bank"
parsedistribution "github.com/forbole/bdjuno/v4/cmd/parse/distribution"
parsefeegrant "github.com/forbole/bdjuno/v4/cmd/parse/feegrant"
parsegov "github.com/forbole/bdjuno/v4/cmd/parse/gov"
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"

parseauth "github.com/forbole/bdjuno/v3/cmd/parse/auth"
parsebank "github.com/forbole/bdjuno/v3/cmd/parse/bank"
parsedistribution "github.com/forbole/bdjuno/v3/cmd/parse/distribution"
parsefeegrant "github.com/forbole/bdjuno/v3/cmd/parse/feegrant"
parsegov "github.com/forbole/bdjuno/v3/cmd/parse/gov"
parsemint "github.com/forbole/bdjuno/v3/cmd/parse/mint"
parsepricefeed "github.com/forbole/bdjuno/v3/cmd/parse/pricefeed"
parsestaking "github.com/forbole/bdjuno/v3/cmd/parse/staking"
parsetransaction "github.com/forbole/juno/v4/cmd/parse/transactions"
)

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 @@ -7,8 +7,8 @@ import (
"github.com/forbole/juno/v4/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules/pricefeed"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/pricefeed"
)

// priceCmd returns the Cobra command allowing to refresh token price
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 @@ -7,8 +7,8 @@ import (
"github.com/forbole/juno/v4/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules/pricefeed"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/pricefeed"
)

// priceHistoryCmd returns the Cobra command allowing to store token price history
Expand Down
6 changes: 3 additions & 3 deletions cmd/parse/staking/staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/forbole/juno/v4/types/config"
"github.com/spf13/cobra"

"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules/staking"
modulestypes "github.com/forbole/bdjuno/v3/modules/types"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/staking"
modulestypes "github.com/forbole/bdjuno/v4/modules/types"
)

// poolCmd returns the Cobra command allowing to refresh x/staking pool
Expand Down
6 changes: 3 additions & 3 deletions cmd/parse/staking/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package staking
import (
"fmt"

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

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

"github.com/forbole/bdjuno/v3/database"
"github.com/forbole/bdjuno/v3/modules/staking"
"github.com/forbole/bdjuno/v4/database"
"github.com/forbole/bdjuno/v4/modules/staking"
)

// validatorsCmd returns a Cobra command that allows to fix the validator infos for all validators.
Expand Down
6 changes: 3 additions & 3 deletions database/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/gogo/protobuf/proto"
"github.com/lib/pq"

dbtypes "github.com/forbole/bdjuno/v3/database/types"
dbutils "github.com/forbole/bdjuno/v3/database/utils"
dbtypes "github.com/forbole/bdjuno/v4/database/types"
dbutils "github.com/forbole/bdjuno/v4/database/utils"

"github.com/forbole/bdjuno/v3/types"
"github.com/forbole/bdjuno/v4/types"
)

// SaveAccounts saves the given accounts inside the database
Expand Down
4 changes: 2 additions & 2 deletions database/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
authttypes "github.com/cosmos/cosmos-sdk/x/auth/types"

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

dbtypes "github.com/forbole/bdjuno/v3/database/types"
dbtypes "github.com/forbole/bdjuno/v4/database/types"
)

func (suite *DbTestSuite) TestSaveAccount() {
Expand Down
2 changes: 1 addition & 1 deletion database/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package database
import (
"fmt"

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

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/lib/pq"
Expand Down
4 changes: 2 additions & 2 deletions database/bank_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package database_test
import (
sdk "github.com/cosmos/cosmos-sdk/types"

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

bddbtypes "github.com/forbole/bdjuno/v3/database/types"
bddbtypes "github.com/forbole/bdjuno/v4/database/types"
)

func (suite *DbTestSuite) TestBigDipperDb_SaveSupply() {
Expand Down
4 changes: 2 additions & 2 deletions database/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"time"

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

dbtypes "github.com/forbole/bdjuno/v3/database/types"
dbtypes "github.com/forbole/bdjuno/v4/database/types"
)

// GetLastBlock returns the last block stored inside the database based on the heights
Expand Down
4 changes: 2 additions & 2 deletions database/consensus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package database_test
import (
time "time"

dbtypes "github.com/forbole/bdjuno/v3/database/types"
"github.com/forbole/bdjuno/v3/types"
dbtypes "github.com/forbole/bdjuno/v4/database/types"
"github.com/forbole/bdjuno/v4/types"
)

func (suite *DbTestSuite) TestSaveConsensus_GetBlockHeightTimeMinuteAgo() {
Expand Down
4 changes: 2 additions & 2 deletions database/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions database/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"encoding/json"
"fmt"

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

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

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/lib/pq"
Expand Down
6 changes: 3 additions & 3 deletions database/distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

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

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

distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
bddbtypes "github.com/forbole/bdjuno/v3/database/types"
bddbtypes "github.com/forbole/bdjuno/v4/database/types"
)

func (suite *DbTestSuite) TestBigDipperDb_SaveCommunityPool() {
Expand Down
Loading

0 comments on commit 4ce0cc5

Please sign in to comment.