sui_verifier_latest

Module id_leak_verifier

Source
Expand description

Objects whose struct type has key ability represent Sui objects. They have unique IDs that should never be reused. This verifier makes sure that the id field of Sui objects never get leaked. Unpack is the only bytecode that could extract the id field out of a Sui object. From there, we track the flow of the value and make sure it can never get leaked outside of the function. There are four ways it can happen:

  1. Returned
  2. Written into a mutable reference
  3. Added to a vector
  4. Passed to a function cal::;

Functionsยง