Contract data storage
The SBT standard defines what data must be stored in the contract. Each SBT contract must store the following fields:Message layouts
Interactions with SBT contracts, which are most often encountered by users and developers, are:- prove ownership: sending proof of SBT ownership to a destination contract.
- request current owner: requesting current owner information from SBT.
- destroy SBT: destroying the SBT contract and returning remaining balance.
- revoke SBT: marking the SBT as revoked by authority.
Bound to single owner
Theowner field is set during minting and remains immutable. The following sections describe the key operations and their message flows.
Prove ownership
This message flow allows theowner to ask the SBT to send a proof to a destination contract confirming that they own this SBT. May include arbitrary forward_payload and optionally attach content.
Prove ownership message (inbound to SBT)
TL-B
Ownership proof message (SBT -> destination contract)
TL-B
The transaction is rejected if the sender is not the
owner.
Request current owner
This message flow allows any initiator to ask the SBT to send the currentowner (and optionally the content) to a destination contract.
Request owner message (inbound to SBT)
TL-B
Owner info message (SBT -> destination contract)
TL-B
Destroy
This message flow allows theowner to destroy the SBT contract. This clears the owner and authority fields, and sends remaining balance back to the sender via an excesses message.
Destroy message (inbound to SBT)
TL-B
Excesses message (SBT -> sender)
TL-B
The transaction is rejected if the sender is not the
owner.
Revoke SBT
This message flow allows theauthority to mark the SBT as revoked. Revoking twice is disallowed.
Revoke message (inbound to SBT)
TL-B
The transaction is rejected if:
- the sender is not the
authority; - the SBT was already revoked.