👋
Portrait is currently in public beta. Sign up at portrait.so.
Safety and security nets are in place while Portrait is in beta. Read more about the security measures in place.

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.

Modularity and Upgradability

The contracts are designed to be modular and upgradable. The core contracts follow the UUPS standard, allowing for easy upgrades and maintenance. Furthermore, the contracts are compliant with account abstraction, building on top of the EIP-6492 standard.

Core Contracts

The core contracts are responsible for managing the core interactions between users and the Portrait Protocol.

ContractObjective
PortraitIdRegistryManages the unique identifiers associated with a Portrait.
PortraitNameRegistryManages the names associated with a Portrait.
PortraitAccessRegistryManages the access control associated with a Portrait.
PortraitPlanRegistryManages the plans associated with a Portrait.
PortraitNodeRegistryManages the hosting nodes associated with a Portrait.
PortraitStateRegistry1Manages 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/UtilDescription
PortraitSigValidatorValidates the signatures associated with a Portrait.
UniversalSigValidatorValidates account abstraction signatures, forked from the EIP-6492 standard.

Deployed Contracts

All contracts have been deployed on the Base Sepolia testnet.

Core Contracts

ContractAddress
PortraitIdRegistry.sol0x3cDc03BEb79ba3b9FD3b687C67BFDE70AFf46eBF
PortraitNameRegistry.sol0xc788716466009AD7219c78d8e547819f6092ec8F
PortraitAccessRegistry.sol0xa837e9C834f23b04061b901814Af872291883ee7
PortraitPlanRegistry.sol0x630a0F43c1d51ABaf3a879cC79F844b6A03C3766
PortraitNodeRegistry.sol0x935f45e99eA6EeFE4C86845C996e27630b31C5Bb
PortraitStateRegistry.sol0x320C9E64c9a68492A1EB830e64EE881D75ac5efd

Libraries and utils

ContractAddress
PortraitSigValidator.sol0xD2407EBde1B1ffE19da02710446f1449C0669Df2
UniversalSigValidator.sol0xEE5542f87475A5F08d1450941c6a4470FbE7949E

Footnotes

  1. The PortraitStateRegistry contract will be deprecated in the future in favor of the state returned by hosting nodes.