precompiles

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 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

Overview

Package precompiles exposes Lumera and standard cosmos/evm precompile addresses, pre-parsed ABIs, and generic call helpers so SDK consumers can invoke precompile methods from Go without compiling Solidity themselves.

Three Lumera-specific precompiles are wrapped:

  • Action 0x0901 exposes x/action (Cascade, Sense)
  • Supernode 0x0902 exposes x/supernode lifecycle and metrics
  • Wasm 0x0903 enables bidirectional CosmWasm <-> EVM calls

The eight standard cosmos/evm precompiles are exposed as named address constants only; their Solidity-facing surface is documented in the lumera repo under docs/evm-integration/precompiles.

Index

Constants

This section is empty.

Variables

View Source
var (
	ActionAddress    = common.HexToAddress("0x0000000000000000000000000000000000000901")
	SupernodeAddress = common.HexToAddress("0x0000000000000000000000000000000000000902")
	WasmAddress      = common.HexToAddress("0x0000000000000000000000000000000000000903")
)

Lumera custom precompile addresses (per precompiles/precompiles.md).

View Source
var (
	P256Address         = common.HexToAddress("0x0000000000000000000000000000000000000100")
	Bech32Address       = common.HexToAddress("0x0000000000000000000000000000000000000400")
	StakingAddress      = common.HexToAddress("0x0000000000000000000000000000000000000800")
	DistributionAddress = common.HexToAddress("0x0000000000000000000000000000000000000801")
	ICS20Address        = common.HexToAddress("0x0000000000000000000000000000000000000802")
	BankAddress         = common.HexToAddress("0x0000000000000000000000000000000000000804")
	GovAddress          = common.HexToAddress("0x0000000000000000000000000000000000000805")
	SlashingAddress     = common.HexToAddress("0x0000000000000000000000000000000000000806")
)

Standard cosmos/evm precompile addresses (per precompiles/standard-precompiles.md).

View Source
var (
	ActionABI    abi.ABI
	SupernodeABI abi.ABI
	WasmABI      abi.ABI
)

Pre-parsed ABIs. Initialized at package load; init() panics if the embedded JSON is malformed (which would be a build-time error caught by tests).

Functions

func PackCall

func PackCall(parsed abi.ABI, method string, args ...any) ([]byte, error)

PackCall produces ABI-encoded calldata for a precompile method. Pass the method args in the order the Solidity interface declares them.

func UnpackReturn

func UnpackReturn(parsed abi.ABI, method string, ret []byte) ([]any, error)

UnpackReturn decodes the raw return bytes of a precompile call into the declared output types. Returns the slice of values matching the Solidity outputs (single return: out[0]).

Types

This section is empty.

Jump to

Keyboard shortcuts

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