types

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: Apache-2.0 Imports: 24 Imported by: 3

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,
	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) WithICS20Precompile

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

func (StaticPrecompiles) WithP256Precompile

func (s StaticPrecompiles) WithP256Precompile() StaticPrecompiles

func (StaticPrecompiles) WithPraguePrecompiles

func (s StaticPrecompiles) WithPraguePrecompiles() 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