Skip to content

fix: update deprecated ContractRollback to gl.UserError in docs#423

Open
ygd58 wants to merge 1 commit into
genlayerlabs:mainfrom
ygd58:fix/update-deprecated-api-names
Open

fix: update deprecated ContractRollback to gl.UserError in docs#423
ygd58 wants to merge 1 commit into
genlayerlabs:mainfrom
ygd58:fix/update-deprecated-api-names

Conversation

@ygd58

@ygd58 ygd58 commented Jun 6, 2026

Copy link
Copy Markdown

Summary

Updates deprecated API reference ContractRollback (gl.rollback) to the current gl.UserError in the genlayer-test documentation.

Related Issue

Closes #346 (partial fix)

Changes

  • Updated pages/api-references/genlayer-test/direct.md: replaced ContractRollback (gl.rollback) with gl.UserError to reflect the current SDK API

Notes

This is part of a broader cleanup of deprecated API names identified in issue #346.

Summary by CodeRabbit

  • Documentation
    • Updated API documentation for the expect_revert method to clarify the exception types caught during test validation.

@netlify

netlify Bot commented Jun 6, 2026

Copy link
Copy Markdown

Deploy Preview for genlayer-docs ready!

Name Link
🔨 Latest commit 96c72a6
🔍 Latest deploy log https://app.netlify.com/projects/genlayer-docs/deploys/6a244cada9b3bc0008a6be9b
😎 Deploy Preview https://deploy-preview-423--genlayer-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 230cc9fb-1c13-4150-bc70-f752cde2d670

📥 Commits

Reviewing files that changed from the base of the PR and between 864cd05 and 96c72a6.

📒 Files selected for processing (1)
  • pages/api-references/genlayer-test/direct.md

📝 Walkthrough

Walkthrough

This PR corrects the API documentation for vm.expect_revert to reflect current SDK error class naming conventions, replacing references to deprecated gl.rollback/ContractRollback with the current gl.UserError exception type.

Changes

VM expect_revert documentation correction

Layer / File(s) Summary
vm.expect_revert error documentation
pages/api-references/genlayer-test/direct.md
Documentation for vm.expect_revert is updated to specify it catches gl.UserError (and any Exception) instead of the outdated gl.rollback/ContractRollback.

Possibly related PRs

  • genlayerlabs/genlayer-docs#363: Updates examples and catch clauses to use the correct gl.vm.UserError and gl.advanced.user_error_immediate() following the v0.1.3 SDK migration naming changes.

Poem

A single line, a simple fix,
Old errors out, new names mix,
UserError now takes the stage,
Docs corrected, page by page,
🐰 Hop-hop, clarity achieved!

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: updating deprecated ContractRollback API reference to gl.UserError in documentation.
Description check ✅ Passed The description includes a clear summary, identifies the related issue (#346), details the specific changes made, and explains the broader context of the cleanup effort.
Linked Issues check ✅ Passed The PR addresses the documentation sweep objective from issue #346 to update outdated API names, specifically replacing Rollback/ContractRollback with UserError as required.
Out of Scope Changes check ✅ Passed All changes are scoped to updating deprecated API references in documentation, directly aligning with the cleanup task identified in issue #346 without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Research Report: 22 Improvement Suggestions Across the GenLayer Ecosystem

1 participant