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

Axelar integration tests #248

Merged
merged 19 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
matrix:
test_type: [
"ScheduledCork",
"AxelarCork",
"Auction",
"CellarFees",
"Incentives",
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,10 @@ e2e_basic: e2e_clean_slate
e2e_scheduled_cork_test: e2e_clean_slate
@E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestScheduledCork || make -s fail

e2e_auction_module_test: e2e_clean_slate
e2e_axelarcork_test: e2e_clean_slate
@E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestAxelarCork || make -s fail

e2e_auction_test: e2e_clean_slate
@E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestAuction || make -s fail

e2e_cellarfees_test: e2e_clean_slate
Expand Down
27 changes: 14 additions & 13 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,19 +418,6 @@ func NewSommelierApp(
app.AccountKeeper, app.BankKeeper, scopedTransferKeeper,
)

// create axelar cork keeper
app.AxelarCorkKeeper = axelarcorkkeeper.NewKeeper(
appCodec,
keys[axelarcorktypes.StoreKey],
app.GetSubspace(axelarcorktypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
app.TransferKeeper,
app.DistrKeeper,
app.IBCKeeper.ChannelKeeper,
app.GravityKeeper,
)
transferModule := ibctransfer.NewAppModule(app.TransferKeeper)
transferIBCModule := ibctransfer.NewIBCModule(app.TransferKeeper)
var transferStack ibcporttypes.IBCModule = transferIBCModule
Expand Down Expand Up @@ -459,6 +446,20 @@ func NewSommelierApp(
app.ModuleAccountAddressesToNames([]string{distrtypes.ModuleName}),
)

// create axelar cork keeper
app.AxelarCorkKeeper = axelarcorkkeeper.NewKeeper(
appCodec,
keys[axelarcorktypes.StoreKey],
app.GetSubspace(axelarcorktypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
app.TransferKeeper,
app.DistrKeeper,
app.IBCKeeper.ChannelKeeper,
app.GravityKeeper,
)

app.CorkKeeper = corkkeeper.NewKeeper(
appCodec, keys[corktypes.StoreKey], app.GetSubspace(corktypes.ModuleName),
app.StakingKeeper, app.GravityKeeper,
Expand Down
8 changes: 4 additions & 4 deletions app/upgrades/v7/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) {
}

// Set 7seas publisher intents for existing cellars
publisherIntents := make([]*pubsubtypes.PublisherIntent, 25)
publisherIntents := make([]*pubsubtypes.PublisherIntent, 0, 25)
for _, cellar := range cellars {
publisherIntents = append(publisherIntents, &pubsubtypes.PublisherIntent{
SubscriptionId: cellar,
Expand All @@ -276,7 +276,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) {
}

// Set default subscriptions for 7seas as the publisher for existing cellars
defaultSubscriptions := make([]*pubsubtypes.DefaultSubscription, 25)
defaultSubscriptions := make([]*pubsubtypes.DefaultSubscription, 0, 25)
for _, cellar := range cellars {
defaultSubscriptions = append(defaultSubscriptions, &pubsubtypes.DefaultSubscription{
SubscriptionId: cellar,
Expand All @@ -286,7 +286,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) {

// Create subscribers and intents for existing validators
subscribers := createSubscribers()
subscriberIntents := make([]*pubsubtypes.SubscriberIntent, 875)
subscriberIntents := make([]*pubsubtypes.SubscriberIntent, 0, 875)
for _, subscriber := range subscribers {
for _, cellar := range cellars {
subscriberIntents = append(subscriberIntents, &pubsubtypes.SubscriberIntent{
Expand Down Expand Up @@ -318,7 +318,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) {
// leaving out made_in_block because I can't find their validator on-chain
// blockhunters hadn't been merged, but verified and added here
func createSubscribers() []*pubsubtypes.Subscriber {
subscribers := make([]*pubsubtypes.Subscriber, 35)
subscribers := make([]*pubsubtypes.Subscriber, 0, 35)

subscribers = append(subscribers, &pubsubtypes.Subscriber{
Address: "somm1s2q8avjykkztudpl8k60f0ns4v5mvnjp5t366c",
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module github.com/peggyjv/sommelier/v7
go 1.19

require (
cosmossdk.io/errors v1.0.0-beta.7
cosmossdk.io/math v1.0.0-rc.0
github.com/cosmos/cosmos-sdk v0.46.14
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/ibc-go/v6 v6.2.0
Expand Down Expand Up @@ -34,8 +36,6 @@ require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.12.0 // indirect
cloud.google.com/go/storage v1.28.1 // indirect
cosmossdk.io/errors v1.0.0-beta.7 // indirect
cosmossdk.io/math v1.0.0-rc.0 // indirect
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -842,10 +842,6 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/peggyjv/gravity-bridge/module/v4 v4.0.0-20231130211750-e1fa9902c9d9 h1:3aqB5WI8S1FtvsoU7HAM+35czUtDvEZJa1feK8/9xRg=
github.com/peggyjv/gravity-bridge/module/v4 v4.0.0-20231130211750-e1fa9902c9d9/go.mod h1:biwoVDKWggMYtzuUZOuqaJD8B40XHrXg3zOJjeAhT78=
github.com/peggyjv/gravity-bridge/module/v4 v4.0.0-20231211214131-bf2a31eb986f h1:xaVjypGpS3+VUXzEb2YFaTK632Id6jVWY1ViS4nljJs=
github.com/peggyjv/gravity-bridge/module/v4 v4.0.0-20231211214131-bf2a31eb986f/go.mod h1:n8Jj3X+w6q0Xz19w8feRRl2sfIGV+3FGU4anzXBQGbA=
github.com/peggyjv/gravity-bridge/module/v4 v4.0.0 h1:jH10FodlMxzGdbxAxeNpsql9qhYDlmwqciwOuwuU0LQ=
github.com/peggyjv/gravity-bridge/module/v4 v4.0.0/go.mod h1:n8Jj3X+w6q0Xz19w8feRRl2sfIGV+3FGU4anzXBQGbA=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
Expand Down
Loading
Loading