exw3 v0.1.2 ExW3 View Source

Link to this section Summary

Functions

returns all available accounts

Returns current balance of account

Returns block data for specified block number

Returns the current block number

converts Ethereum style bytes to string

Decodes event based on given data and provided signature

Decodes output based on specified functions return signature

Encodes data into Ethereum hex string based on types signature

Encodes event based on signature

Encodes input from a method call based on function signature

Encodes data and appends it to the encoded method id

Converts an Ethereum address into a form that can be used by the ABI encoder

Loads the abi at the file path and reformats it to a map

Loads the bin ar the file path

Returns the 4 character method id based on the hash of the method signature

Mines number of blocks specified. Default is 1

Reformats abi from list to map with event and function names as keys

Converts bytes to Ethereum address

Converts ethereum hex string to decimal number

Returns transaction receipt for specified transaction hash(id)

Returns the type signature of a given function

Link to this section Functions

Link to this function accounts() View Source
accounts() :: list()

returns all available accounts

Link to this function balance(account) View Source
balance(binary()) :: integer()

Returns current balance of account

Link to this function block(block_number) View Source
block(integer()) :: any()

Returns block data for specified block number

Link to this function block_number() View Source
block_number() :: integer()

Returns the current block number

Link to this function bytes_to_string(bytes) View Source
bytes_to_string(binary()) :: binary()

converts Ethereum style bytes to string

Link to this function decode_event(data, signature) View Source
decode_event(binary(), binary()) :: any()

Decodes event based on given data and provided signature

Link to this function decode_output(abi, name, output) View Source
decode_output(%{}, binary(), binary()) :: []

Decodes output based on specified functions return signature

Link to this function encode_data(types_signature, data) View Source
encode_data(binary(), []) :: binary()

Encodes data into Ethereum hex string based on types signature

Link to this function encode_event(signature) View Source
encode_event(binary()) :: binary()

Encodes event based on signature

Link to this function encode_input(abi, name, input) View Source
encode_input(%{}, binary(), []) :: binary()

Encodes input from a method call based on function signature

Link to this function encode_method_call(abi, name, input) View Source
encode_method_call(%{}, binary(), []) :: binary()

Encodes data and appends it to the encoded method id

Link to this function format_address(address) View Source
format_address(binary()) :: integer()

Converts an Ethereum address into a form that can be used by the ABI encoder

Link to this function keys_to_decimal(map, keys) View Source
keys_to_decimal(%{}, []) :: %{}
Link to this function load_abi(file_path) View Source
load_abi(binary()) :: []

Loads the abi at the file path and reformats it to a map

Link to this function load_bin(file_path) View Source
load_bin(binary()) :: binary()

Loads the bin ar the file path

Link to this function method_signature(abi, name) View Source
method_signature(%{}, binary()) :: binary()

Returns the 4 character method id based on the hash of the method signature

Link to this function mine(num_blocks \\ 1) View Source
mine(integer()) :: any()

Mines number of blocks specified. Default is 1

Link to this function reformat_abi(abi) View Source
reformat_abi([]) :: %{}

Reformats abi from list to map with event and function names as keys

Link to this function to_address(bytes) View Source
to_address(binary()) :: binary()

Converts bytes to Ethereum address

Link to this function to_decimal(hex_string) View Source
to_decimal(binary()) :: number()

Converts ethereum hex string to decimal number

Link to this function tx_receipt(tx_hash) View Source
tx_receipt(binary()) :: %{}

Returns transaction receipt for specified transaction hash(id)

Link to this function types_signature(abi, name) View Source
types_signature(%{}, binary()) :: binary()

Returns the type signature of a given function