New answers tagged

0 votes

ethers SERVER_ERROR that cannot be catched with try/catch

It looks like RPC provider you are using is not stable. Try using another provider. If possible, infura or quiknode or another provider with ensured SLA
Vas Treck's user avatar
  • 361
0 votes

Ethers.js recovers wrong address when signing its transactions with elliptic.js

The reason was that ec.sign expected the unsigned hash to be a BN type. Because the type of inputs with prefixed 0x is just too vague.
kuco 23's user avatar
  • 218
0 votes

I get error couldn't find module 'ethereumjs-wallet/hdkey'

The solution is that you import hdkey from the ethereumjs-wallet library. hdkey is being exported and it is not the default export. const {hdkey} = require('ethereumjs-wallet'); const mnemonic = ...
Chidiebere Ezeokwelume's user avatar
1 vote
Accepted

Is there any way to send a raw signed transaction via ethers?

You can use the send function of the provider as per the docs: https://docs.ethers.org/v5/api/providers/jsonrpc-provider/#JsonRpcProvider-send.
ruby_newbie's user avatar
0 votes

VM Exception while processing transaction: revert while buy token

The possible problem could be that you are checking the balance of the admin account, but transfering tokens from the sale contract. // require that the contract has enough tokens require(...
Ismael's user avatar
  • 31k
1 vote

How do I recover the address from message and signature generated with web3.personal.sign?

2023 answer. import { recoverAddress, getBytes, hashMessage } from "ethers"; const recoverPublicKey = (message, signature) => { const digest = getBytes(hashMessage(message)); ...
Shineli's user avatar
  • 11
0 votes
Accepted

What causes this error? NFT Minting via Piniata - fails transaction

Okay i found the issue, the issue is i had to ditch web3.js and use ethers.js instead
Aleksander Morawski's user avatar
0 votes

CALL_EXCEPTION in estimateGas with local ganache

i was able to fix my problem by giving the gas prices and the gas limit const overrides = { gasLimit: 6721975, // Adjust the gas limit as needed gasPrice: ethers.parseUnits("20000000000&...
Gloating Orc's user avatar
1 vote
Accepted

Get multiple ETH transactions

So to use eth_getBlockReceipts with web3.js, you need to use the extend method that allows you to basically 'extend' the class and use any RPC method. Note that it only works in web3.js V1. It was ...
Dave Dev Advocate Chainstack's user avatar
0 votes

I am getting this error everytime i test my contract using hardhat

Fix Your Contract Function Name: In your Solidity contract, rename the function balanceof to transfer. Run Your Test Correctly: In your test code, you're using the function balanceof in a way that it'...
vgonearth's user avatar
  • 139
0 votes

Get multiple ETH transactions

For free API's there's a limit of 1000 blocks . You can use alchemy's API if you think getblock isnt working. If your scope of work is only limited to finding out whether the to address belongs to you ...
Jaskaran Singh's user avatar

Top 50 recent answers are included