Skip to content

feat(cct-sdk): Add get token admin registry config evm query - #335

Merged
mervin-link merged 3 commits into
feature/DAPP-10819-evm-accept-adminfrom
feature/DAPP-10820-evm-get-token-admin-registry
Aug 10, 2026
Merged

feat(cct-sdk): Add get token admin registry config evm query#335
mervin-link merged 3 commits into
feature/DAPP-10819-evm-accept-adminfrom
feature/DAPP-10820-evm-get-token-admin-registry

Conversation

@apedrob

@apedrob apedrob commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What

  • Add getTokenAdminRegistry query to EVMTokenManager. Reads a token's entry in the TokenAdminRegistry and returns its administrator, any pending administrator, and its registered pool (read-only, so there is no wallet and no tx)

Why

  • Gives callers a way to see the registry state before acting on it

Testing

  • Unit tests cover the read

Notes

  • chain.getRegistryTokenConfig cannot be used for this, because it throws when the administrator is the zero address, which is exactly the state a token sits in after registerAdmin and before acceptAdmin

@apedrob
apedrob requested a review from mervin-link August 6, 2026 12:50
@apedrob
apedrob requested review from a team, PabloMansanet and aelmanaa as code owners August 6, 2026 12:50
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

You must have Developer access to commit code to Chainlink Labs on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes.

Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles

@apedrob apedrob changed the title feat(cct-sdk): Add get token admin registry config evm op feat(cct-sdk): Add get token admin registry config evm query Aug 6, 2026
@aelmanaa

aelmanaa commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

✅ APPROVE — getTokenAdminRegistry (EVM)

Head c9b5697 · base feature/DAPP-10819-evm-accept-admin. ✅ APPROVE — 0 blockers.

Tested live on Sepolia (TAR 0x95F29FEE…B37B82):

  • configured token 0x6a2674…597FEadministrator=0x78AEb4…;

  • unconfigured token → administrator=0x0…0 reported, not thrown (the gap this op fills vs the throwing getRegistryTokenConfig).

  • Solana-parity: same op name/params/result base. 5/5 tests · npm run check exit 0.

…type alias

Clarify that administrator may be ZeroAddress for pending-acceptance state;
guide callers to test with === ZeroAddress instead of truthiness to avoid
silently missing the pending-registration case.
@aelmanaa

aelmanaa commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Feedback implemented (commit fb19f2f)

Added @remarks caveat to GetTokenAdminRegistryResult type alias documenting that administrator may be ZeroAddress and must be tested with === ZeroAddress, not truthiness. Guides callers away from the silent-miss bug.

Type check: ✅ npm run check exit 0

* feat(cct-sdk): Add get supported tokens evm query

* docs+types(cct-sdk): add default page size and explicit result type to getSupportedTokens

- Document that page parameter defaults to 1000 tokens per call
- Add explicit GetSupportedTokensResult type export for surface parity with
  sibling ops and Solana variant
- Makes the intent clearer and provides consistency across CCT query operations

* fix: use GetSupportedTokensResult

---------

Co-authored-by: aelmanaa <aelmanaa@users.noreply.github.com>
Co-authored-by: mervin-link <tvc-mervin.villaceran@smartcontract.com>
@mervin-link
mervin-link merged commit 16b9a12 into feature/DAPP-10819-evm-accept-admin Aug 10, 2026
2 of 4 checks passed
@mervin-link
mervin-link deleted the feature/DAPP-10820-evm-get-token-admin-registry branch August 10, 2026 03:12
mervin-link added a commit that referenced this pull request Aug 10, 2026
* feat(cct-sdk): Add accept admin evm op

