You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return ethers.utils.serializeTransaction(unsignedTx);
`
I successfully build a unsigned transaction to deploy a smart contract, signed it with a wallet, and deployed to rinkeby.
My issue is, serializing/deserializing the unsigned transaction. I get an error with the code above.
Argument of type 'TransactionRequest' is not assignable to parameter of type 'UnsignedTransaction'
Ethers.js docs show the method getDeployTransaction returns a unsignedTransaction, but typescript says otherwise.
i can typecast it , but am unsure if this is a safe work around.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
`
const contract = new ethers.ContractFactory(abi, bytecode);
const unsignedTx = contract.getDeployTransaction(args, overrides);
return ethers.utils.serializeTransaction(unsignedTx);
`
I successfully build a unsigned transaction to deploy a smart contract, signed it with a wallet, and deployed to rinkeby.
My issue is, serializing/deserializing the unsigned transaction. I get an error with the code above.
Argument of type 'TransactionRequest' is not assignable to parameter of type 'UnsignedTransaction'
Ethers.js docs show the method getDeployTransaction returns a unsignedTransaction, but typescript says otherwise.
i can typecast it , but am unsure if this is a safe work around.
PS. love ether.js
Beta Was this translation helpful? Give feedback.
All reactions