keeper

package
v8.0.0-...-a9a65cb Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	*evmkeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(ek *evmkeeper.Keeper, ak fxevmtypes.AccountKeeper) *Keeper

func (*Keeper) ApplyContract

func (k *Keeper) ApplyContract(ctx context.Context, from, contract common.Address, value *big.Int, abi abi.ABI, method string, constructorData ...interface{}) (*evmtypes.MsgEthereumTxResponse, error)

ApplyContract apply contract with args

func (*Keeper) BeginBlock

func (k *Keeper) BeginBlock(ctx sdk.Context) error

BeginBlock sets the sdk Context and EIP155 chain id to the Keeper.

func (*Keeper) CallContract

func (*Keeper) CreateContractWithCode

func (k *Keeper) CreateContractWithCode(ctx sdk.Context, address common.Address, code []byte) error

CreateContractWithCode create contract account and set code

func (*Keeper) DeployContract

func (k *Keeper) DeployContract(ctx sdk.Context, from common.Address, abi abi.ABI, bin []byte, args ...interface{}) (common.Address, error)

DeployContract deploy contract with args

func (*Keeper) DeployUpgradableContract

func (k *Keeper) DeployUpgradableContract(ctx sdk.Context, from, logic common.Address, logicData []byte, abi *abi.ABI, args ...interface{}) (common.Address, error)

DeployUpgradableContract deploy upgrade contract and initialize it

func (*Keeper) ExecuteEVM

func (k *Keeper) ExecuteEVM(
	ctx sdk.Context,
	from common.Address,
	contract *common.Address,
	value *big.Int,
	gasLimit uint64,
	data []byte,
) (*types.MsgEthereumTxResponse, error)

func (*Keeper) InitGenesis

func (k *Keeper) InitGenesis(ctx sdk.Context)

InitGenesis initializes genesis state based on exported genesis

func (*Keeper) IsContract

func (k *Keeper) IsContract(ctx sdk.Context, account common.Address) bool

func (*Keeper) QueryContract

func (k *Keeper) QueryContract(ctx context.Context, from, contract common.Address, abi abi.ABI, method string, res interface{}, args ...interface{}) error

QueryContract query contract with args and res

func (*Keeper) UpdateContractCode

func (k *Keeper) UpdateContractCode(ctx sdk.Context, address common.Address, contractCode []byte) error

UpdateContractCode update contract code and code-hash

Jump to

Keyboard shortcuts

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