* feat(cct-sdk): Add get token admin registry config evm query (#335)

* feat(cct-sdk): Add get token admin registry config evm op

* docs(cct-sdk): add ZeroAddress caveat to GetTokenAdminRegistryResult type alias

Clarify that administrator may be ZeroAddress for pending-acceptance state;
guide callers to test with === ZeroAddress instead of truthiness to avoid
silently missing the pending-registration case.

* feat(cct-sdk): Add get supported tokens evm query (#336)

* feat(cct-sdk): Add get supported tokens evm query

* docs+types(cct-sdk): add default page size and explicit result type to getSupportedTokens

- Document that page parameter defaults to 1000 tokens per call
- Add explicit GetSupportedTokensResult type export for surface parity with
  sibling ops and Solana variant
- Makes the intent clearer and provides consistency across CCT query operations

* fix: use GetSupportedTokensResult

---------

Co-authored-by: aelmanaa <aelmanaa@users.noreply.github.com>
Co-authored-by: mervin-link <tvc-mervin.villaceran@smartcontract.com>

---------

Co-authored-by: aelmanaa <aelmanaa@users.noreply.github.com>
Co-authored-by: mervin-link <tvc-mervin.villaceran@smartcontract.com>

---------

Co-authored-by: aelmanaa <aelmanaa@users.noreply.github.com>
Co-authored-by: mervin-link <tvc-mervin.villaceran@smartcontract.com>
mervin-link added a commit that referenced this pull request Aug 10, 2026
* Better separation of concerns and abstractions

* CCT: Add version dispatch + Transfer Ownership

* Adjust with base

* Address generic error types and doc examples

* Fix linting

* feat(cct-sdk): Add deploy evm token

* Address PR comments

* Address PR comments by fixing chain-specific types

* feat(cct-sdk): Source chainlink/contracts-ccip artifacts (#303)

* feat(cct-sdk): Source token + pool abi/bytecode from contracts-ccip

* Remove outdated bytecodes

* feat(cct-sdk): Add CrossChainToken deployment + token versioning (#305)

* feat(cct-sdk): Source token + pool abi/bytecode from contracts-ccip

* feat(cct-sdk): Add versioned Deploy Token (CCT + ERC20)

* Remove outdated bytecodes

* Deploy only CrossChainToken

* Recover previous type changes

* Address preMint specs

* feat(cct-sdk): Add deploy evm token pool + type/version resolution

* add remarks ts doc comment

* Address PR comments

* add lockfile to fix ci issue

* Add comments

* feat(cct-sdk): Add EVM deployLockbox operation (DAPP-10738)

Vendor ERC20LockBox v2.0.0 artifacts; add the cached lockbox Interface + DeployLockbox op, wire generateUnsignedDeployLockbox/deployLockbox into EVMTokenManager, and document the LockRelease deploy sequence.

* feat(cct-sdk): Add EVM authorizeLockboxCallers operation (DAPP-10788)

Add AuthorizeLockboxCallers op (wraps ERC20LockBox applyAuthorizedCallerUpdates) + tests, and wire generateUnsignedAuthorizeLockboxCallers/authorizeLockboxCallers into EVMTokenManager to complete the LockRelease flow.

* refactor(cct-sdk): add validateNonZeroAddress + guard single-tx submit

* feat(cct-sdk): EVM deploy verification + unify deploy ops

* Address PR comments

* Review pass

* feat(cct-sdk): add cross-family Query read base (DAPP-10823)

Query wires validate -> read so params are rejected before any RPC, mirroring how
Operation.generate gates buildUnsigned on the write side. EVMQuery binds it to an
EVMChain and owns getTypedContract, the single ethers -> ethers-abitype bridge that
CCT read ops decode through.

* feat(cct-sdk): add pool family type guards (DAPP-10823)

BurnMintTokenPoolType / LockReleaseTokenPoolType split TOKEN_POOL_TYPES by ABI family,
and isLockReleaseTokenPoolType narrows to the lock/release set per getTokenPoolFamily.

* feat(cct-sdk): add EVM getTokenPoolState read op (DAPP-10823)

Reads a pool's admin state across v1.5.0-v2.0.0 through the getters each version has:
one reader per generation, dispatched explicitly rather than floor-matched, so adding a
pool version fails to compile instead of silently inheriting a reader. The result is a
union discriminated by version, then by type for a lock/release pool's lockBox. v1.5.0
has no getTokenDecimals, so legacy decimals come from the token.

* feat(cct-sdk): expose getTokenPoolState on EVMTokenManager (DAPP-10823)

Also groups the operation fields by area (token / token admin registry / token pool /
lockbox), matching SolanaTokenManager.

* refactor(cct-sdk): move SolanaQuery onto the shared Query base (DAPP-10823)

GetTokenPoolState gains name + validate and drops its params-conditional result: read
now resolves to the union, which removes a query override that only re-typed the base's
two steps, along with the two casts that conditional return required. Caller narrowing
moves to SolanaTokenManager.getTokenPoolState overloads, so call sites and inferred
types are unchanged.

* Address PR comments

* feat(cct-sdk): Add register token evm op

* feat(cct-sdk): Add transfer admin evm op

* docs(cct-sdk): document ZeroAddress cancellation behavior and add role distinction warning to transferAdmin execute method

* feat(cct-sdk): Add accept admin evm op (#328)

* feat(cct-sdk): Add accept admin evm op

* feat(cct-sdk): Add get token admin registry config evm query (#335)

* feat(cct-sdk): Add get token admin registry config evm op

* docs(cct-sdk): add ZeroAddress caveat to GetTokenAdminRegistryResult type alias

Clarify that administrator may be ZeroAddress for pending-acceptance state;
guide callers to test with === ZeroAddress instead of truthiness to avoid
silently missing the pending-registration case.

* feat(cct-sdk): Add get supported tokens evm query (#336)

* feat(cct-sdk): Add get supported tokens evm query

* docs+types(cct-sdk): add default page size and explicit result type to getSupportedTokens

- Document that page parameter defaults to 1000 tokens per call
- Add explicit GetSupportedTokensResult type export for surface parity with
  sibling ops and Solana variant
- Makes the intent clearer and provides consistency across CCT query operations

* fix: use GetSupportedTokensResult

---------

Co-authored-by: aelmanaa <aelmanaa@users.noreply.github.com>
Co-authored-by: mervin-link <tvc-mervin.villaceran@smartcontract.com>

---------

Co-authored-by: aelmanaa <aelmanaa@users.noreply.github.com>
Co-authored-by: mervin-link <tvc-mervin.villaceran@smartcontract.com>

---------

Co-authored-by: aelmanaa <aelmanaa@users.noreply.github.com>
Co-authored-by: mervin-link <tvc-mervin.villaceran@smartcontract.com>

---------

Co-authored-by: aelmanaa <aelmanaa@users.noreply.github.com>
Co-authored-by: mervin-link <tvc-mervin.villaceran@smartcontract.com>
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.

3 participants