ExPlasma.Transaction.Type.Fee (ExPlasma v0.2.0)
Implementation of Transaction behaviour for Fee claiming type.
Link to this section Summary
Functions
Creates output for a fee transaction
Decodes an RLP list into a Fee Transaction.
Turns a structure instance into a structure of RLP items, ready to be RLP encoded
Validates the Transaction.
Link to this section Types
Link to this type
mapping_error()
Specs
mapping_error() :: :malformed_transaction
Link to this type
validation_error()
Specs
validation_error() :: ExPlasma.Transaction.Type.Fee.Validator.outputs_validation_error() | {:nonce, :malformed_nonce}
Link to this section Functions
Link to this function
new_output(fee_claimer, token, amount)
Specs
new_output( ExPlasma.Crypto.address_t(), ExPlasma.Crypto.address_t(), pos_integer() ) :: ExPlasma.Output.t()
Creates output for a fee transaction
Example
iex> output = new_output(<<1::160>>, <<0::160>>, 1)
iex> %ExPlasma.Output{
...> output_data: %{amount: 1, output_guard: <<1::160>>, token: <<0::160>>},
...> output_id: nil,
...> output_type: 2
...> } = output
Link to this function
to_map(arg1)
Decodes an RLP list into a Fee Transaction.
Only validates that the RLP is structurally correct. Does not perform any other kind of validation, use validate/1 for that.
Link to this function
to_rlp(transaction)
Turns a structure instance into a structure of RLP items, ready to be RLP encoded
Link to this function
validate(transaction)
Validates the Transaction.