refactor(store/v2)!: simplify storage (#22683)

This commit is contained in:
Marko
2024-12-03 16:18:19 +00:00
committed by GitHub
parent 5426cd8f34
commit 94cfcc11aa
52 changed files with 375 additions and 4701 deletions
@@ -51,12 +51,14 @@ func TestBaseAccount(t *testing.T) {
}
func sendTx(t *testing.T, ctx sdk.Context, app *simapp.SimApp, sender []byte, msg sdk.Msg) {
t.Helper()
tx := sign(t, ctx, app, sender, privKey, msg)
_, _, err := app.SimDeliver(app.TxEncode, tx)
require.NoError(t, err)
}
func sign(t *testing.T, ctx sdk.Context, app *simapp.SimApp, from sdk.AccAddress, privKey cryptotypes.PrivKey, msg sdk.Msg) sdk.Tx {
t.Helper()
r := rand.New(rand.NewSource(0))
accNum, err := app.AccountsKeeper.AccountByNumber.Get(ctx, from)
@@ -81,12 +83,14 @@ func sign(t *testing.T, ctx sdk.Context, app *simapp.SimApp, from sdk.AccAddress
}
func bechify(t *testing.T, app *simapp.SimApp, addr []byte) string {
t.Helper()
bech32, err := app.AuthKeeper.AddressCodec().BytesToString(addr)
require.NoError(t, err)
return bech32
}
func fundAccount(t *testing.T, app *simapp.SimApp, ctx sdk.Context, addr sdk.AccAddress, amt string) {
t.Helper()
require.NoError(t, testutil.FundAccount(ctx, app.BankKeeper, addr, coins(t, amt)))
}
@@ -209,6 +209,7 @@ func TestMsgServer_ExecuteBundle(t *testing.T) {
}
func makeTx(t *testing.T, msg gogoproto.Message, sig []byte, xt *account_abstractionv1.TxExtension) []byte {
t.Helper()
anyMsg, err := codectypes.NewAnyWithValue(msg)
require.NoError(t, err)
-2
View File
@@ -22,7 +22,6 @@ import (
_ "cosmossdk.io/x/consensus" // import as blank for app wiring
_ "cosmossdk.io/x/staking" // import as blank for app wirings
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/tests/integration/v2"
"github.com/cosmos/cosmos-sdk/testutil/configurator"
_ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring
@@ -35,7 +34,6 @@ import (
type suite struct {
app *integration.App
cdc codec.Codec
ctx context.Context
authKeeper authkeeper.AccountKeeper