โ
Prerequisites
๐ Description
I am receiving INSUFFICIENT_FUNDS when trying to use the signer of Magic's RPC provider.
Magic RPC Error: [-32603] Error forwarded from node: insufficient funds for gas * price + value"}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS
๐งฉ Steps to Reproduce
- Create sample project as described in https://magic.link/docs/dedicated/login-methods/email/integration/web
- Generate a Web3Provider using ethers v5
const owner = new ethers.providers.Web3Provider(magic.rpcProvider as any);
- Use the signer of this provider to retrieve the balance of an ERC 20 token
const contract = new ethers.Contract(tokenAddress, erc20Abi, owner.getSigner());
const balance = await contract.balanceOf(receiver);
๐ค Expected behavior
Getting the balance of this usually gas-less transaction.
๐ฎ Actual behavior
"Magic RPC Error: [-32603] Error forwarded from node: insufficient funds for gas * price + value"}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS
๐ป Code Sample
[If possible, please provide a code repository, gist, code snippet or sample files to reproduce the issue.]
๐ Environment
| Software |
Version(s) |
magic-sdk |
21.0.0 |
| Browser |
Chrome |
yarn |
1.22.19 |
| Operating System |
MacOS 13.4.1 |
โ Prerequisites
magic-sdk)?๐ Description
I am receiving INSUFFICIENT_FUNDS when trying to use the signer of Magic's RPC provider.
Magic RPC Error: [-32603] Error forwarded from node: insufficient funds for gas * price + value"}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS
๐งฉ Steps to Reproduce
const owner = new ethers.providers.Web3Provider(magic.rpcProvider as any);๐ค Expected behavior
Getting the balance of this usually gas-less transaction.
๐ฎ Actual behavior
"Magic RPC Error: [-32603] Error forwarded from node: insufficient funds for gas * price + value"}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS
๐ป Code Sample
[If possible, please provide a code repository, gist, code snippet or sample files to reproduce the issue.]
๐ Environment
magic-sdkyarn