Replies: 4 comments
-
The error is happening inside the Contract class, so I don’t think it has anything to do with getGasPrice. Can you include more info on what you are doing and maybe a minimum number of lines to reproduce it? Like a 20-line-or-less script? |
Beta Was this translation helpful? Give feedback.
-
Hi Ricmoo - Appreciate your response and thank you. Here is some code: const provider = new ethers.providers.Web3Provider(window.ethereum) Errors before calling the contract code and contract calls work without issue when manually supplying the gas limit. Contract call: contract.buyToken(from, to, tokenId, amount, { Contract Code: function buy(address from, address to, uint256 tokenId, uint256 amount) external payable Noticed that error is also thrown by the provider code. Went ahead an did the upgrade to v6 to see if that would resolve the issue, can connect to wallet now and will let you know if continue to have issues mentioned above. Appreciate your time and support. Regards. |
Beta Was this translation helpful? Give feedback.
-
FYI - works fine with version 6.6.4, thanks again for your time and all your efforts towards ethers.js; it is appreciated. provider.getFeeData(): { Regards. |
Beta Was this translation helpful? Give feedback.
-
New version is also throwing exceptions properly on reverts :-). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi - when calling getGasPrice(), getting following error. Can anyone please provide any insight on potential cause of the issue.
In addition:
Both eth_requestAccounts and provider.getSigner().getAddress() are returning defined valid addresses.
Provider: Web3Provider
Error: invalid address or ENS name (argument="name", value=undefined, code=INVALID_ARGUMENT, version=contracts/5.7.0)
at Logger.makeError (webpack-internal:///./node_modules/@ethersproject/logger/lib.esm/index.js:231:23)
at Logger.throwError (webpack-internal:///./node_modules/@ethersproject/logger/lib.esm/index.js:240:20)
at Logger.throwArgumentError (webpack-internal:///./node_modules/@ethersproject/logger/lib.esm/index.js:243:21)
at eval (webpack-internal:///./node_modules/@ethersproject/contracts/lib.esm/index.js:53:20)
at Generator.next ()
at fulfilled (webpack-internal:///./node_modules/@ethersproject/contracts/lib.esm/index.js:22:58)
Beta Was this translation helpful? Give feedback.
All reactions