# `Ethers.Contracts.ERC1155`
[🔗](https://github.com/ExWeb3/elixir_ethers/blob/v0.6.12/lib/ethers/contracts/erc1155.ex#L1)

ERC1155 token interface

More info: https://eips.ethereum.org/EIPS/eip-1155

# `__default_address__`

```elixir
@spec __default_address__() :: nil
```

Default address of the contract. Returns `nil` if not specified.

To specify a default address see `Ethers.Contract`

# `balance_of`

```elixir
@spec balance_of(Ethers.Types.t_address(), non_neg_integer()) :: Ethers.TxData.t()
```

Prepares `balanceOf(address account, uint256 id)` call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use `Ethers.call/2`)

State mutability: `view`

## Function Parameter Types
 - account: `:address`
 - id: `{:uint, 256}`

## Return Types (when called with `Ethers.call/2`)
 - `{:uint, 256}`

# `balance_of_batch`

```elixir
@spec balance_of_batch([Ethers.Types.t_address()], [non_neg_integer()]) ::
  Ethers.TxData.t()
```

Prepares `balanceOfBatch(address[] accounts, uint256[] ids)` call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use `Ethers.call/2`)

State mutability: `view`

## Function Parameter Types
 - accounts: `{:array, :address}`
 - ids: `{:array, {:uint, 256}}`

## Return Types (when called with `Ethers.call/2`)
 - `{:array, {:uint, 256}}`

# `constructor`

```elixir
@spec constructor() :: binary()
```

Prepares contract constructor values for deployment.

To deploy a contracts use `Ethers.deploy/2` and pass the result of this function as
`:encoded_constructor` option.

## Parameters

# `is_approved_for_all`

```elixir
@spec is_approved_for_all(Ethers.Types.t_address(), Ethers.Types.t_address()) ::
  Ethers.TxData.t()
```

Prepares `isApprovedForAll(address account, address operator)` call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use `Ethers.call/2`)

State mutability: `view`

## Function Parameter Types
 - account: `:address`
 - operator: `:address`

## Return Types (when called with `Ethers.call/2`)
 - `:bool`

# `safe_batch_transfer_from`

```elixir
@spec safe_batch_transfer_from(
  Ethers.Types.t_address(),
  Ethers.Types.t_address(),
  [non_neg_integer()],
  [non_neg_integer()],
  binary()
) :: Ethers.TxData.t()
```

Prepares `safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] values, bytes data)` call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use `Ethers.send_transaction/2`).
No amount of Ether can be sent with this function.

State mutability: `non_payable`

## Function Parameter Types
 - from: `:address`
 - to: `:address`
 - ids: `{:array, {:uint, 256}}`
 - values: `{:array, {:uint, 256}}`
 - data: `:bytes`

## Return Types (when called with `Ethers.call/2`)
This function does not return any values!

# `safe_transfer_from`

```elixir
@spec safe_transfer_from(
  Ethers.Types.t_address(),
  Ethers.Types.t_address(),
  non_neg_integer(),
  non_neg_integer(),
  binary()
) :: Ethers.TxData.t()
```

Prepares `safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes data)` call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use `Ethers.send_transaction/2`).
No amount of Ether can be sent with this function.

State mutability: `non_payable`

## Function Parameter Types
 - from: `:address`
 - to: `:address`
 - id: `{:uint, 256}`
 - value: `{:uint, 256}`
 - data: `:bytes`

## Return Types (when called with `Ethers.call/2`)
This function does not return any values!

# `set_approval_for_all`

```elixir
@spec set_approval_for_all(Ethers.Types.t_address(), boolean()) :: Ethers.TxData.t()
```

Prepares `setApprovalForAll(address operator, bool approved)` call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use `Ethers.send_transaction/2`).
No amount of Ether can be sent with this function.

State mutability: `non_payable`

## Function Parameter Types
 - operator: `:address`
 - approved: `:bool`

## Return Types (when called with `Ethers.call/2`)
This function does not return any values!

# `supports_interface`

```elixir
@spec supports_interface(&lt;&lt;_::32&gt;&gt;) :: Ethers.TxData.t()
```

Prepares `supportsInterface(bytes4 interfaceId)` call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use `Ethers.call/2`)

State mutability: `view`

## Function Parameter Types
 - interfaceId: `{:bytes, 4}`

## Return Types (when called with `Ethers.call/2`)
 - `:bool`

# `uri`

```elixir
@spec uri(non_neg_integer()) :: Ethers.TxData.t()
```

Prepares `uri(uint256)` call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use `Ethers.call/2`)

State mutability: `view`

## Function Parameter Types
 - `{:uint, 256}`

## Return Types (when called with `Ethers.call/2`)
 - `:string`

---

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