Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to 0.47 #337

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ on:
branches:
- main
paths:
- '**.go'
- '**.mod'
- '**.sum'
- "**.go"
- "**.mod"
- "**.sum"

jobs:
test-unit:
name: unit-tests
runs-on: [self-hosted, linux]
steps:
# Install and setup go
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: checkout ibctest
uses: actions/checkout@v3
Expand All @@ -38,10 +38,10 @@ jobs:
runs-on: [self-hosted, linux]
steps:
# Install and setup go
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: checkout ibctest
uses: actions/checkout@v3
Expand All @@ -59,10 +59,10 @@ jobs:
runs-on: [self-hosted, linux]
steps:
# Install and setup go
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: checkout ibctest
uses: actions/checkout@v3
Expand All @@ -80,10 +80,10 @@ jobs:
runs-on: [self-hosted, linux]
steps:
# Install and setup go
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: checkout ibctest
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (b *Broadcaster) defaultClientContext(fromUser User, sdkAdd sdk.AccAddress)
WithSkipConfirmation(true).
WithAccountRetriever(authtypes.AccountRetriever{}).
WithKeyring(kr).
WithBroadcastMode(flags.BroadcastBlock).
WithBroadcastMode(flags.BroadcastSync).
WithCodec(b.chain.cfg.EncodingConfig.Codec)

// NOTE: the returned context used to have .WithHomeDir(cn.Home),
Expand Down
62 changes: 42 additions & 20 deletions chain/cosmos/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,52 @@ package cosmos
import (
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/simapp"
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
"github.com/cosmos/cosmos-sdk/std"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module/testutil"
"github.com/cosmos/cosmos-sdk/x/auth"
authTx "github.com/cosmos/cosmos-sdk/x/auth/tx"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
ibctypes "github.com/cosmos/ibc-go/v6/modules/core/types"
"github.com/cosmos/cosmos-sdk/x/bank"
"github.com/cosmos/cosmos-sdk/x/capability"
"github.com/cosmos/cosmos-sdk/x/consensus"
distr "github.com/cosmos/cosmos-sdk/x/distribution"
"github.com/cosmos/cosmos-sdk/x/genutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
"github.com/cosmos/cosmos-sdk/x/gov"
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
"github.com/cosmos/cosmos-sdk/x/mint"
"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
"github.com/cosmos/cosmos-sdk/x/slashing"
"github.com/cosmos/cosmos-sdk/x/staking"
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
transfer "github.com/cosmos/ibc-go/v6/modules/apps/transfer"
ibccore "github.com/cosmos/ibc-go/v6/modules/core"
)

func DefaultEncoding() simappparams.EncodingConfig {
// core modules
cfg := simappparams.MakeTestEncodingConfig()
std.RegisterLegacyAminoCodec(cfg.Amino)
std.RegisterInterfaces(cfg.InterfaceRegistry)
simapp.ModuleBasics.RegisterLegacyAminoCodec(cfg.Amino)
simapp.ModuleBasics.RegisterInterfaces(cfg.InterfaceRegistry)

// external modules
banktypes.RegisterInterfaces(cfg.InterfaceRegistry)
ibctypes.RegisterInterfaces(cfg.InterfaceRegistry)
transfertypes.RegisterInterfaces(cfg.InterfaceRegistry)

return cfg
func DefaultEncoding() testutil.TestEncodingConfig {
return testutil.MakeTestEncodingConfig(
auth.AppModuleBasic{},
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator),
bank.AppModuleBasic{},
capability.AppModuleBasic{},
staking.AppModuleBasic{},
mint.AppModuleBasic{},
distr.AppModuleBasic{},
gov.NewAppModuleBasic(
[]govclient.ProposalHandler{
paramsclient.ProposalHandler,
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
},
),
params.AppModuleBasic{},
slashing.AppModuleBasic{},
upgrade.AppModuleBasic{},
consensus.AppModuleBasic{},
transfer.AppModuleBasic{},
ibccore.AppModuleBasic{},
julienrbrt marked this conversation as resolved.
Show resolved Hide resolved
)
}

func decodeTX(interfaceRegistry codectypes.InterfaceRegistry, txbz []byte) (sdk.Tx, error) {
Expand Down
8 changes: 4 additions & 4 deletions chain/internal/tendermint/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
func TestAttributeValue(t *testing.T) {
events := []abcitypes.Event{
{Type: "1", Attributes: []abcitypes.EventAttribute{
{Key: []byte("ignore"), Value: []byte("should not see me")},
{Key: []byte("key1"), Value: []byte("found1")},
{Key: "ignore", Value: "should not see me"},
{Key: "key1", Value: "found1"},
}},
{Type: "2", Attributes: []abcitypes.EventAttribute{
{Key: []byte("key2"), Value: []byte("found2")},
{Key: []byte("ignore"), Value: []byte("should not see me")},
{Key: "key2", Value: "found2"},
{Key: "ignore", Value: "should not see me"},
}},
}

Expand Down
Loading