Skip to content

AbiEventParametersDataToPrimative

Sames as AbiParametersToPrimative but for event parameter types.

Signature

pub fn AbiEventParametersDataToPrimative(comptime paramters: []const AbiEventParameter) type

AbiEventParameterDataToPrimative

Sames as AbiParameterToPrimative but for event parameter types.

Signature

pub fn AbiEventParameterDataToPrimative(comptime param: AbiEventParameter) type

AbiEventParametersToPrimativeType

Convert sets of solidity ABI Event indexed parameters to the representing Zig types.

This will create a tuple type of the subset of the resulting types generated by AbiEventParameterToPrimativeType. If the paramters length is O then the resulting type a tuple of just the Hash type.

Signature

pub fn AbiEventParametersToPrimativeType(comptime event_params: []const AbiEventParameter) type

AbiEventParameterToPrimativeType

Converts the abi event parameters into native zig types This is intended to be used for log topic data or in other words were the params are indexed.

Signature

pub fn AbiEventParameterToPrimativeType(comptime param: AbiEventParameter) type

AbiParametersToPrimative

Convert sets of solidity ABI paramters to the representing Zig types.

This will create a tuple type of the subset of the resulting types generated by AbiParameterToPrimative. If the paramters length is O then the resulting type will be a void type.

Signature

pub fn AbiParametersToPrimative(comptime paramters: []const AbiParameter) type

AbiParameterToPrimative

Convert solidity ABI paramter to the representing Zig types.

The resulting type will depend on the parameter passed in. string, fixed/bytes and addresses will result in the zig string type.

For the int/uint type the resulting type will depend on the values attached to them. If the value is not divisable by 8 or higher than 256 compilation will fail. For example ParamType{.int = 120} will result in the i120 type.

If the param is a dynamicArray then the resulting type will be a slice of the set of base types set above.

If the param type is a fixedArray then the a array is returned with its size depending on the size property on it.

Finally for tuple type a struct will be created where the field names are property names that the components array field has. If this field is null compilation will fail.

Signature

pub fn AbiParameterToPrimative(comptime param: AbiParameter) type