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
I'm having an issue where if I instantiate a Wallet object and add it the hardhat provider, gas fees are not getting calculated property whenever I make a transaction. But if I use one of the SignerWithAddress from hre.ethers.getSigners() it works correctly. I have tried both with Alchemy and Moralis.
In this snippet I only show sendTransaction getting used, but the same behaviour is being seen in contract function calls.
This is my configuration and task:
// transfer.tsimport{task}from'hardhat/config';importconfigfrom'../../config';task('action-transfer','Transfer coins from owner to other').addParam('to','Account address to transfer to').addParam('value','Value to transfer').setAction(async({ to, value }: {to: string;value: number},hre)=>{constowner1=(awaithre.ethers.getSigners())[0];constowner2=newhre.ethers.Wallet(config.crypto.ownerPrivateKey,hre.ethers.provider);consttx1=awaitowner1.sendTransaction({ to, value });consttx2=awaitowner2.sendTransaction({ to, value });console.log(tx1);console.log(tx2);});
This issue was marked as stale because it didn't have any activity in the last 30 days. If you think it's still relevant, please leave a comment indicating so. Otherwise, it will be closed in 7 days.
I'm having an issue where if I instantiate a
Wallet
object and add it the hardhat provider, gas fees are not getting calculated property whenever I make a transaction. But if I use one of theSignerWithAddress
fromhre.ethers.getSigners()
it works correctly. I have tried both with Alchemy and Moralis.In this snippet I only show
sendTransaction
getting used, but the same behaviour is being seen in contract function calls.This is my configuration and task:
./src/config
is just a config object used for using different environments.Thanks.
The text was updated successfully, but these errors were encountered: