changeOwnerSigned method

Future<String> changeOwnerSigned(
  1. String privateKeyFrom,
  2. String identityDid,
  3. String newDid,
  4. MsgSignature signature,
)

Implementation

Future<String> changeOwnerSigned(String privateKeyFrom, String identityDid,
    String newDid, MsgSignature signature) async {
  var changeOwnerSignedFunction =
      _erc1056contract.function('changeOwnerSigned');

  var txHash = await web3Client.sendTransaction(
      EthPrivateKey.fromHex(privateKeyFrom),
      Transaction.callContract(
        contract: _erc1056contract,
        function: changeOwnerSignedFunction,
        parameters: [
          _didToAddress(identityDid),
          BigInt.from(signature.v),
          unsignedIntToBytes(signature.r),
          unsignedIntToBytes(signature.s),
          _didToAddress(newDid),
        ],
        // maxGas: 76853
      ),
      chainId: chainId);
  return txHash;
}