0g-chain/x/swap/keeper/integration_test.go
drklee3 3375484f79
Update deprecated Cosmos methods (#1530)
* Use cosmossdk.io/errors for deprecated error methods

* Update error registration with cosmossdk.io/errors

* Use cosmossdk.io/math for deprecated sdk.Int alias

* Fix modified proto file

* Update sdk.Int usage in swap hooks

* Update e2e test deprecated method usage
2023-04-05 16:21:59 -07:00

34 lines
983 B
Go

package keeper_test
import (
sdkmath "cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
)
// nolint
func i(in int64) sdkmath.Int { return sdkmath.NewInt(in) }
// nolint
func c(denom string, amount int64) sdk.Coin { return sdk.NewInt64Coin(denom, amount) }
// nolint
func cs(coins ...sdk.Coin) sdk.Coins { return sdk.NewCoins(coins...) }
// func NewAuthGenStateFromAccs(accounts ...authexported.GenesisAccount) app.GenesisState {
// authGenesis := auth.NewGenesisState(auth.DefaultParams(), accounts)
// return app.GenesisState{auth.ModuleName: auth.ModuleCdc.MustMarshalJSON(authGenesis)}
// }
// func NewSwapGenStateMulti() app.GenesisState {
// swapGenesis := types.GenesisState{
// Params: types.Params{
// AllowedPools: types.AllowedPools{
// types.NewAllowedPool("ukava", "usdx"),
// },
// SwapFee: sdk.MustNewDecFromStr("0.03"),
// },
// }
// return app.GenesisState{types.ModuleName: types.ModuleCdc.MustMarshalJSON(swapGenesis)}
// }