Documentation ¶
Index ¶
Constants ¶
const ( IntTy byte = iota UintTy BoolTy StringTy SliceTy AddressTy FixedBytesTy BytesTy HashTy FixedPointTy FunctionTy )
Type enumerator
Variables ¶
var ( Big1 = big.NewInt(1) Big2 = big.NewInt(2) Big3 = big.NewInt(3) Big0 = big.NewInt(0) Big32 = big.NewInt(32) Big256 = big.NewInt(256) Big257 = big.NewInt(257) // MaxUint256 is the maximum value that can be represented by a uint256. MaxUint256 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 256), Big1) // MaxInt256 is the maximum value that can be represented by a int256. MaxInt256 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 255), Big1) )
Functions ¶
func ReadFixedBytes ¶
ReadFixedBytes uses reflection to create a fixed array to be read from.
func ReadInteger ¶
ReadInteger reads the integer based on its kind and returns the appropriate value.
Types ¶
type Argument ¶
Argument holds the name of the argument and the corresponding type. Types are used when packing and testing arguments.
type Arguments ¶
type Arguments []Argument
func (Arguments) NonIndexed ¶
NonIndexed returns the arguments with indexed arguments filtered out.
func (Arguments) UnpackValues ¶
UnpackValues can be used to unpack ABI-encoded hexdata according to the ABI-specification, without supplying a struct to unpack into. Instead, this method returns a list containing the values. An atomic argument will be a list with one element.
type Event ¶
type Event struct { // RawName is the raw event name parsed from ABI. RawName string Inputs Arguments // Sig contains the string signature according to the ABI spec. // e.g. event foo(uint32 a, int b) = "foo(uint32,int256)" // Please note that "int" is substitute for its canonical representation "int256" Sig string // ID returns the canonical representation of the event's signature used by the // abi definition to identify event names and types. ID common.Hash // contains filtered or unexported fields }
type Method ¶
currently tinygo does not support compile array, tuple, function, fixed bytes
func NewMethod ¶
NewMethod creates a new method from a string signature signature format: "method_name(type,type,...)"