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