Skip to content

Latest commit

 

History

History

docs

Scroll Canvas Developer Documentation

Components overview

(Editable link)

Overview

Scroll Canvas consists of the following components:

  • ProfileRegistry: A contract for users to mint and query their Canvases.
  • Profile: Each Canvas is an instance of the profile smart contract.
  • EAS: A technology for issuing on-chain attestations.
  • ScrollBadgeResolver: Each attestation passes through this resolver before the badge is minted. It enforces Canvas badge rules.
  • ScrollBadge: Each badge is a contract the conforms to a certain interface.

Profiles

Each user can mint a Profile instance through ProfileRegistry. This contract is the user's Canvas, and minting it is a prerequisite to collecting badges. Each wallet can only mint one profile. All profiles share the same implementation, upgradable by Scroll to enable new features.

The main use of profiles is personalization. Users can configure a username and an avatar. Users can also decide which badges they attach to their profile, and in which order they want to display them.

See the Canvas Interaction Guide section for more details.

ScrollBadge Schema and Resolver

We define a Scroll badge EAS schema:

address badge
bytes   payload

This schema is tied to ScrollBadgeResolver. Every time a Scroll badge attestation is created or revoked through EAS, ScrollBadgeResolver executes some checks and actions. After this, it forwards the call to the actual badge implementation.

You can find the schema UID in the Deployments section. Browse the Scroll mainnet badge attestations on the EAS Explorer.

Badges

Each badge is an EAS attestation that goes through the ScrollBadgeResolver contract and a badge contract.

Each badge type is a standalone contract that inherits from ScrollBadge. This badge contract can implement arbitrary logic attached to the attestation. Badges implement a badgeTokenURI interface, similar to ERC721.tokenURI.

Badges are minted to the user's wallet address. The user can express their personalization preferences (attach and reorder badges, choose a profile photo) through their Canvas Profile.

See the Badges section for more details, and Badge Examples for Solidity code examples.

Explore the Documentation

Explore the following pages to learn more about different aspects of Canvas:

  • Deployments lists the official Canvas contract addresses on Scroll mainnet and on the Scroll Sepolia testnet.
  • Badges introduces the basic requirements for badge contracts and lists resources for getting started as a badge developer.
  • Badge Examples shows the process of developing custom badges by going through some common examples and use cases.
  • Canvas Interaction Guide lists common questions and examples for interacting with Canvas profiles and badges.
  • Official Badges contains addresses and documentation for some badges issued by Scroll.