open-attestation icon indicating copy to clipboard operation
open-attestation copied to clipboard

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

Open armmarov86 opened this issue 2 years ago • 4 comments

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 ?

armmarov86 avatar Apr 04 '22 06:04 armmarov86

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

Which nodejs API are you referring to?

superical avatar Apr 04 '22 15:04 superical

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.

armmarov86 avatar Apr 04 '22 21:04 armmarov86

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

superical avatar Apr 06 '22 09:04 superical

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

superical avatar Apr 06 '22 17:04 superical