snapshot
Blog
  • Welcome to Snapshot docs
  • User guides
    • Spaces
      • What is a space?
      • Create a space
        • Register an ENS domain
        • Alternative way to create a space
      • Settings
      • Sub-spaces
      • Space verification
      • Space hibernation
      • Add a custom domain
      • Add a skin
      • Space roles
      • Space badges
      • Snapshot Pro
      • Space handbook
        • Most common
        • Voting threshold
        • Anti-whale
        • Sybil resistance, scam & spam prevention
        • Liquidity / staking pool
        • Delegation
        • NFT voting
          • Most common: ERC-721
          • Multi-token: ERC-1155
          • POAP - Proof of Attendance
        • Custom calculations
    • Create a proposal
    • Voting
      • Vote on a proposal
      • Delegate your voting power
    • Voting strategies
    • Validation strategies
    • Using Safe multi-sig
    • Delegation
  • Developer Guides
    • Create a voting strategy
    • Create a validation strategy
    • Identify integrator activity
    • Add a network
  • Tools
    • Tools overview
    • Snapshot.js
    • API
      • API Keys
    • Webhooks
    • Subgraphs
    • Mobile notifications
    • Bots
  • Snapshot X
    • Overview
    • User guides
      • Create a space
      • Proposals
      • Voting
      • Safe execution setup
    • Protocol
      • Overview
      • Space actions
      • Space controller actions
      • Authenticators
      • Proposal validations
      • Voting strategies
      • Starknet specifics
      • Execution strategies
      • Audits
    • Services
      • Architecture
      • API
      • SX.js
      • UI
      • Mana
  • V1 interface
    • Email notifications
    • Plugins
      • What is a plugin?
      • Create a plugin
      • oSnap
      • SafeSnap
      • POAP
      • Quorum
      • Domino notifications
      • Galxe
    • Boost
  • Community
    • Help center
    • Discord
    • X (Twitter)
    • GitHub
Powered by GitBook
On this page
  • erc1155-balance-of
  • erc1155-all-balances-of
  • erc1155-balance-of-ids
  • erc1155-with-multiplier
  • erc1155-balance-of-ids-weighted

Was this helpful?

Edit on GitHub
Export as PDF
  1. User guides
  2. Spaces
  3. Space handbook
  4. NFT voting

Multi-token: ERC-1155

The standard for fungible, non-fungible, and semi-fungible tokens.

PreviousMost common: ERC-721NextPOAP - Proof of Attendance

Last updated 1 year ago

Was this helpful?

Let's start with a quick overview of the and standards:

Pros
Cons

ERC-721

Most widely recognized, golden NFT standard

Inability to conduct batch transfers

ERC-1155

Supports different token types in a single contract, allows batch transfers

Stores less robust information in order to save time and transaction costs

Let's have a look at what Voting Strategies you can use in your space:

The strategy returns the balance of a specific ERC-1155 token in the user's wallet.

Since the ERC-1155 standard supports multiple token types, the tokenId here may refer to a particular kind of token or a single item of the collection under the contract address.

If you want to get the balance of all tokenIds in the contract, you can use the erc1155-balance-of-all strategy. If you have multiple tokenIds, you can use the erc1155-balance-of-ids or erc1155-balance-of-ids-weighted strategy.

Strategy setup:

{
  "symbol": "ABC",
  "address": "0xE18a32192ED95b0FE9D70D19e5025f103475d7BA",
  "tokenId": "0x8000000000000000000000000000000200000000000000000000000000000000",
  "decimals": 0
}

You can test it out in the Playground on Snapshot:

This strategy returns the balance of voters for all tokens in an ERC1155 contract.

On Polygon, works only with contracts with total tokenIds less than 6000.

Strategy setup:

{
  "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2",
  "symbol": "CYBORG"
}

You can test it out in the Playground on Snapshot:

Use this strategy if you want to calculate the Voting Power taking into account multiple tokenIDs.

Try using this strategy with only a few tokenIDs passed in the parameter for the Score API server is likely to have difficulty handling a large number of requests.

Strategy setup:

{
  "symbol": "ABC",
  "address": "0x2939b94BDc377e66A377cfc15028DF3Bd6aC6C28",
  "ids": [
    "59",
    "352"
  ]
}

You can test it out in the Playground on Snapshot:

By adjusting the multiplier to 5, if a user owns 1 DAWN in his wallet, they will get 5 Voting Power (1*5).

Strategy setup:

{
  "address": "0x2C56b43983Ca77cc29b27B4a731F0f0d54ae7e52",
  "tokenId": 1,
  "symbol": "DAWN",
  "decimals": 0,
  "multiplier": 5
}

You can test it out in the Playground on Snapshot:

If you'd like to give more or less weight to a list of specific tokenIDs, you can do so by using this strategy. It might serve as a great addition to the erc1155-with-multiplier for VP differentiation.

Strategy setup:

{
  "symbol": "ABC",
  "address": "0x28472a58A490c5e09A238847F66A68a47cC76f0f",
  "ids": [
    "0",
    "1"
  ],
  "weight": 10
}

You can test it out in the Playground on Snapshot:

The equivalent of the Voting Strategy.

erc1155-all-balances-of
erc1155-balance-of-ids
erc1155-with-multiplier
erc1155-balance-of-ids-weighted
ERC721
ERC1155
erc1155-balance-of
Snapshot
Snapshot
Snapshot
Snapshot
Snapshot
erc721-with-multiplier
Logo
Logo
Logo
Logo
Logo