revokeDelegate method
Implementation
Future<void> revokeDelegate(String privateKeyFrom, String identityDid,
String delegateType, String delegateDid) async {
if (!_matchesExpectedDid(identityDid)) {
throw Exception(
'Information about $identityDid do not belong to this network');
}
if (!_matchesExpectedDid(delegateDid)) {
throw Exception(
'Information about $delegateDid do not belong to this network');
}
var revokeDelegateFunction = _erc1056contract.function('revokeDelegate');
Transaction tx = Transaction.callContract(
contract: _erc1056contract,
function: revokeDelegateFunction,
parameters: [
_didToAddress(identityDid),
_to32ByteUtf8(delegateType),
_didToAddress(delegateDid)
]);
await web3Client.sendTransaction(EthPrivateKey.fromHex(privateKeyFrom), tx,
chainId: chainId);
}