Skip to main content

Contracts

Objects are at the core of the Previous protocol.

Objects are minted from sets, and both the sets and the kinds must be registered in their respective registries. An object can interoperate with other objects through relations. Relations are registered, and the combination of relations and kinds enables interoperability between objects from different vendors.

Objects can be composed of or interact with traditional fungible tokens or NFTs. These tokens are registered to make them programmable not only on the universe chain but also on the Previous chain.

Core contracts of the Previous protocol include:

  • Set Registry: Manages the registration and organization of sets.
  • Kind Registry: Manages the registration of kinds, defining the types and structures of objects.
  • Relation Registry: Manages the relationships between different objects, sets, and kinds.
  • Token Registry: Manages fungible and non-fungible tokens within the protocol.

Kind Registry

The Kind Registry contract is central to the Previous Protocol, managing the registration of “kinds,” which define the types and structures of objects within the protocol. Each kind specifies the attributes and behaviors that objects of that kind possess. This registry ensures that all kinds are uniquely identifiable and their definitions are consistent across the network. Registration of a new kind must be validated to ensure it adheres to protocol standards.

Set Registry

The Set Registry manages the registration and organization of sets. Sets in the Previous Protocol are equivalent to NFT contracts in other systems. They group objects (NFTs) that share similar characteristics or belong to a specific collection. The Set Registry allows for the creation, updating, and querying of these sets, providing a structured way to manage collections of objects within the protocol.

Relation Registry

The Relation Registry is designed to manage the relationships between different objects, sets, and kinds. It allows for the definition of relationships that specify how entities within the protocol interact with each other. This registry supports complex relational mappings, ensuring that all interactions are valid and adhere to the defined rules of the protocol. Relationships can include ownership, dependencies, or hierarchical structures.

Token Registry

The Token Registry is responsible for managing fungible and non-fungible tokens within the Previous Protocol. It supports the registration of tokens, tracking their issuance, and ensuring that they comply with the protocol’s standards. The Token Registry facilitates the seamless integration and interaction of tokens with other elements of the protocol, such as sets and kinds.