Open-Attestation / open-attestation

Meta framework for providing digital provenance and integrity to documents.
https://openattestation.com
Apache License 2.0
54 stars 18 forks source link

Do these api (deployNewTitleEscrow) and cli (open-attestation deploy title-escrow) behave the same ? #224

Open armmarov86 opened 2 years ago

armmarov86 commented 2 years ago

Hi, I tried to create a new title escrow using api from node-js. Apparently i called deployNewTitleEscrow api but there is no contract address appear at the receipt. So I want to get some clarification whether can I use the deployNewTitleEscrow api to create new title escrow like "open-attestation deploy title-escrow" or should I use different api ?

superical commented 2 years ago

I tried to create a new title escrow using api from node-js

Which nodejs API are you referring to?

armmarov86 commented 2 years ago

Hi, thanks for the reply. This is how i did

import { TradeTrustERC721Factory } from "@govtechsg/token-registry"

const connectedRegistry = TradeTrustERC721Factory.connect(
     <TOKEN_REGISTRY_ADDRESS>, 
      <SIGNER_OBJECT>);

const tx = await connectedRegistry.deployNewTitleEscrow(
     <TOKEN_REGISTRY_ADDRESS>,
     <BENEFICIARY_ADDRESS>, 
     <HOLDER_ADDRESS>);

const receipt = await tx.wait();
console.log(receipt);

Please let me know if I'm doing it wrongly. I was expecting to get new title escrow contract address at the receipt but seems like the contract address is null.

superical commented 2 years ago

This sounds like a question more with the token registry if I understood you correctly? Which version are you using?

superical commented 2 years ago

Btw, if you are using v3.2, you shouldn't have to create title escrow manually.🙂