v2

package
v3.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

nolint:staticcheck

nolint:staticcheck

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttClaimToAny

func AttClaimToAny(msg proto.Message) *codectypes.Any

func GetEthOracleAddrs

func GetEthOracleAddrs(chainId string) []string

func InitTestGravityDB

func InitTestGravityDB(cdc codec.Codec, legacyAmino *codec.LegacyAmino, genesisState types.GenesisState, paramsStore, gravityStore sdk.KVStore)

func MigrateBank

func MigrateBank(ctx sdk.Context, accountKeeper AccountKeeper, bankKeeper BankKeeper, toModuleName string) error

func MigrateBridgeTokenFromMetadatas

func MigrateBridgeTokenFromMetadatas(metadatas []banktypes.Metadata, ethStore sdk.KVStore)

func MigrateParams

func MigrateParams(legacyAmino *codec.LegacyAmino, paramsStore sdk.KVStore, toModuleName string) error

func MigrateStore

func MigrateStore(cdc codec.BinaryCodec, gravityStore, ethStore sdk.KVStore, oracleMap map[string]string)

MigrateStore performs in-place store migrations from v1 to v2. migrate data from gravity module

func MigrateValidatorToOracle

func MigrateValidatorToOracle(ctx sdk.Context, cdc codec.BinaryCodec, gravityStore, ethStore sdk.KVStore, stakingKeeper StakingKeeper, bankKeeper BankKeeper) map[string]string

func TestParams

func TestParams() types.Params

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
}

type BankKeeper

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	IterateAllDenomMetaData(ctx sdk.Context, cb func(banktypes.Metadata) bool)
}

BankKeeper defines the expected bank keeper methods

type StakingKeeper

type StakingKeeper interface {
	GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool)
	Delegate(ctx sdk.Context, delAddr sdk.AccAddress, bondAmt sdk.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool) (newShares sdk.Dec, err error)
}

StakingKeeper defines the expected staking keeper methods

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL