I’m trying to get a clear picture of how address
, ID
, and UID
interact.
From what I gather, tx_context::fresh_object_address(ctx)
is used to create a new address in TxContext
, which acts as a unique identifier. Then there’s the ID
structure that includes this address in the field bytes and allows for copying, dropping, and storing:
struct ID has copy, drop, store{
bytes: address,
}
On top of this, UID
is a wrapper around ID
, limiting it so that we can’t just copy or drop it. I want to make sure I’ve got this right:
- Is my understanding of the connections between
address
,ID
, andUID
accurate? - Could I be missing any important details or functionalities of these components?