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 read the documentation and did not find it there. Sorry if I was wrong, I just started working with this library. I need to pass with a function one argument and some amount of ether. Something like that. let tx = await contractWithSigner.register('0xd155e2be4ae62A862177e3dE376Fe013dD4B11B2', { value: 1000000 })
But how it really work, how to provide correct ether value, custom gasLimit and gasPrice with arguments? Thanks.
The text was updated successfully, but these errors were encountered:
That looks exactly correct. Just pass in your arguments as usual, and include one additional overrides parameter. :)
The parseEther will be useful if you want to convert ether to Wei:
lettx=awaitcontractWithSigner.register(thing,{value: ethers.utils.parseEther("1.0"),// MUST be a string passed into parseEthergasLimit: 250000,gasPrice: provider.getGasPrice().// MAY be a number or a Promise})
I read the documentation and did not find it there. Sorry if I was wrong, I just started working with this library. I need to pass with a function one argument and some amount of ether. Something like that.
let tx = await contractWithSigner.register('0xd155e2be4ae62A862177e3dE376Fe013dD4B11B2', { value: 1000000 })
But how it really work, how to provide correct ether value, custom gasLimit and gasPrice with arguments? Thanks.
The text was updated successfully, but these errors were encountered: