wasm

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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeInstantiateContract = "InstantiateContract"
	EventTypeExecuteContract     = "ExecuteContract"
	EventTypeMigrateContract     = "MigrateContract"
)

Variables

View Source
var (
	Address             = common.HexToAddress(hexAddress)
	DelegatecallAddress = common.HexToAddress(delegatecallHexAddress)
	ABI                 = abi.ABI{}
)

Functions

This section is empty.

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx context.Context, addr sdk.AccAddress) (acc sdk.AccountI)
}

type MethodWasm

type MethodWasm string
const (
	InstantiateContract  MethodWasm = "instantiateContract"
	InstantiateContract2 MethodWasm = "instantiateContract2"
	ExecuteContract      MethodWasm = "executeContract"
	MigrateContract      MethodWasm = "migrateContract"

	SmartContractState MethodWasm = "smartContractState"
)

type PrecompiledWasm

type PrecompiledWasm struct {
	cmn.Precompile
	abi.ABI
	// contains filtered or unexported fields
}

func (PrecompiledWasm) EmitExecuteContractEvent

func (p PrecompiledWasm) EmitExecuteContractEvent(
	ctx sdk.Context,
	stateDB vm.StateDB,
	sender common.Address,
	contractAddress common.Address,
	msg []byte,
	funds sdk.Coins,
	data []byte,
) (err error)

EmitExecuteContractEvent creates a new event emitted on ExecuteContract

func (PrecompiledWasm) EmitInstantiateContractEvent

func (p PrecompiledWasm) EmitInstantiateContractEvent(
	ctx sdk.Context,
	stateDB vm.StateDB,
	sender common.Address,
	admin common.Address,
	contractAddress common.Address,
	codeId *big.Int,
	label string,
	msg []byte,
	funds sdk.Coins,
	data []byte,
) (err error)

EmitInstantiateContractEvent creates a new event emitted on InstantiateContract, InstantiateContract2

func (PrecompiledWasm) EmitMigrateContractEvent

func (p PrecompiledWasm) EmitMigrateContractEvent(
	ctx sdk.Context,
	stateDB vm.StateDB,
	sender common.Address,
	contractAddress common.Address,
	codeId *big.Int,
	msg []byte,
	data []byte,
) (err error)

EmitMigrateContractEvent creates a new event emitted on MigrateContract

func (PrecompiledWasm) Execute added in v1.9.0

func (p PrecompiledWasm) Execute(ctx sdk.Context, stateDB vm.StateDB, contract *vm.Contract, readOnly bool, caller common.Address) ([]byte, error)

func (PrecompiledWasm) IsTransaction

func (PrecompiledWasm) IsTransaction(method *abi.Method) bool

func (PrecompiledWasm) Logger

func (p PrecompiledWasm) Logger(ctx sdk.Context) log.Logger

func (PrecompiledWasm) RequiredGas

func (p PrecompiledWasm) RequiredGas(input []byte) uint64

func (*PrecompiledWasm) Run

func (p *PrecompiledWasm) Run(evm *vm.EVM, contract *vm.Contract, readonly bool) (bz []byte, err error)

Run is the entry point for the basic call.

func (*PrecompiledWasm) RunDelegate added in v1.9.0

func (p *PrecompiledWasm) RunDelegate(evm *vm.EVM, contract *vm.Contract, readonly bool) (bz []byte, err error)

RunDelegate is the entry point for the delegatecall-only precompile.

type WasmKeeper

type WasmKeeper interface {
	QuerySmart(ctx context.Context, contractAddr sdk.AccAddress, req []byte) ([]byte, error)
}

Jump to

Keyboard shortcuts

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