precompile

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrecompiledAddressesXpla = []common.Address{
	pbank.Address, pwasm.Address, pauth.Address,
}

Functions

func NewAvailableStaticPrecompiles

func NewAvailableStaticPrecompiles(
	stakingKeeper stakingkeeper.Keeper,
	distributionKeeper distributionkeeper.Keeper,
	transferKeeper ibctransferkeeper.Keeper,
	channelKeeper *channelkeeper.Keeper,
	evmKeeper *evmkeeper.Keeper,
	govKeeper govkeeper.Keeper,
	slashingKeeper slashingkeeper.Keeper,
	ak pwasm.AccountKeeper,
	bk xplabankkeeper.Keeper,
	wms pwasm.WasmMsgServer,
	wk pwasm.WasmKeeper,
	authAk pauth.AccountKeeper,
	codec codec.Codec,
	opts ...evmprecompiletypes.Option,
) map[common.Address]vm.PrecompiledContract

NewAvailableStaticPrecompiles returns the list of all available static precompiled contracts from Cosmos EVM. NOTE: this should only be used during initialization of the Keeper.

Types

type MockERC20Keeper added in v1.9.0

type MockERC20Keeper struct{}

MockERC20Keeper is a no-op ERC20Keeper for chains that do not use the ERC20 module. It implements common.ERC20Keeper so that ics20 precompile can be constructed; ICS20 transfer will always use regular transfer (no ERC20 conversion).

func (MockERC20Keeper) ConvertERC20IntoCoinsForNativeToken added in v1.9.0

func (MockERC20Keeper) ConvertERC20IntoCoinsForNativeToken(ctx sdk.Context, stateDB *statedb.StateDB, contract ethcommon.Address, amount math.Int, receiver sdk.AccAddress, sender ethcommon.Address, commit bool, callFromPrecompile bool) (*erc20types.MsgConvertERC20Response, error)

func (MockERC20Keeper) GetCoinAddress added in v1.9.0

func (MockERC20Keeper) GetCoinAddress(ctx sdk.Context, denom string) (ethcommon.Address, error)

func (MockERC20Keeper) GetERC20Map added in v1.9.0

func (MockERC20Keeper) GetERC20Map(ctx sdk.Context, erc20 ethcommon.Address) []byte

func (MockERC20Keeper) GetTokenPair added in v1.9.0

func (MockERC20Keeper) GetTokenPair(ctx sdk.Context, id []byte) (erc20types.TokenPair, bool)

func (MockERC20Keeper) GetTokenPairID added in v1.9.0

func (MockERC20Keeper) GetTokenPairID(ctx sdk.Context, token string) []byte

func (MockERC20Keeper) IsERC20Enabled added in v1.9.0

func (MockERC20Keeper) IsERC20Enabled(ctx sdk.Context) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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