ex_plasma v0.1.0 ExPlasma.Client.State

Module to fetch all the contract configurations and current 'state' available.

Link to this section Summary

Functions

Returns the authority address.

Returns the child block interval, which controls the incrementing block number for each child block.

Returns a ExPlasma.Block for the given block number.

Returns the exit game address for the given transaction type id.

Returns the exit id for the given tx_bytes and utxo_pos.

Returns whether the exit queue has been added for a given vault_id and token.

Returns the next child block to be mined.

Returns the next deposit block to be mined.

Returns the existing standard exit for the given exit id. The exit id is connected to a specific UTXO existing in the contract.

Link to this section Functions

Link to this function

authority()

authority() :: String.t() | tuple()

Returns the authority address.

Example

iex> ExPlasma.Client.authority() "ffcf8fdee72ac11b5c542428b35eef5769c409f0"

Link to this function

child_block_interval()

child_block_interval() :: tuple()

Returns the child block interval, which controls the incrementing block number for each child block.

Link to this function

get_block(blknum)

get_block(pos_integer()) :: ExPlasma.Block.t() | tuple()

Returns a ExPlasma.Block for the given block number.

Link to this function

get_exit_game_address(txn_type_id)

Returns the exit game address for the given transaction type id.

Link to this function

get_standard_exit_id(is_deposit, tx_bytes, utxo_pos)

Returns the exit id for the given tx_bytes and utxo_pos.

Link to this function

has_exit_queue(vault_id, token_address)

has_exit_queue(non_neg_integer(), String.t()) :: tuple()

Returns whether the exit queue has been added for a given vault_id and token.

Link to this function

next_child_block()

next_child_block() :: tuple()

Returns the next child block to be mined.

Link to this function

next_deposit_block()

next_deposit_block() :: tuple()

Returns the next deposit block to be mined.

Examples

iex> ExPlasma.Client.next_deposit_block() 1

Link to this function

standard_exit_bond_size()

Link to this function

standard_exits(exit_id)

Returns the existing standard exit for the given exit id. The exit id is connected to a specific UTXO existing in the contract.