exw3 v0.4.0 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 data based on given type signature

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

Encodes options into Ethereum JSON RPC hex string

Simple eth_call to client. Recommended to use ExW3.Contract.call instead

Simple eth_send_transaction. Recommended to use ExW3.Contract.send instead

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

Gets event changes (logs) by filter. Unlike ExW3.Contract.get_filter_changes it does not return the data in a formatted way

Returns the map used for ether unit conversion

checks if the address is a valid checksummed address

Returns a 0x prepended 32 byte hash of the input string

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

Creates a new filter, returns filter id. For more sophisticated use, prefer ExW3.Contract.filter

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

Converts bytes to Ethereum address

returns a checksummed address

Converts ethereum hex string to decimal number

Returns transaction receipt for specified transaction hash(id)

Returns the type signature of a given function

Uninstalls filter from the ethereum node

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_data(types_signature, data) View Source
decode_data(binary(), binary()) :: any()

Decodes data based on given type signature

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 encode_option(value) View Source
encode_option(integer()) :: binary()

Encodes options into Ethereum JSON RPC hex string

Link to this function eth_call(arguments) View Source
eth_call([]) :: any()

Simple eth_call to client. Recommended to use ExW3.Contract.call instead.

Link to this function eth_send(arguments) View Source
eth_send([]) :: any()

Simple eth_send_transaction. Recommended to use ExW3.Contract.send instead.

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 get_filter_changes(filter_id) View Source
get_filter_changes(binary()) :: any()

Gets event changes (logs) by filter. Unlike ExW3.Contract.get_filter_changes it does not return the data in a formatted way

Link to this function get_unit_map() View Source
get_unit_map() :: %{}

Returns the map used for ether unit conversion

Link to this function is_valid_checksum_address(address) View Source
is_valid_checksum_address(binary()) :: boolean()

checks if the address is a valid checksummed address

Link to this function keccak256(string) View Source
keccak256(binary()) :: binary()

Returns a 0x prepended 32 byte hash of the input string

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 new_filter(map) View Source
new_filter(%{}) :: binary()

Creates a new filter, returns filter id. For more sophisticated use, prefer ExW3.Contract.filter.

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_checksum_address(address) View Source
to_checksum_address(binary()) :: binary()

returns a checksummed 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

Link to this function uninstall_filter(filter_id) View Source
uninstall_filter(binary()) :: boolean()

Uninstalls filter from the ethereum node