Skip to content

Commit

Permalink
chore: move everything inside of two packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Zygimantass committed Jan 30, 2024
1 parent 87f8e2a commit cd1f05b
Show file tree
Hide file tree
Showing 69 changed files with 185 additions and 6,542 deletions.
4 changes: 2 additions & 2 deletions chain/chain.go → cosmos/chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
sdkclient "github.com/cosmos/cosmos-sdk/client"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/types"
"github.com/skip-mev/petri/provider/v2"
petritypes "github.com/skip-mev/petri/types/v2"
"github.com/skip-mev/petri/general/v2/provider"
petritypes "github.com/skip-mev/petri/general/v2/types"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"
Expand Down
4 changes: 2 additions & 2 deletions chain/chain_wallet.go → cosmos/chain/chain_wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/skip-mev/petri/types/v2"
"github.com/skip-mev/petri/wallet/v2"
"github.com/skip-mev/petri/cosmos/v2/wallet"
"github.com/skip-mev/petri/general/v2/types"
)

func (c *Chain) BuildWallet(ctx context.Context, keyName, mnemonic string, walletConfig types.WalletConfig) (types.WalletI, error) {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cosmosutil/bank.go → cosmos/cosmosutil/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/query"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/skip-mev/petri/types/v2"
"github.com/skip-mev/petri/general/v2/types"
)

// bank queries
Expand Down
2 changes: 1 addition & 1 deletion cosmosutil/client.go → cosmos/cosmosutil/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
petritypes "github.com/skip-mev/petri/types/v2"
petritypes "github.com/skip-mev/petri/general/v2/types"
)

type ChainClient struct {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cosmosutil/gov.go → cosmos/cosmosutil/gov.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/query"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
"github.com/skip-mev/petri/types/v2"
"github.com/skip-mev/petri/general/v2/types"
)

func (c *ChainClient) GovProposal(ctx context.Context, proposalID uint64) (*govtypes.Proposal, error) {
Expand Down
2 changes: 1 addition & 1 deletion cosmosutil/util.go → cosmos/cosmosutil/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cosmosutil
import (
"cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/skip-mev/petri/types/v2"
"github.com/skip-mev/petri/general/v2/types"
)

func GetFeeAmountsFromGasSettings(gasSettings types.GasSettings) sdk.Coins {
Expand Down
4 changes: 2 additions & 2 deletions cosmosutil/wallet.go → cosmos/cosmosutil/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
petritypes "github.com/skip-mev/petri/types/v2"
"github.com/skip-mev/petri/util/v2"
petritypes "github.com/skip-mev/petri/general/v2/types"
"github.com/skip-mev/petri/general/v2/util"
"strings"
"time"
)
Expand Down
25 changes: 13 additions & 12 deletions chain/go.mod → cosmos/go.mod
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
module github.com/skip-mev/petri/chain/v2
module github.com/skip-mev/petri/cosmos/v2

go 1.21.3

replace (
github.com/cosmos/cosmos-sdk/api => cosmossdk.io/api v0.7.2
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/skip-mev/petri/general/v2 => ../general
)

require (
cosmossdk.io/math v1.2.0
github.com/cometbft/cometbft v0.38.2
github.com/cosmos/cosmos-sdk v0.50.2
github.com/cosmos/go-bip39 v1.0.0
github.com/icza/dyno v0.0.0-20230330125955-09f820a8d9c0
github.com/skip-mev/petri/provider/v2 v2.0.0
github.com/skip-mev/petri/types/v2 v2.0.0
github.com/skip-mev/petri/wallet/v2 v2.0.0
github.com/informalsystems/tm-load-test v1.3.0
github.com/pelletier/go-toml/v2 v2.1.0
github.com/skip-mev/petri/general/v2 v2.0.0-00010101000000-000000000000
go.uber.org/zap v1.26.0
golang.org/x/sync v0.5.0
google.golang.org/grpc v1.60.1
google.golang.org/protobuf v1.31.0
)

require (
Expand Down Expand Up @@ -49,7 +52,6 @@ require (
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.0 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/gogoproto v1.4.11 // indirect
github.com/cosmos/iavl v1.0.0 // indirect
Expand Down Expand Up @@ -113,7 +115,6 @@ require (
github.com/mtibben/percent v0.2.1 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -126,8 +127,9 @@ require (
github.com/rs/cors v1.8.3 // indirect
github.com/rs/zerolog v1.31.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/skip-mev/petri/util/v2 v2.0.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand All @@ -148,10 +150,9 @@ require (
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit cd1f05b

Please sign in to comment.