I have created a transaction offline for a contract deploy, to be sent to my server to deploy. Here is my offline created transaction

const contract = new ethers.ContractFactory(abi, bin, wallet);

const deployTrx = await contract.getDeployTransaction(

This gives me my data from my transaction. I give it also gasPrice, gasLimit, and my nonce. I send it to my server to do the transaction deploy from the server side and return to the client the transaction.

At this point I build my contract interface like so:

// get deployed address
const contractAddress = ethers.utils.getContractAddress(deployResult.data.trx);
// make interface
const contractInterface = new ethers.Contract(contractAddress, abi, wallet);

I test this out to get the deployed total supply and get an error.

this.deployTransaction.wait is not a function

So am I not building my interface correctly. It seems like I cant call any functions successfully on contractInterface. It always gives that same error. I have deployed the contract the otherway, not making the transaction first and then submitting it, but just having it submitted through . deploy. That gives me an interface back when I use .deploy but I dont have this option.

How do I get my interface after submitting my offline made transaction to my server?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.