Support for ERC1155 in ExitFormat and MultiAssetHolder

I’m in the initial phases of a state channel project which would require this feature.

Looking at the code for ExitFormat it seems that someone has considered this may be required in the future and can be implemented using the metadata field (e.g. to store the ID for the token within the 1155 contract).

The main part of this work would be to update MultiAssetHolder to also support the tokenId parameter and a few other things.

Has anyone had a go at implementing this already or can foresee any difficulties I didn’t pick up on?

1 Like

@Willem_ChainSafe, welcome to the state channels forum! ExitFormat is a good fit for ERC-1155 tokens, but the work to support those tokens has not been started. We definitely welcome contributions to the project!

The path of least resistance would be to add the token id to the metadata field of SingleAssetExit. Then the asset payout logic would be modified/generalized to handle erc ERC-1155 tokens. This is not expected to be a large or complex change.

Hi @mike thanks for the reply.

If we get the go-ahead for this project you can definitely expect to see a PR from us in the future. There are some other features I would like to see as well but I might open a different thread to discuss.

Cheers, Willem

1 Like