Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
546815d
docs(specs): add evm access control module specification
pasevin Feb 9, 2026
7ad9a71
refactor(adapter-stellar): migrate to accessControlIndexerUrl and bum…
pasevin Feb 9, 2026
1e79c97
docs(specs): update 011-evm-access-control phase 0 documentation
pasevin Feb 9, 2026
b711cf6
feat(adapter-evm-core): add access control module setup (phase 1)
pasevin Feb 9, 2026
d0a6222
feat(adapter-evm-core): add access control validation module (phase 2)
pasevin Feb 9, 2026
2ff234a
feat(adapter-evm-core): add US1 — registration and capability detecti…
pasevin Feb 9, 2026
f6624a3
feat(adapter-evm-core): add US2 — ownership and admin state queries (…
pasevin Feb 9, 2026
e52821e
feat(adapter-evm-core): add US3 — view current role assignments (phas…
pasevin Feb 9, 2026
53b5414
feat(adapter-evm-core): add US5 — default admin transfer operations (…
pasevin Feb 9, 2026
f5cb45d
feat(adapter-evm-core): add US6 — grant and revoke role operations (p…
pasevin Feb 9, 2026
6943572
feat(adapter-evm-core): add US7 — query access control history (phase 9)
pasevin Feb 9, 2026
81383a6
feat(adapter-evm-core): add US8 — export access control snapshot (pha…
pasevin Feb 9, 2026
8573e8d
feat(adapter-evm-core): add US9 — discover role IDs via indexer (phas…
pasevin Feb 9, 2026
9be12a6
feat(adapter-evm): integrate access control module (phase 12)
pasevin Feb 9, 2026
fd831e6
chore(adapter-evm-core): add changesets and complete phase 13 polish
pasevin Feb 9, 2026
9c12533
test(adapter-evm-core): add live indexer integration tests (phase 14)
pasevin Feb 10, 2026
63ee195
fix(adapter-evm-core): use bytes32 role IDs for ownership/admin histo…
pasevin Feb 11, 2026
342e014
fix(adapter-evm-core): return trimmed value from validateRoleId
pasevin Feb 11, 2026
a568694
fix(adapter-evm-core): use composite role+account key in grant map
pasevin Feb 11, 2026
1d34da5
feat(adapter-evm-core): add human-readable role labels for EVM access…
pasevin Feb 11, 2026
e4ce269
style(changeset): use double quotes in evm-access-control-role-labels…
pasevin Feb 11, 2026
4993020
fix(adapter-evm-core): preserve external label precedence over ABI di…
pasevin Feb 11, 2026
3f5454a
refactor(adapter-evm-core): extract shared viem public client factory
pasevin Feb 11, 2026
288025d
fix(adapter-evm-core): use resolveRpcUrl for user RPC override support
pasevin Feb 11, 2026
e63edaf
fix(adapter-evm-core): normalize role IDs to lowercase for case-insen…
pasevin Feb 11, 2026
c394242
test(adapter-evm-core): expand role label coverage across all test su…
pasevin Feb 11, 2026
9190716
feat(adapter-evm): add access control indexer url resolution and sett…
pasevin Feb 12, 2026
2138a0b
fix(adapter-evm): populate role members from indexer for non-enumerab…
pasevin Feb 12, 2026
dea8024
test(adapter-evm-core): add non-enumerable indexer member population …
pasevin Feb 12, 2026
de81ddc
fix(adapter-evm-core): add defense-in-depth capability checks to serv…
pasevin Feb 12, 2026
e2fbb0d
fix(adapter-stellar): add defense-in-depth capability checks to servi…
pasevin Feb 12, 2026
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
9 changes: 9 additions & 0 deletions .changeset/evm-access-control-adapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@openzeppelin/ui-builder-adapter-evm": minor
---

Add access control service integration and indexer URL configuration

- Implement `getAccessControlService()` with lazy initialization on EvmAdapter
- Add `accessControlIndexerUrl` endpoints for all EVM mainnet networks (Ethereum, Polygon, Arbitrum, Optimism, Base, Avalanche, BSC, Gnosis, Celo, Scroll, ZKsync, Linea, Blast, Mantle, Mode)
- Add `accessControlIndexerUrl` endpoints for all EVM testnet networks (Sepolia, Amoy, Arbitrum Sepolia, Optimism Sepolia, Base Sepolia, Fuji, BSC Testnet, Chiado, Alfajores, Scroll Sepolia, ZKsync Sepolia, Linea Sepolia, Blast Sepolia, Mantle Sepolia, Mode Sepolia)
Comment on lines +7 to +9
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changeset claims accessControlIndexerUrl endpoints were added for networks like Gnosis, Celo, Blast, Mantle, and Mode, but the updated packages/adapter-evm/src/networks/mainnet.ts and testnet.ts in this PR only define a smaller subset of networks. Please either add the missing network configs/endpoints or adjust the release note to match what’s actually included.

Copilot uses AI. Check for mistakes.
13 changes: 13 additions & 0 deletions .changeset/evm-access-control-core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@openzeppelin/ui-builder-adapter-evm-core": minor
---

Add access control module for EVM-compatible contracts

- Capability detection for Ownable, Ownable2Step, AccessControl, AccessControlEnumerable, and AccessControlDefaultAdminRules patterns via ABI analysis
- On-chain reads for ownership state, admin state, role assignments, and role enumeration via viem public client
- Transaction assembly for ownership transfer/accept/renounce, admin transfer/accept/cancel, admin delay change/rollback, and role grant/revoke/renounce as WriteContractParameters
- GraphQL indexer client for historical event queries with filtering and pagination, role discovery, pending transfer queries, and grant timestamp enrichment
- Input validation for EVM addresses and bytes32 role IDs
- Full API parity with the Stellar adapter's AccessControlService (13 unified methods + EVM-specific extensions)
- Graceful degradation when indexer is unavailable
11 changes: 11 additions & 0 deletions .changeset/evm-access-control-role-labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@openzeppelin/ui-builder-adapter-evm-core': minor
---

Add human-readable role labels for EVM access control

- Well-known role dictionary (DEFAULT_ADMIN_ROLE, MINTER_ROLE, PAUSER_ROLE, BURNER_ROLE, UPGRADER_ROLE) with resolveRoleLabel()
- ABI-based role constant extraction via findRoleConstantCandidates() and discoverRoleLabelsFromAbi()
- addKnownRoleIds() accepts { id, label } pairs for externally-provided labels
- roleLabelMap threaded through readCurrentRoles(), queryHistory(), and resolveRoleFromEvent()
- Label resolution precedence: external > ABI-extracted > well-known > undefined
12 changes: 12 additions & 0 deletions .changeset/stellar-access-control-defense-in-depth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@openzeppelin/ui-builder-adapter-stellar': patch
---

Add defense-in-depth capability checks to Stellar access control service

- `getOwnership()` now validates `hasOwnable` capability before calling `get_owner()` when contract is registered
- `getAdminInfo()` now validates `hasTwoStepAdmin` capability before calling `get_admin()` when contract is registered
- `getAdminAccount()` now validates `hasTwoStepAdmin` capability before calling `get_admin()` when contract is registered
- Checks are soft — skipped when contract is not registered to preserve backward compatibility
- Throws descriptive `OperationFailed` errors instead of confusing on-chain failures
- Mirrors the defense-in-depth pattern added to the EVM adapter
2 changes: 1 addition & 1 deletion apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@openzeppelin/ui-renderer": "^1.0.2",
"@openzeppelin/ui-storage": "^1.0.0",
"@openzeppelin/ui-styles": "^1.0.0",
"@openzeppelin/ui-types": "^1.5.0",
"@openzeppelin/ui-types": "^1.7.0",
"@openzeppelin/ui-utils": "^1.2.0",
"@radix-ui/react-accordion": "^1.2.11",
"@radix-ui/react-checkbox": "^1.3.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ exports[`Export Snapshot Tests > EVM Export Snapshots > should match snapshot fo
"@openzeppelin/ui-components": "^1.2.1",
"@openzeppelin/ui-react": "^1.1.0",
"@openzeppelin/ui-renderer": "^1.0.3",
"@openzeppelin/ui-types": "^1.6.0",
"@openzeppelin/ui-types": "^1.7.0",
"@openzeppelin/ui-utils": "^1.2.1",
"@tanstack/react-query": "^5.0.0",
"@wagmi/core": "^2.20.3",
Expand Down Expand Up @@ -345,7 +345,7 @@ exports[`Export Snapshot Tests > Solana Export Snapshots > should match snapshot
"@openzeppelin/ui-components": "^1.2.1",
"@openzeppelin/ui-react": "^1.1.0",
"@openzeppelin/ui-renderer": "^1.0.3",
"@openzeppelin/ui-types": "^1.6.0",
"@openzeppelin/ui-types": "^1.7.0",
"@openzeppelin/ui-utils": "^1.2.1",
"@tanstack/react-query": "^5.0.0",
"@wagmi/core": "^2.20.3",
Expand Down
10 changes: 6 additions & 4 deletions apps/builder/src/export/assemblers/generateAndAddAppConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,17 @@ function _generateIndexerEndpointsConfigSection(
const indexerNetworkIdKey = networkConfig.id;

// Only add indexer config if the network has default indexer endpoints (indicating support)
if (networkConfig.indexerUri || networkConfig.indexerWsUri) {
// Prefer accessControlIndexerUrl (feature-specific) over indexerUri (generic)
const indexerHttpUrl = networkConfig.accessControlIndexerUrl ?? networkConfig.indexerUri;
if (indexerHttpUrl || networkConfig.indexerWsUri) {
const config: { http?: string; ws?: string; _comment?: string } = {
_comment:
'Optional. Used for querying historical blockchain data (e.g., access control events). Remove if not needed.',
};

// Only set http if indexerUri is actually provided
if (networkConfig.indexerUri) {
config.http = networkConfig.indexerUri;
// Only set http if an indexer URL is actually provided
if (indexerHttpUrl) {
config.http = indexerHttpUrl;
}

// Only set ws if indexerWsUri is actually provided
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/export/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const packageVersions = {
'@openzeppelin/ui-react': '1.1.0',
'@openzeppelin/ui-renderer': '1.0.3',
'@openzeppelin/ui-storage': '1.0.0',
'@openzeppelin/ui-types': '1.6.0',
'@openzeppelin/ui-types': '1.7.0',
'@openzeppelin/ui-components': '1.2.1',
'@openzeppelin/ui-utils': '1.2.1',
'@openzeppelin/ui-styles': '1.0.0',
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-evm-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@openzeppelin/relayer-sdk": "1.9.0",
"@openzeppelin/ui-types": "1.5.0",
"@openzeppelin/ui-types": "^1.7.0",
"@openzeppelin/ui-utils": "^1.2.0",
"@wagmi/connectors": "5.7.13",
"@wagmi/core": "^2.20.3",
Expand Down
Loading
Loading