-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #449 from ComposableFi/rustninja/cosmos-eth-fees
Rustninja/cosmos eth fees
- Loading branch information
Showing
29 changed files
with
3,307 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package v6_4_6 | ||
|
||
import ( | ||
store "github.com/cosmos/cosmos-sdk/store/types" | ||
|
||
"github.com/notional-labs/composable/v6/app/upgrades" | ||
ibctransfermiddleware "github.com/notional-labs/composable/v6/x/ibctransfermiddleware/types" | ||
) | ||
|
||
const ( | ||
// UpgradeName defines the on-chain upgrade name for the composable upgrade. | ||
UpgradeName = "v6_4_6" | ||
) | ||
|
||
var Upgrade = upgrades.Upgrade{ | ||
UpgradeName: UpgradeName, | ||
CreateUpgradeHandler: CreateUpgradeHandler, | ||
StoreUpgrades: store.StoreUpgrades{ | ||
Added: []string{ibctransfermiddleware.StoreKey}, | ||
Deleted: []string{}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package v6_4_6 | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
|
||
"github.com/cosmos/cosmos-sdk/codec" | ||
"github.com/notional-labs/composable/v6/app/keepers" | ||
"github.com/notional-labs/composable/v6/app/upgrades" | ||
ibctransfermiddleware "github.com/notional-labs/composable/v6/x/ibctransfermiddleware/types" | ||
) | ||
|
||
func CreateUpgradeHandler( | ||
mm *module.Manager, | ||
configurator module.Configurator, | ||
_ upgrades.BaseAppParamManager, | ||
_ codec.Codec, | ||
keepers *keepers.AppKeepers, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
// Add params for custom middleware | ||
custommiddlewareparams := ibctransfermiddleware.DefaultGenesisState() | ||
keepers.IbcTransferMiddlewareKeeper.SetParams(ctx, custommiddlewareparams.Params) | ||
|
||
return mm.RunMigrations(ctx, configurator, vm) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package keeper | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" | ||
|
||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||
"github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" | ||
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" | ||
"github.com/cosmos/ibc-go/v7/modules/core/exported" | ||
ibctransfermiddleware "github.com/notional-labs/composable/v6/x/ibctransfermiddleware/keeper" | ||
) | ||
|
||
type Keeper struct { | ||
ibctransferkeeper.Keeper | ||
cdc codec.BinaryCodec | ||
IbcTransfermiddleware *ibctransfermiddleware.Keeper | ||
} | ||
|
||
func NewKeeper( | ||
cdc codec.BinaryCodec, | ||
key storetypes.StoreKey, | ||
paramSpace paramtypes.Subspace, | ||
ics4Wrapper porttypes.ICS4Wrapper, | ||
channelKeeper types.ChannelKeeper, | ||
portKeeper types.PortKeeper, | ||
authKeeper types.AccountKeeper, | ||
bk types.BankKeeper, | ||
scopedKeeper exported.ScopedKeeper, | ||
ibcTransfermiddleware *ibctransfermiddleware.Keeper, | ||
) Keeper { | ||
keeper := Keeper{ | ||
Keeper: ibctransferkeeper.NewKeeper(cdc, key, paramSpace, ics4Wrapper, channelKeeper, portKeeper, authKeeper, bk, scopedKeeper), | ||
IbcTransfermiddleware: ibcTransfermiddleware, | ||
cdc: cdc, | ||
} | ||
return keeper | ||
} |
Oops, something went wrong.