2

My goal is to create an interoperable NFT collection in the Polkadot native ecosystem and allow its holders to interact with it on a parachain's smart contract. In that smart contract, the holder can burn their NFT and mint another NFT in return.

Is this possible in the future from a technical point of view?

We can create non-fungible assets with Statemint/Statemine pallet-uniques. I think that those NFTs will be able to be transferred to smart contract parachains via XCM reserve-backed transfer.

However, my understanding is that this is not a trusted teleport, so only transfers are allowed on the smart contract parachain. Similarly, I guess the asset instance's metadata/attributes must be immutable.

Hence, my goal "when burnt then mint" is not feasible? Any ideas to realize this?

It can be achieved by maintaining external servers with an admin account that monitors chains and submit transactions, but that cannot be decentralized.

References:

4
  • This question is a bit confusing. Are you indeed specifically asking whether smart contracts can mint assets, or are you actually trying to ask about whether pallets can mint assets? Commented May 2, 2022 at 23:57
  • 1
    I'm asking whether smart contracts (ink! Wasm or EVM) can mint Statemint assets. Thank you, @KeithYeung
    – NoH
    Commented May 3, 2022 at 3:32
  • Then this is a question that is asking us to speculate a bit into the future. For one, I don't believe ink! SCs can freely call a chain's extrinsics, but someone can correct on this. For two, ink! SCs can't interact with XCM just yet. Both of these needs to happen first before we can talk about whether or not SCs can or should be able to mint Statemint assets. Commented May 3, 2022 at 5:04
  • That's right. The only way right now is to create assets using SCs on an EVM-enabled chain. But these assets are locked in on the chain, and I can't bring the assets to other chains.
    – NoH
    Commented May 3, 2022 at 7:18

1 Answer 1

1

XCM can certainly be used to burn an asset controlled by the XCM origin. This is fairly easy and amounts to a WithdrawAsset instruction followed by BurnAsset (new in XCMv3). A well-written XCM should work in a "fire-and-forget" mode, but confirmation is possible with the QueryHolding instruction.

The bigger question is creating a new asset. XCM doesn't yet has a specific instruction for creating a new asset remotely. This could be designed and added in a later version, though given the divergence of features between NFT systems, it's not clear to me that this would be an easy job.

In the meantime, you could send an XCM Transact instruction to the Uniques pallet in Statemint/e to "manually" create the new asset and assign it to the relevant owner. This is a little tricky as you'll need to calculate the relevant AccountId value for the owner, but it should be doable.

Alternatively, you could create the asset somewhere locally instead of Statemint/e.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.