Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the content #348

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ToggleElement.astro
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const anchorHash = anchor.replace(/\s+/g, "-")
border-radius: 27px;
border: 1px solid #dadada;
overflow: hidden;
font-weight: 600;
font-weight: 400;
padding-left: 0.3rem;
@apply text-black dark:text-white-800 border-primary dark:border-dark-primary;
}
Expand Down
37 changes: 23 additions & 14 deletions src/content/docs/en/developers/guides/canvas-badge-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Canvas is an open onchain profile database of user identities and achievements (

### Badge

**Badges** are attestations of identities, achievements and traits verified through the [Ethereum Attestation Service](https://docs.attest.sh/docs/welcome), issued **permissionlessly by different ecosystem projects**. Badges are wallet-bound and non-transferable. **Badges facilitate interactions between ecosystem projects and users.**
**Badges** are attestations of identities, achievements and traits verified through the [Ethereum Attestation Service](https://scroll.easscan.org/learn/scroll), issued **permissionlessly by different ecosystem projects**. Badges are wallet-bound and non-transferable. **Badges facilitate interactions between ecosystem projects and users**.

Developers can issue badges in three methods:

Expand All @@ -48,7 +48,7 @@ Developers can design badges in two ways:
Badge issuance and deployment of the contract is fully permissionless. Please follow the steps below to issue a Badge for your project.

<Aside type="note" title="Join Developer Support Channel">
For Canvas and badge questions, please join [Scroll dev support channel](https://discord.com/channels/853955156100907018/1028102371894624337)
For Canvas and badge questions, please join [Scroll dev support channel](https://discord.com/invite/scroll)
</Aside>

## Step 1 `Design`: Badge Design Guidelines
Expand All @@ -72,7 +72,7 @@ For Canvas and badge questions, please join [Scroll dev support channel](https:/
| Description | Brief description of the *purpose* of this badge and *who is eligible* |
| Structure | *One single attribute*<br/> *Multiple Badges with levels* trigged by different actions and traits |
| Category | *Achievement*: tasks you have done. e.g. Scroll Origin NFTs, tasks completion badge <br/> *Identities*: who you are. e.g. Ethereum year, GItcoin passport, NFT community badge |
| Issuance method | *Fully permissionless*: meaning your badge can be automatically issued by checking smart contract conditions <br/> *Gifted:* Badges can also be issues with no user interaction <br/> **Backend-authorized**: requires APIs to enable eligibility criteria ([API requirements](https://www.notion.so/Badge-APIs-95890d7ca14944e2a6d34835ceb6b914?pvs=21)) |
| Issuance method | *Fully permissionless*: meaning your badge can be automatically issued by checking smart contract conditions <br/> *Gifted*: Badges can also be issues with no user interaction, requires APIs <br/> *Backend-authorized*: requires APIs to enable eligibility criteria |
| Support link | **Support channel link** to your Discord/Telegram group |

<Aside>
Expand Down Expand Up @@ -146,15 +146,20 @@ Since **badges are permissionless**, Scroll Foundation may not troubleshoot indi
// http code is not 200
```
</ToggleElement>

More details: [Badge APIs] {/* TODO: where to put this extra page */}

4. **Access Readiness**: Ensure badge contract address implements `defaultTokenURI`, allowing retrieval of default display data (`name, image, description`) via `bytes32(0)` with informative name and description.
5. **Set up support**: Prepare a channel for your badge holders can find you for support, get the url to join that channel ready.

## Step 3 `Test`: Sanity Check

1. Please visit `https://scroll.io/canvas/badge-contract/{{badgeContractAddress}}` to ensure that the badge is functioning correctly.
1. Once your badge has been deployed on Scroll, you can auto-check some of these requirements by running `yarn check-badge`.([link to check badge script](https://github.com/scroll-tech/canvas-contracts/blob/master/script/CheckBadge.s.sol))
- If your badge minting transaction reverts, we recommend debugging using `cast`:

```bash
cast run --rpc-url https://rpc.scroll.io [txhash]
```

This call will simulate the transaction in a local environment and show you the call stack and revert reason.
- For `badgeTokenURI` link returned, ensure correct cross-origin configuration
<ToggleElement anchor="reference-cors">
<div slot="title">Reference: CORS</div>
Expand All @@ -173,11 +178,12 @@ Since **badges are permissionless**, Scroll Foundation may not troubleshoot indi

- **`scroll.io` domain**: requests originating from **`scroll.io`** are permitted.
</ToggleElement>
2. Review the information on the badge detail page: Confirm that all basic badge information and redirect links are correct and match the information you provided.
3. Verify that the check API is operational. Test it with 2-4 wallet addresses eligible/ineligible to mint this badge and confirm that the claim API is functioning properly.
4. If you have created a badge that can be upgraded, please use wallets that meet different level requirements to attempt minting it. Ideally, find at least one wallet per level requirement to ensure the badge mints correctly.
5. To maintain the availability of the check API and claim API, Scroll recommends maintaining a TPS of approximately 300. Adjust this rate accordingly if your API handles multiple badges simultaneously.
6. If your badge image is stored on IPFS, due to the distributed nature of IPFS, the request time for users in different regions to access content on IPFS can be unpredictable. If they want a better user experience, they can self-host the content.
2. **Review the information on the badge detail page**:
- Confirm that all basic badge information and redirect links are correct and match the information you provided.
- Verify that the check API is operational. Test it with 2-4 wallet addresses eligible/ineligible to mint this badge and confirm that the claim API is functioning properly.
- If you have created a badge that can be upgraded, please use wallets that meet different level requirements to attempt minting it. Ideally, find at least one wallet per level requirement to ensure the badge mints correctly.
3. To maintain the availability of the check API and claim API, Scroll recommends maintaining a TPS of approximately 300. Adjust this rate accordingly if your API handles multiple badges simultaneously.
4. If your badge image is stored on IPFS, due to the distributed nature of IPFS, the request time for users in different regions to access content on IPFS can be unpredictable. If they want a better user experience, they can self-host the content.

<Aside>
At this stage, your Badge is live on Scroll Canvas. Badge launch is permissionless. You can deploy as many badges as needed. **Scroll does not need to approve your badge deployment.**
Expand All @@ -193,18 +199,21 @@ Regularly monitor server logs to stay informed of any potential issues, especial
<aside>
📖

[**Scroll Canvas - A**nthropomorphic "assistants" **Integration Guide for Developers**](https://www.notion.so/Scroll-Canvas-Anthropomorphic-assistants-Integration-Guide-for-Developers-2712f7a91af042c0a2d145af804bab51?pvs=21)
[**Scroll Canvas - A**nthropomorphic "assistants" **Integration Guide for Developers**](https://github.com/scroll-tech/frontends/blob/mainnet/docs/canvas.md)

</aside>

2. Share on social media about your badge launch and the eligibility criteria. Use `#BadgeonScroll` and tag `@Scroll_ZKP` to boost more visibility.
3. Monitor your community / support channel for user feedback. If there is any Canvas backend related issues, please reach out to Scroll Discord channel.

---

<ToggleElement anchor="reference-cors">
<div slot="title">Get listed on [Canvas & Badges] (https://scroll.io/canvas-and-badges)</div>

<div slot="title">Get listed on [Canvas & Badges](https://scroll.io/canvas-and-badges)</div>

<Aside>
You can display **all of the badges** in your own product permissionlessly. Discover Badges page serves as an additional discovery channel for your badges.
You can display **all of the badges** in your own product permissionlessly. Canvas and Badges display page serves as an additional discovery channel for your badges.
</Aside>
<Aside type="caution">
Please be careful when submitting your application. We’re eager to introduce useful and creative badges for the Scroll ecosystem. The Scroll team is thoroughly reviewing each badge listing, which means the process might take a bit longer. Thank you for your patience.
Expand Down