Feature/zero address validation 747 - #864
Merged
p3ris0n merged 4 commits intoAug 31, 2026
Merged
Conversation
Add standalone migration script, SDK method, and comprehensive tests for migrating legacy Admin contracts to the new RBAC format with SuperAdmin role mapping. The migration is idempotent and maps the singular admin address to the SuperAdmin persistent storage entry. - Add `migrateAdmin()` to TypeScript SDK client - Create `migrations/rbac-migration.ts` with CLI and library interfaces - Add 5 new Rust integration tests for migration happy paths and edge cases - Update UPGRADE_GUIDE.md with migration script usage (CLI, SDK, standalone) - Add TypeScript tests for migrateAdmin, grantMinter, revokeMinter 🤖 Generated with Codebuff Co-authored-by: Chris <151883835+VeronicDev@users.noreply.github.com> Co-authored-by: Codebuff <noreply@codebuff.com>
… API Make is_zero_address and require_non_zero_address public in the admin module so consuming contracts can import and use them. Add ZERO_ADDRESS_STRKEY constant, isZeroAddress SDK helper, and comprehensive tests. - Make is_zero_address() public with full documentation - Make require_non_zero_address() public with panic documentation - Export ZERO_ADDRESS_STRKEY constant - Add isZeroAddress() and ZERO_ADDRESS to TypeScript SDK - Add Rust test methods for zero-address validation - Add TypeScript tests for isZeroAddress helper - Update ACCESS_CONTROL.md with zero-address validation documentation 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@VeronicDev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…d SDK tests. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #747 — Establishes the foundational storage layer for zero-address validation by making
is_zero_addressandrequire_non_zero_addresspublic APIs.Changes
Rust Contract (
contracts/admin/src/lib.rs)is_zero_address()public with comprehensive documentationrequire_non_zero_address()public with panic documentationZERO_ADDRESS_STRKEYconstantis_zero_addressandrequire_non_zero_addresstest methods toAdminContractTypeScript SDK (
sdk/src/client.ts)ZERO_ADDRESSconstant exportisZeroAddress(address: string): booleanhelper functionTests
isZeroAddresscovering:Documentation (
docs/ACCESS_CONTROL.md)is_zero_address,require_non_zero_address,ZERO_ADDRESS_STRKEYPublic API
is_zero_address(env, address)trueif address is the zero-address sentinelrequire_non_zero_address(env, address)InvalidAddressif address is zeroZERO_ADDRESS_STRKEYGAAAA...WHF)isZeroAddress(address)ZERO_ADDRESSAcceptance Criteria
Closes #747