Smart Contracts
The Portrait Protocol is powered by a collection of smart contracts that manage the core interactions between users and the Portrait Protocol. The smart contracts are divided into several categories, each responsible for a specific aspect of the protocol. The smart contracts are designed to be modular and upgradable, allowing for easy maintenance and upgrades.
Overview of Smart Contracts
Open Source
To ensure transparency and security, the smart contracts are licensed under the MIT License. The contracts are available on GitHub (opens in a new tab).
Modularity and Upgradability
The contracts are designed to be modular and upgradable. The core contracts follow the UUPS (opens in a new tab) standard, allowing for easy upgrades and maintenance. Furthermore, the contracts are compliant with account abstraction, building on top of the EIP-6492 (opens in a new tab) standard.
Core Contracts
The core contracts are responsible for managing the core interactions between users and the Portrait Protocol.
Contract | Objective |
---|---|
PortraitIdRegistry | Manages the unique identifiers associated with a Portrait. |
PortraitNameRegistry | Manages the names associated with a Portrait. |
PortraitAccessRegistry | Manages the access control associated with a Portrait. |
PortraitPlanRegistry | Manages the plans associated with a Portrait. |
PortraitNodeRegistry | Manages the hosting nodes associated with a Portrait. |
PortraitStateRegistry 1 | Manages the latest data associated with a Portrait. |
Libraries and Utils
The libraries and utils are used by the core contracts to provide additional functionality and security.
Library/Util | Description |
---|---|
PortraitSigValidator | Validates the signatures associated with a Portrait. |
UniversalSigValidator | Validates account abstraction signatures, forked from the EIP-6492 (opens in a new tab) standard. |
Deployed Contracts
All contracts have been deployed on the Base Sepolia (opens in a new tab) testnet.
Core Contracts
Libraries and utils
Footnotes
-
The
PortraitStateRegistry
contract will be deprecated in the future in favor of the state returned by hosting nodes. ↩