compat

package
v0.15.45 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: GPL-3.0, LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package compat provides compatibility shims for functions removed from go-ethereum

Package compat provides compatibility helpers for uint256 and hexutil conversions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigMax

func BigMax(x, y *big.Int) *big.Int

BigMax returns the larger of x or y

func BigMin

func BigMin(x, y *big.Int) *big.Int

BigMin returns the smaller of x or y

func BigPow

func BigPow(a, b int64) *big.Int

BigPow returns a ** b as a big integer

func CompileSolidity

func CompileSolidity(solc string, sourcefiles ...string) (map[string]*Contract, error)

CompileSolidity is a stub for the removed function

func CompileSolidityString

func CompileSolidityString(source, solc string) (map[string]*Contract, error)

CompileSolidityString is a stub for the removed function

func S256

func S256() elliptic.Curve

S256 returns the secp256k1 curve

func S256Big

func S256Big(x *big.Int) *big.Int

S256Big interprets x as a two's complement number

func SolidityVersion

func SolidityVersion() string

SolidityVersion returns a hardcoded version since the function was removed

func U256

func U256(x *big.Int) *big.Int

U256 encodes as a 256 bit two's complement number

func U256Bytes

func U256Bytes(n *big.Int) []byte

U256Bytes converts a big Int into a 256bit byte array

func U256FromBig

func U256FromBig(b *big.Int) *uint256.Int

U256FromBig converts a big.Int to uint256.Int

func U256Hex

func U256Hex(u *uint256.Int) string

U256Hex converts *uint256.Int to the canonical 0x… hex string

func U256HexBig

func U256HexBig(b *big.Int) string

U256HexBig keeps old call-sites that passed *big.Int

Types

type Contract

type Contract struct {
	Code string
	Info ContractInfo
}

Contract represents a compiled contract (stub)

type ContractInfo

type ContractInfo struct {
	Source          string
	Language        string
	LanguageVersion string
	CompilerVersion string
	AbiDefinition   interface{}
	UserDoc         interface{}
	DeveloperDoc    interface{}
	Metadata        string
}

ContractInfo represents contract metadata (stub)

Jump to

Keyboard shortcuts

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