pack

package
v0.0.0-...-24e5678 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidType = errors.New("invalid Type")
)

Functions

func ArgsToString

func ArgsToString(start int, method reflect.Method) (string, error)

methodToString convert the given golang method to appropriate solidity-type function contract function의 경우 index = 2 부터 실제 argument 이다. ex. router.AddLiqudity : func(*router.RounterFront, *types.ContractContext, common.Address, common.Address, *amount.Amount, *amount.Amount, *amount.Amount, *amount.Amount) (*amount.Amount, *amount.Amount, *amount.Amount, common.Address, error)

func ArgsToString2

func ArgsToString2(args []interface{}) (string, error)

ArgsToString2 convert the given arguments to appropriate solidity-type function arguments

func Pack

func Pack(args []interface{}) ([]byte, error)

Pack packs MethodCallEvent arguments. When unpacking, the function(event) definition is necessary

func PackElement

func PackElement(v reflect.Value) ([]byte, error)

PackElement packs the given reflect value according to the abi specification in v.

func ToUint256Bytes

func ToUint256Bytes(topics [][]byte, value reflect.Value) ([][]byte, error)

toUint256Bytes convert the given reflect-value to appropriate uint256 bytes representation and function-type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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