import { EIP1967BeaconNotFound , EIP1967ImplementationNotFound , getBeaconAddress , getImplementationAddress , } from './eip-1967' ; import { EthereumProvider } from './provider' ; export async function isTransparentOrUUPSProxy ( provider , address ) { try { await getImplementationAddress ( provider , address ) ; return true ; } catch ( e ) { if ( e instanceof EIP1967ImplementationNotFound ) { return false ; } else { throw e ; } } } export async function isBeaconProxy ( provider , address ) { try { await getBeaconAddress ( provider , address ) ; return true ; } catch ( e ) { if ( e instanceof EIP1967BeaconNotFound ) { return false ; } else { throw e ; } } }