How to mint / transfer ERC1155 token to ERC6551 token bound address of ERC721 directly after mint?

179 views Asked by At

Say I have a smart contract for an ERC721 NFT collection (a), an ERC6551 smart contract that deploys a token bound account for these NFTS (b), and a contract for ERC1155 tokens (c).

Here's what I want to accomplish: Upon mint the user receives 1 ERC721 NFT that has a token bound account already deployed and is pre-stacked with the ERC1155 token.

With my little knowledge in this field I'd implement it like this:

  • after mint on contract (a), call contract (b) to deploy token bound account
  • once the TBA is deployed, call contract (c) to mint / transfer ERC1155 token to the TBA

Is this generally how you would implement something like that, or am I completely off? I'd aprpeciate any conceptual hint in the right direction.

1

There are 1 answers

1
ed_Chris On

Yes, your approach is correct. But there are some areas that can be optimized, such as combining the functions of contract A and contract B together。