types

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 25 Imported by: 20 modules, 13 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultStaticPrecompiles

func DefaultStaticPrecompiles(
	stakingKeeper stakingkeeper.Keeper,
	distributionKeeper distributionkeeper.Keeper,
	bankKeeper cmn.BankKeeper,
	erc20Keeper *erc20Keeper.Keeper,
	transferKeeper *transferkeeper.Keeper,
	channelKeeper *channelkeeper.Keeper,
	clientKeeper ibcutils.ClientKeeper,
	clientV2Keeper ibcutils.ClientV2Keeper,
	govKeeper govkeeper.Keeper,
	slashingKeeper slashingkeeper.Keeper,
	codec codec.Codec,
	opts ...Option,
) map[common.Address]vm.PrecompiledContract

DefaultStaticPrecompiles 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 Option

type Option func(opts *Optionals)

func WithAddressCodec

func WithAddressCodec(codec address.Codec) Option

func WithConsensusAddrCodec

func WithConsensusAddrCodec(codec address.Codec) Option

func WithValidatorAddrCodec

func WithValidatorAddrCodec(codec address.Codec) Option

type Optionals

type Optionals struct {
	AddressCodec       address.Codec // used by gov/staking
	ValidatorAddrCodec address.Codec // used by slashing
	ConsensusAddrCodec address.Codec // used by slashing
}

Optionals define some optional params that can be applied to _some_ precompiles. Extend this struct, add a sane default to defaultOptionals, and an Option function to provide users with a non-breaking way to provide custom args to certain precompiles.

type StaticPrecompiles

type StaticPrecompiles map[common.Address]vm.PrecompiledContract

func NewStaticPrecompiles

func NewStaticPrecompiles() StaticPrecompiles

func (StaticPrecompiles) WithBankPrecompile

func (s StaticPrecompiles) WithBankPrecompile(
	bankKeeper cmn.BankKeeper,
	erc20Keeper *erc20Keeper.Keeper,
) StaticPrecompiles

func (StaticPrecompiles) WithBech32Precompile

func (s StaticPrecompiles) WithBech32Precompile() StaticPrecompiles

func (StaticPrecompiles) WithDistributionPrecompile

func (s StaticPrecompiles) WithDistributionPrecompile(
	distributionKeeper distributionkeeper.Keeper,
	stakingKeeper stakingkeeper.Keeper,
	bankKeeper cmn.BankKeeper,
	opts ...Option,
) StaticPrecompiles

func (StaticPrecompiles) WithGovPrecompile

func (s StaticPrecompiles) WithGovPrecompile(
	govKeeper govkeeper.Keeper,
	bankKeeper cmn.BankKeeper,
	codec codec.Codec,
	opts ...Option,
) StaticPrecompiles

func (StaticPrecompiles) WithICS02Precompile added in v0.7.0

func (s StaticPrecompiles) WithICS02Precompile(
	codec codec.Codec,
	clientKeeper ibcutils.ClientKeeper,
	clientV2Keeper ibcutils.ClientV2Keeper,
) StaticPrecompiles

func (StaticPrecompiles) WithICS20Precompile

func (s StaticPrecompiles) WithICS20Precompile(
	bankKeeper cmn.BankKeeper,
	stakingKeeper stakingkeeper.Keeper,
	transferKeeper *transferkeeper.Keeper,
	channelKeeper *channelkeeper.Keeper,
	erc20Keeper *erc20Keeper.Keeper,
) StaticPrecompiles

func (StaticPrecompiles) WithOsakaPrecompiles added in v0.6.6

func (s StaticPrecompiles) WithOsakaPrecompiles() StaticPrecompiles

func (StaticPrecompiles) WithSlashingPrecompile

func (s StaticPrecompiles) WithSlashingPrecompile(
	slashingKeeper slashingkeeper.Keeper,
	bankKeeper cmn.BankKeeper,
	opts ...Option,
) StaticPrecompiles

func (StaticPrecompiles) WithStakingPrecompile

func (s StaticPrecompiles) WithStakingPrecompile(
	stakingKeeper stakingkeeper.Keeper,
	bankKeeper cmn.BankKeeper,
	opts ...Option,
) StaticPrecompiles

Jump to

Keyboard shortcuts

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