feat(cct-sdk): Add get token admin registry config evm query - #335
Conversation
|
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 |
✅ APPROVE —
|
…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.
|
✅ Feedback implemented (commit fb19f2f) Added Type check: ✅ |
* 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>
16b9a12
into
feature/DAPP-10819-evm-accept-admin
* 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>
* 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>
What
getTokenAdminRegistryquery 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
Testing
Notes
chain.getRegistryTokenConfigcannot 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