Replies: 4 comments 6 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@o-ray-o |
Beta Was this translation helpful? Give feedback.
-
I suspect that the external wallet provider (e.g. metamask) does not support contract calling interaction. |
Beta Was this translation helpful? Give feedback.
-
let me show you a typescript representative example of what i mean to express myself better. consider the object const signer = await new ethers.BrowserProvider(providerDetail.provider).getSigner(); // ethers v6
const con_pool = await new ethers.Contract(addr_con_pool, abi_slot0, signer[0]); // uniswap contract_pool with no args
const resp = await con_pool.slot0(); throws the following error: consider variations (e.g. not using "await"; using i'm keen on learning every day, but afaik, no matter the calling operation to be performed, that except internal contract interactions of metamask (e.g. erc20 tokens transfer) calling operations are not supported. that's why alchemy and infura come into play. the idea i have is that metamask provider is for auth operations, and alchemy/infura for contract interactions. otherwise please provide me a representative example that may i run. as i said im delighted to learn every day :) thank you ricmoo for your knowledge. b regards. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I ran into an issue :
contract runner does not support sending transactions (operation="sendTransaction", code=UNSUPPORTED_OPERATION, version=6.0.2)
and under inspect :
Uncaught (in promise) TypeError: signer.getAddress is not a function
In App.js I have the following relevant code:
and in contract.js
As per Ricmoo's suggestion, I did not use
const provider = new ethers.providers.Web3Provider(window.ethereum);
for this version of ethers.jsIt seems that getAddress() function is missing inside
BrowserProvider
method. How can I fix this, and is there a place where I can see the updated documentation?Appreciate your help
Beta Was this translation helpful? Give feedback.
All reactions