aspect

package
v0.4.9-rc9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Uint256, _ = abi.NewType("uint256", "", nil)
	Uint64, _  = abi.NewType("uint64", "", nil)
	Uint32, _  = abi.NewType("uint32", "", nil)
	Uint16, _  = abi.NewType("uint16", "", nil)
	Uint8, _   = abi.NewType("uint8", "", nil)

	String, _     = abi.NewType("string", "", nil)
	Bool, _       = abi.NewType("bool", "", nil)
	Bytes, _      = abi.NewType("bytes", "", nil)
	Bytes32, _    = abi.NewType("bytes32", "", nil)
	Address, _    = abi.NewType("address", "", nil)
	Uint64Arr, _  = abi.NewType("uint64[]", "", nil)
	AddressArr, _ = abi.NewType("address[]", "", nil)
	Int8, _       = abi.NewType("int8", "", nil)
	// Special types for testing
	Uint32Arr2, _       = abi.NewType("uint32[2]", "", nil)
	Uint64Arr2, _       = abi.NewType("uint64[2]", "", nil)
	Uint256Arr, _       = abi.NewType("uint256[]", "", nil)
	Uint256Arr2, _      = abi.NewType("uint256[2]", "", nil)
	Uint256Arr3, _      = abi.NewType("uint256[3]", "", nil)
	Uint256ArrNested, _ = abi.NewType("uint256[2][2]", "", nil)
	Uint8ArrNested, _   = abi.NewType("uint8[][2]", "", nil)
	Uint8SliceNested, _ = abi.NewType("uint8[][]", "", nil)
	KvPair, _           = abi.NewType("tuple", "struct Overloader.F", []abi.ArgumentMarshaling{
		{Name: "key", Type: "bytes"},
		{Name: "value", Type: "bytes"},
	})
	KvPairArr, _ = abi.NewType("tuple[]", "struct Overloader.F", []abi.ArgumentMarshaling{
		{Name: "key", Type: "string"},
		{Name: "value", Type: "bytes"},
	})
	AspectBoundInfoArr, _ = abi.NewType("tuple[]", "struct Overloader.F", []abi.ArgumentMarshaling{
		{Name: "aspectId", Type: "address"},
		{Name: "version", Type: "uint64"},
		{Name: "priority", Type: "int8"},
	})
)
View Source
var AbiMap = func() map[string]string {
	abiIndex := make(map[string]string)
	for name, expM := range methods {
		abiIndex[hex.EncodeToString(expM.ID)] = name
	}
	return abiIndex
}

Functions

func GetMethodName

func GetMethodName(callData []byte) (string, error)

func IsAspectDeploy

func IsAspectDeploy(to *common.Address, callData []byte) bool

func ParseInput

func ParseInput(tx []byte) (*abi.Method, map[string]interface{}, error)

func ParseMethod

func ParseMethod(callData []byte) (*abi.Method, map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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