transmissions11/solmate

Binary ERC1155

Bernardstanislas opened this issue · 5 comments

One can think about a case where an address can hold multiple token ids but only one instance max of each. This can be applied to numerous use cases, tokenized badges or tokenized skillset system in a game for example.

Given this rule of max supply of 1 per couple of address x token id, huge gas optimizations can be imagined, the main principle consisting in packing an address' balance of all tokens ids in a single uint256, composed of a sum of owned powers of 2.

I implemented such a contract which I poorly named BinaryERC1155 in this repo: https://github.com/MagicDustGG/binary-erc1155

After having seen your work on #192 I was wondering if you were interested in me proposing a PR for this contract, and what bette name you could think of for this type of ERC1155?

oh huh so a token ID can have multiple owners, but each owner can only have one?

Exactly! Only one of a given type but an owner can have multiple token ids

@transmissions11 interested in a PR?

Sure why not!

closing for now as this seems to have gone stale