Query editor
with roles as (SELECTgranted.account,ARRAY_AGG(DISTINCTCASEWHEN granted.role = 0x0000000000000000000000000000000000000000000000000000000000000000 THEN 'DEFAULT_ADMIN_ROLE'WHEN granted.role = 0xa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c THEN 'UPGRADER'WHEN granted.role = 0x539440820030c4994db4e31b6b800deafd503688728f932addfe7a410515c14c THEN 'PAUSER'WHEN granted.role = 0x98384286fcdcbfa787823371d084455c0f6a6ca775c8f7c2623f3981b6390d54 THEN 'REGISTRY_MANAGER'ELSE 'UNKNOWN'END) AS role_labels,ARRAY_AGG(DISTINCT granted.role) AS rolesFROM hourglass_ethereum.HourglassCustodian_evt_RoleGranted AS grantedLEFT JOIN hourglass_ethereum.HourglassCustodian_evt_RoleRevoked AS revokedON granted.contract_address = revoked.contract_addressAND granted.role = revoked.roleAND granted.account = revoked.accountWHERErevoked.role IS NULLGROUP BYgranted.account)selectcasewhen account = 0xb5B210919A53Ea9092De52EFF838bF8Af52c67ab then 'Hourglass Upgrader'when account = 0xa996A0dd6115EDFf7F7fc876a88a8C0C421c88Ff then 'Hourglass Rewards Checkpointer'else null end as eoa_label, array_sort(role_labels) as role_labels, account, ens.name as ensfrom rolesleft join ens.resolver_latest as enson roles.account = ens.address