Skip to main content

ERC1155

ERC1155 resource provides operations for interacting with multi-token contracts.

Overview

ERC1155 is a multi-token standard that can represent both fungible and non-fungible tokens in a single contract.

Operations

Balance Of

Get the balance of a specific token ID for an address.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC1155 contract address
  • Account (required): Address to check balance for
  • Token ID (required): The token ID to query

Example Output:

{
"balance": "10"
}

Balance Of Batch

Get balances for multiple accounts and token IDs in one call.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC1155 contract address
  • Accounts (required): Array of addresses
  • Token IDs (required): Array of token IDs

Example:

{
"contractAddress": "0x...",
"accounts": ["0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb", "0x1111111254fb6c44bAC0beD2854e76F90643097d"],
"tokenIds": ["1", "2"]
}

Output:

{
"balances": ["10", "25"]
}

Safe Transfer From

Transfer a single token type to another address.

Required Credentials: Ethereum RPC, Ethereum Account

Parameters:

  • Contract Address (required): The ERC1155 contract address
  • From (required): Sender address
  • To (required): Recipient address
  • Token ID (required): The token ID to transfer
  • Amount (required): Amount to transfer
  • Data (optional): Additional data

Example:

{
"contractAddress": "0x...",
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"to": "0x1111111254fb6c44bAC0beD2854e76F90643097d",
"tokenId": "1",
"amount": "10",
"data": "0x"
}

Output:

{
"hash": "0x1234567890abcdef...",
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"to": "0x..."
}

Safe Batch Transfer From

Transfer multiple token types in a single transaction.

Required Credentials: Ethereum RPC, Ethereum Account

Parameters:

  • Contract Address (required): The ERC1155 contract address
  • From (required): Sender address
  • To (required): Recipient address
  • Token IDs (required): Array of token IDs
  • Amounts (required): Array of amounts
  • Data (optional): Additional data

Example:

{
"contractAddress": "0x...",
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"to": "0x1111111254fb6c44bAC0beD2854e76F90643097d",
"tokenIds": ["1", "2", "3"],
"amounts": ["10", "5", "20"],
"data": "0x"
}

Output:

{
"hash": "0x1234567890abcdef...",
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"to": "0x..."
}

Set Approval For All

Approve an operator to manage all tokens.

Required Credentials: Ethereum RPC, Ethereum Account

Parameters:

  • Contract Address (required): The ERC1155 contract address
  • Operator (required): Address to approve
  • Approved (required): true to approve, false to revoke

Example:

{
"contractAddress": "0x...",
"operator": "0x1111111254fb6c44bAC0beD2854e76F90643097d",
"approved": true
}

Output:

{
"hash": "0x1234567890abcdef...",
"from": "0xYourAddress...",
"to": "0x..."
}

Is Approved For All

Check if an operator is approved.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC1155 contract address
  • Owner (required): Owner address
  • Operator (required): Operator address

Example:

{
"contractAddress": "0x...",
"owner": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"operator": "0x1111111254fb6c44bAC0beD2854e76F90643097d"
}

Output:

{
"isApprovedForAll": true
}

URI

Get the metadata URI for a token.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC1155 contract address
  • Token ID (required): The token ID to query

Example:

{
"contractAddress": "0x...",
"tokenId": "1"
}

Output:

{
"uri": "https://token-cdn-domain/{id}.json"
}

Common Use Cases

Batch Token Transfer

[Trigger] → [Safe Batch Transfer From] → [Wait For Transaction] → [Notification]

Check Multiple Balances

[Schedule Trigger] → [Balance Of Batch] → [Process Balances] → [Store]

Tips

  • Batch Operations: ERC1155 excels at batch operations, reducing gas costs
  • Multi-Token: Can represent both fungible and non-fungible tokens
  • Gaming: Popular for gaming items and in-game currencies
  • Efficiency: More gas-efficient than ERC721 for multiple tokens