# `Ethers.TxData`
[🔗](https://github.com/ExWeb3/elixir_ethers/blob/v0.6.12/lib/ethers/tx_data.ex#L1)

Transaction struct to hold information about the ABI selector, encoded data
and the target `to` address.

# `t`

```elixir
@type t() :: %Ethers.TxData{
  base_module: atom() | nil,
  data: binary() | [binary()],
  default_address: nil | Ethers.Types.t_address(),
  selector: ABI.FunctionSelector.t()
}
```

Holds transaction data, the function selector and the default `to` address.

Can be passed in to `Ethers.call/2` or `Ethers.send_transaction/2` to execute.

# `abi_decode`

```elixir
@spec abi_decode(binary(), ABI.FunctionSelector.t() | t(), type :: :input | :output) ::
  {:ok, any() | [any()]}
```

ABI decodes a function input/output given a TxData or FunctionSelector

# `to_map`

```elixir
@spec to_map(t() | map(), Keyword.t()) :: map()
```

Converts a TxData struct and optional overrides to a map ready for RPC data.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
