supportInterface method
Query if a contract implements an interface
tokenAddress An address for whom to query .
interfaceId The interface identifier
true
if the contract implements interfaceID
and
interfaceID
is not 0xffffffff, false
otherwise .
Implementation
Future<String> supportInterface(interface_id, String tokenAddr__) async {
final EthereumAddress contractAddr = EthereumAddress.fromHex(tokenAddr__);
final contract =
DeployedContract(ContractAbi.fromJson(abiFile, 'XRC721'), contractAddr);
final supportsInterface = contract.function('supportsInterface');
final supports_Interface = await client.call(
contract: contract,
function: supportsInterface,
params: [interface_id]);
return ('$supports_Interface');
}