From 306b55454ac3d3708d3c3a73a2b3975c1c99d68e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Wed, 21 Aug 2024 14:40:56 +0200 Subject: [PATCH] add section about upgradability --- docs/badges.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/badges.md b/docs/badges.md index 1c22017..4c4bf2a 100644 --- a/docs/badges.md +++ b/docs/badges.md @@ -57,7 +57,7 @@ Design guidelines for badge images: - File size: Under 300KB -### Badge Types +### Ways to Issue Badges Badges are created by attesting to the recipient using the [`BADGE_SCHEMA`](./deployments.md). EAS provides multiple interfaces to attest: `attest`, `attestByDelegation`, `multiAttest`, `multiAttestByDelegation`. See [`IEAS.sol`](https://github.com/ethereum-attestation-service/eas-contracts/blob/master/contracts/IEAS.sol). @@ -219,6 +219,21 @@ There are three main badge types of badges: +### Upgradable Badges + +> This section is not about contract upgradability. +> If you want to make your badge contract upgradable, use any standard [upgradability pattern](https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies). + +Upgradable badges are badges that can evolve over time. +This pattern is most suitable for badges that represent that the user has reached a certain "level". +A user can first mint a badge at a certain level. +Then, once the user is eligible, they can upgrade their badge to a higher level. + +Upgradable badges must implement the [`IScrollBadgeUpgradeable`](../src/badge/extensions/IScrollBadgeUpgradeable.sol) interface. +Currently this interface only supports on-chain upgrade conditions. + + + ### Extensions This repo contains some useful [extensions](src/badge/extensions):