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

refactor: merge confirm handler #695

Merged
merged 1 commit into from
Sep 25, 2024
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
4 changes: 2 additions & 2 deletions app/encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ func TestRegisterInterfaces(t *testing.T) {
for interfaceImpls.Next() {
count1++
}
assert.Equal(t, 31, count1)
assert.Equal(t, 32, count1)

implInterfaces := interfaceRegistry.FieldByName("implInterfaces").MapRange()
var count2 int
for implInterfaces.Next() {
count2++
}
assert.Equal(t, 305, count2)
assert.Equal(t, 307, count2)

typeURLMap := interfaceRegistry.FieldByName("typeURLMap").MapRange()
for typeURLMap.Next() {
Expand Down
4 changes: 4 additions & 0 deletions app/interface_registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"cosmos.vesting.v1beta1.VestingAccount",
"ethermint.evm.v1.TxData",
"fx.ibc.applications.transfer.v1.MemoPacket",
"gravity.v1beta1.Confirm",
"gravity.v1beta1.ExternalClaim",
"ibc.core.channel.v1.ChannelI",
"ibc.core.channel.v1.CounterpartyChannelI",
Expand Down Expand Up @@ -225,8 +226,10 @@
"/fx.gravity.crosschain.v1.MsgCancelSendToExternalResponse",
"/fx.gravity.crosschain.v1.MsgClaim",
"/fx.gravity.crosschain.v1.MsgClaimResponse",
"/fx.gravity.crosschain.v1.MsgConfirm",
"/fx.gravity.crosschain.v1.MsgConfirmBatch",
"/fx.gravity.crosschain.v1.MsgConfirmBatchResponse",
"/fx.gravity.crosschain.v1.MsgConfirmResponse",
"/fx.gravity.crosschain.v1.MsgEditBridger",
"/fx.gravity.crosschain.v1.MsgEditBridgerResponse",
"/fx.gravity.crosschain.v1.MsgIncreaseBridgeFee",
Expand Down Expand Up @@ -431,6 +434,7 @@
"/fx.gravity.crosschain.v1.MsgCancelPendingBridgeCall",
"/fx.gravity.crosschain.v1.MsgCancelSendToExternal",
"/fx.gravity.crosschain.v1.MsgClaim",
"/fx.gravity.crosschain.v1.MsgConfirm",
"/fx.gravity.crosschain.v1.MsgConfirmBatch",
"/fx.gravity.crosschain.v1.MsgEditBridger",
"/fx.gravity.crosschain.v1.MsgIncreaseBridgeFee",
Expand Down
11 changes: 5 additions & 6 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ import (
polygontypes "github.com/functionx/fx-core/v8/x/polygon/types"
fxstakingkeeper "github.com/functionx/fx-core/v8/x/staking/keeper"
stakingprecompile "github.com/functionx/fx-core/v8/x/staking/precompile"
tronkeeper "github.com/functionx/fx-core/v8/x/tron/keeper"
trontypes "github.com/functionx/fx-core/v8/x/tron/types"
)

Expand All @@ -92,7 +91,7 @@ type CrossChainKeepers struct {
PolygonKeeper crosschainkeeper.Keeper
AvalancheKeeper crosschainkeeper.Keeper
EthKeeper crosschainkeeper.Keeper
TronKeeper tronkeeper.Keeper
TronKeeper crosschainkeeper.Keeper
ArbitrumKeeper crosschainkeeper.Keeper
OptimismKeeper crosschainkeeper.Keeper
Layer2Keeper crosschainkeeper.Keeper
Expand Down Expand Up @@ -466,7 +465,7 @@ func NewAppKeeper(
appKeepers.EvmKeeper,
authAddr,
)
appKeepers.TronKeeper = tronkeeper.NewKeeper(crosschainkeeper.NewKeeper(
appKeepers.TronKeeper = crosschainkeeper.NewKeeper(
appCodec,
trontypes.ModuleName,
appKeepers.keys[trontypes.StoreKey],
Expand All @@ -479,7 +478,7 @@ func NewAppKeeper(
appKeepers.AccountKeeper,
appKeepers.EvmKeeper,
authAddr,
))
)

// add cross-chain router
crosschainRouter := crosschainkeeper.NewRouter()
Expand All @@ -491,7 +490,7 @@ func NewAppKeeper(
AddRoute(arbitrumtypes.ModuleName, crosschainkeeper.NewModuleHandler(appKeepers.ArbitrumKeeper)).
AddRoute(optimismtypes.ModuleName, crosschainkeeper.NewModuleHandler(appKeepers.OptimismKeeper)).
AddRoute(layer2types.ModuleName, crosschainkeeper.NewModuleHandler(appKeepers.Layer2Keeper)).
AddRoute(trontypes.ModuleName, tronkeeper.NewModuleHandler(appKeepers.TronKeeper))
AddRoute(trontypes.ModuleName, crosschainkeeper.NewModuleHandler(appKeepers.TronKeeper))

appKeepers.CrosschainRouterKeeper = crosschainkeeper.NewRouterKeeper(crosschainRouter)

Expand All @@ -504,7 +503,7 @@ func NewAppKeeper(
AddRoute(arbitrumtypes.ModuleName, appKeepers.ArbitrumKeeper).
AddRoute(optimismtypes.ModuleName, appKeepers.OptimismKeeper).
AddRoute(layer2types.ModuleName, appKeepers.Layer2Keeper).
AddRoute(trontypes.ModuleName, appKeepers.TronKeeper.Keeper)
AddRoute(trontypes.ModuleName, appKeepers.TronKeeper)

// register the proposal types
govRouter := govv1beta1.NewRouter()
Expand Down
2 changes: 1 addition & 1 deletion docs/statik/statik.go

Large diffs are not rendered by default.

Loading