Can't find any good documentation on creating a raw transaction with contract data in ethers.js. The equivalent in web3 is adding the encodeABI on the data property. Any guidance on this?
This isn't working:
data = myContract.interface.functions.myFunction(value);
const tx = {
...
data
...
}
It doesn't seem to recognize this is a function (even though i see the data property there).
populateTransactionorder has been flipped so you need to call it in this ordercontract[action].populateTransaction(...params);– Nico Serrano Jun 03 '23 at 03:27