Open
Conversation
vihu
reviewed
Feb 9, 2026
| PROGRAM_CONFIG = 9 | ||
| CONTRIBUTOR = 10 | ||
| ACCESS_PASS = 11 | ||
| TENANT = 13 |
Contributor
There was a problem hiding this comment.
Odd that this is 13 and not 12?
Contributor
Author
There was a problem hiding this comment.
Because ResourceExtension is 12.
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.
This pull request introduces comprehensive support for "tenant" management across the onchain programs, SDKs (Python/TypeScript), and both the
doublezeroanddoublezero-adminCLI tools. The changes add a newTenantaccount type, implement program-derived address (PDA) derivation for tenants, and provide full CRUD and administrator management capabilities in both the SDKs and CLI interfaces.Major changes include:
Onchain Programs and Account Model
Tenantaccount type, with immutable code-based PDA derivation, support for VRF ID, administrator management, and reference counting for safe deletion. New instructions for adding/removing administrators and updating/deleting tenants are included. Reference counting is integrated into user/tenant relationships for safe resource management.SDK Enhancements
Tenantaccount type and deserialization logic instate.py. [1] [2]derive_tenant_pdainpda.pyfor deterministic tenant address derivation. [1] [2]ACCOUNT_TYPE_TENANT,Tenantinterface, and deserialization logic instate.ts. [1] [2]deriveTenantPdainpda.tsfor code-based PDA derivation. [1] [2]CLI Additions
tenantsubcommand with support for create, update, delete, get, list, add-administrator, and remove-administrator operations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]AddAdministratorTenantCliCommandfor adding administrators to tenants.Smartcontract CLI Integration
CliCommandtrait and its implementation to support all tenant-related operations (create, get, list, update, delete, add/remove administrator), and exposed these via the CLI. [1] [2] [3] [4] [5]Documentation
CHANGELOG.mdto document all new tenant-related features, CLI commands, and SDK additions.Testing Verification