Skip to main content
1 vote

Is there a way to test whether an external contract implements (or does not implement) a given interface method?

One way is to use try-catch error handling. Here's a minimal code for the same: // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; interface IRandomMethod { function getUint() external view ...
SYED ASAD KAZMI's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible