-
Hi all, one newbie question. The code like below: // Connect to the contract // How many tokens? // Send tokens |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yeah, ethers.js tries to populate all the things needed for tx, like gas price, nonce, gas limit. If you want to provide a value for that you can pass an override for it. Docs about overrides are here. Example code to pass const tx = await contract.transfer(targetAddress, numberOfTokens, { gasPrice: ethers.utils.parseUnits('15', 'gwei') }) |
Beta Was this translation helpful? Give feedback.
Yeah, ethers.js tries to populate all the things needed for tx, like gas price, nonce, gas limit. If you want to provide a value for that you can pass an override for it. Docs about overrides are here.
Example code to pass
gasPrice
override: