Closed friedger closed 2 years ago
Here is another example where things are made more difficult by the incompatibility of SIP009 and SIP010.
https://github.com/MarvinJanssen/stx-atomic-swap/blob/master/stx/contracts/sip009-sip010-htlc.clar
Edit:
And a transferable-trait
for reference.
(define-trait transferable-trait
(
(transfer (uint principal principal) (response bool uint))
)
)
Native nfts and fts are incompatible by nature because the further are transferred by identifier, the latter by amount. However, for NFTs that use a uint as identifier, the same method signature for transfer can be used as FTs.
Sure, but in the case of SIP009 and SIP010 the above used to work which is pretty powerful. It is not out of the ordinary to represent either an amount or a token ID in a single uint
.
Closing this in favor of #52
There should a trait for digital assets that are transferable. The trait should work for the two native fungible and non-fungible assets. It should be some kind the smallest common denominator between NFTs (sip-9 like assets) and FTs (sip-10 like assets).